From owner-svn-src-stable@FreeBSD.ORG Sun Feb 1 01:42:39 2015 Return-Path: Delivered-To: svn-src-stable@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 B124F351; Sun, 1 Feb 2015 01:42:39 +0000 (UTC) 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 9C4926D1; Sun, 1 Feb 2015 01:42:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t111gckt034596; Sun, 1 Feb 2015 01:42:38 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t111gc8h034595; Sun, 1 Feb 2015 01:42:38 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502010142.t111gc8h034595@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 1 Feb 2015 01:42:38 +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: r278018 - in stable: 10/contrib/libc++/src 9/contrib/libc++/src 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Feb 2015 01:42:39 -0000 Author: dim Date: Sun Feb 1 01:42:38 2015 New Revision: 278018 URL: https://svnweb.freebsd.org/changeset/base/278018 Log: MFC r273434 (by bapt): Do not define bad_array_new_length::bad_array_new_length in libc++ anymore when used in combinaison with libcxxrt since it is now defined there already. This fixes building world Modified: stable/9/contrib/libc++/src/new.cpp Directory Properties: stable/9/contrib/libc++/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/libc++/src/new.cpp Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/libc++/src/new.cpp ============================================================================== --- stable/9/contrib/libc++/src/new.cpp Sat Jan 31 23:48:59 2015 (r278017) +++ stable/9/contrib/libc++/src/new.cpp Sun Feb 1 01:42:38 2015 (r278018) @@ -192,8 +192,6 @@ bad_alloc::what() const _NOEXCEPT #endif // !__GLIBCXX__ -#endif //LIBCXXRT - bad_array_new_length::bad_array_new_length() _NOEXCEPT { } @@ -202,6 +200,8 @@ bad_array_new_length::~bad_array_new_len { } +#endif //LIBCXXRT + const char* bad_array_length::what() const _NOEXCEPT { From owner-svn-src-stable@FreeBSD.ORG Sun Feb 1 01:42:39 2015 Return-Path: Delivered-To: svn-src-stable@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 B8EF6352; Sun, 1 Feb 2015 01:42:39 +0000 (UTC) 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 9E9666D2; Sun, 1 Feb 2015 01:42:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t111gd7w034604; Sun, 1 Feb 2015 01:42:39 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t111gdte034603; Sun, 1 Feb 2015 01:42:39 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502010142.t111gdte034603@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 1 Feb 2015 01:42: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: r278018 - in stable: 10/contrib/libc++/src 9/contrib/libc++/src X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Feb 2015 01:42:39 -0000 Author: dim Date: Sun Feb 1 01:42:38 2015 New Revision: 278018 URL: https://svnweb.freebsd.org/changeset/base/278018 Log: MFC r273434 (by bapt): Do not define bad_array_new_length::bad_array_new_length in libc++ anymore when used in combinaison with libcxxrt since it is now defined there already. This fixes building world Modified: stable/10/contrib/libc++/src/new.cpp Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/contrib/libc++/src/new.cpp Directory Properties: stable/9/contrib/libc++/ (props changed) Modified: stable/10/contrib/libc++/src/new.cpp ============================================================================== --- stable/10/contrib/libc++/src/new.cpp Sat Jan 31 23:48:59 2015 (r278017) +++ stable/10/contrib/libc++/src/new.cpp Sun Feb 1 01:42:38 2015 (r278018) @@ -192,8 +192,6 @@ bad_alloc::what() const _NOEXCEPT #endif // !__GLIBCXX__ -#endif //LIBCXXRT - bad_array_new_length::bad_array_new_length() _NOEXCEPT { } @@ -202,6 +200,8 @@ bad_array_new_length::~bad_array_new_len { } +#endif //LIBCXXRT + const char* bad_array_length::what() const _NOEXCEPT { From owner-svn-src-stable@FreeBSD.ORG Sun Feb 1 02:30:03 2015 Return-Path: Delivered-To: svn-src-stable@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 06FFCA1D; Sun, 1 Feb 2015 02:30:03 +0000 (UTC) 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 E38D5A43; Sun, 1 Feb 2015 02:30:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t112U2ic054152; Sun, 1 Feb 2015 02:30:02 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t112TxNU054032; Sun, 1 Feb 2015 02:29:59 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502010229.t112TxNU054032@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 1 Feb 2015 02:29:59 +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: r278021 - in stable: 10/contrib/libc++/src 10/contrib/libcxxrt 10/lib/libcxxrt 9/contrib/libc++/src 9/contrib/libcxxrt 9/lib/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-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Feb 2015 02:30:03 -0000 Author: dim Date: Sun Feb 1 02:29:58 2015 New Revision: 278021 URL: https://svnweb.freebsd.org/changeset/base/278021 Log: Revert r278017 (MFC of r273381 and r276417) and r278018 (MFC of r273434) until I can figure out why it leads to link failures in some scenarios. Modified: stable/9/contrib/libc++/src/new.cpp stable/9/contrib/libcxxrt/atomic.h stable/9/contrib/libcxxrt/auxhelper.cc stable/9/contrib/libcxxrt/cxxabi.h stable/9/contrib/libcxxrt/dwarf_eh.h stable/9/contrib/libcxxrt/dynamic_cast.cc stable/9/contrib/libcxxrt/exception.cc stable/9/contrib/libcxxrt/guard.cc stable/9/contrib/libcxxrt/stdexcept.cc stable/9/contrib/libcxxrt/stdexcept.h stable/9/contrib/libcxxrt/typeinfo.cc stable/9/contrib/libcxxrt/unwind-arm.h stable/9/contrib/libcxxrt/unwind.h stable/9/lib/libcxxrt/Version.map Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/libc++/ (props changed) stable/9/contrib/libcxxrt/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libcxxrt/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/libc++/src/new.cpp stable/10/contrib/libcxxrt/atomic.h stable/10/contrib/libcxxrt/auxhelper.cc stable/10/contrib/libcxxrt/cxxabi.h stable/10/contrib/libcxxrt/dwarf_eh.h stable/10/contrib/libcxxrt/dynamic_cast.cc stable/10/contrib/libcxxrt/exception.cc stable/10/contrib/libcxxrt/guard.cc stable/10/contrib/libcxxrt/stdexcept.cc stable/10/contrib/libcxxrt/stdexcept.h stable/10/contrib/libcxxrt/typeinfo.cc stable/10/contrib/libcxxrt/unwind-arm.h stable/10/contrib/libcxxrt/unwind.h stable/10/lib/libcxxrt/Version.map Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/libc++/src/new.cpp ============================================================================== --- stable/9/contrib/libc++/src/new.cpp Sun Feb 1 02:02:50 2015 (r278020) +++ stable/9/contrib/libc++/src/new.cpp Sun Feb 1 02:29:58 2015 (r278021) @@ -192,6 +192,8 @@ bad_alloc::what() const _NOEXCEPT #endif // !__GLIBCXX__ +#endif //LIBCXXRT + bad_array_new_length::bad_array_new_length() _NOEXCEPT { } @@ -200,8 +202,6 @@ bad_array_new_length::~bad_array_new_len { } -#endif //LIBCXXRT - const char* bad_array_length::what() const _NOEXCEPT { Modified: stable/9/contrib/libcxxrt/atomic.h ============================================================================== --- stable/9/contrib/libcxxrt/atomic.h Sun Feb 1 02:02:50 2015 (r278020) +++ stable/9/contrib/libcxxrt/atomic.h Sun Feb 1 02:29:58 2015 (r278021) @@ -11,7 +11,7 @@ */ #if __has_builtin(__c11_atomic_exchange) #define ATOMIC_SWAP(addr, val)\ - __c11_atomic_exchange(reinterpret_cast<_Atomic(__typeof__(val))*>(addr), val, __ATOMIC_ACQ_REL) + __c11_atomic_exchange((_Atomic(__typeof__(val))*)addr, val, __ATOMIC_ACQ_REL) #elif __has_builtin(__sync_swap) #define ATOMIC_SWAP(addr, val)\ __sync_swap(addr, val) @@ -22,7 +22,7 @@ #if __has_builtin(__c11_atomic_load) #define ATOMIC_LOAD(addr)\ - __c11_atomic_load(reinterpret_cast<_Atomic(__typeof__(*addr))*>(addr), __ATOMIC_ACQUIRE) + __c11_atomic_load((_Atomic(__typeof__(*addr))*)addr, __ATOMIC_ACQUIRE) #else #define ATOMIC_LOAD(addr)\ (__sync_synchronize(), *addr) Modified: stable/9/contrib/libcxxrt/auxhelper.cc ============================================================================== --- stable/9/contrib/libcxxrt/auxhelper.cc Sun Feb 1 02:02:50 2015 (r278020) +++ stable/9/contrib/libcxxrt/auxhelper.cc Sun Feb 1 02:29:58 2015 (r278021) @@ -75,8 +75,3 @@ extern "C" void __cxa_deleted_virtual() { abort(); } - -extern "C" void __cxa_throw_bad_array_new_length() -{ - throw std::bad_array_new_length(); -} Modified: stable/9/contrib/libcxxrt/cxxabi.h ============================================================================== --- stable/9/contrib/libcxxrt/cxxabi.h Sun Feb 1 02:02:50 2015 (r278020) +++ stable/9/contrib/libcxxrt/cxxabi.h Sun Feb 1 02:29:58 2015 (r278021) @@ -110,7 +110,7 @@ struct __cxa_exception * handler count reaches 0 (which it doesn't with the top bit set). */ int handlerCount; -#if defined(__arm__) && !defined(__ARM_DWARF_EH__) +#ifdef __arm__ /** * The ARM EH ABI requires the unwind library to keep track of exceptions * during cleanups. These support nesting, so we need to keep a list of Modified: stable/9/contrib/libcxxrt/dwarf_eh.h ============================================================================== --- stable/9/contrib/libcxxrt/dwarf_eh.h Sun Feb 1 02:02:50 2015 (r278020) +++ stable/9/contrib/libcxxrt/dwarf_eh.h Sun Feb 1 02:29:58 2015 (r278021) @@ -83,7 +83,7 @@ enum dwarf_data_encoding */ static inline enum dwarf_data_encoding get_encoding(unsigned char x) { - return static_cast(x & 0xf); + return (enum dwarf_data_encoding)(x & 0xf); } /** @@ -115,7 +115,7 @@ enum dwarf_data_relative */ static inline enum dwarf_data_relative get_base(unsigned char x) { - return static_cast(x & 0x70); + return (enum dwarf_data_relative)(x & 0x70); } /** * Returns whether an encoding represents an indirect address. @@ -206,9 +206,9 @@ static int64_t read_sleb128(dw_eh_ptr_t if ((uleb >> (bits-1)) == 1) { // Sign extend by setting all bits in front of it to 1 - uleb |= static_cast(-1) << bits; + uleb |= ((int64_t)-1) << bits; } - return static_cast(uleb); + return (int64_t)uleb; } /** * Reads a value using the specified encoding from the address pointed to by @@ -224,7 +224,7 @@ static uint64_t read_value(char encoding // Read fixed-length types #define READ(dwarf, type) \ case dwarf:\ - v = static_cast(*reinterpret_cast(*data));\ + v = (uint64_t)(*(type*)(*data));\ *data += sizeof(type);\ break; READ(DW_EH_PE_udata2, uint16_t) @@ -263,16 +263,16 @@ static uint64_t resolve_indirect_value(_ switch (get_base(encoding)) { case DW_EH_PE_pcrel: - v += reinterpret_cast(start); + v += (uint64_t)start; break; case DW_EH_PE_textrel: - v += static_cast(static_cast(_Unwind_GetTextRelBase(c))); + v += (uint64_t)_Unwind_GetTextRelBase(c); break; case DW_EH_PE_datarel: - v += static_cast(static_cast(_Unwind_GetDataRelBase(c))); + v += (uint64_t)_Unwind_GetDataRelBase(c); break; case DW_EH_PE_funcrel: - v += static_cast(static_cast(_Unwind_GetRegionStart(c))); + v += (uint64_t)_Unwind_GetRegionStart(c); default: break; } @@ -282,7 +282,7 @@ static uint64_t resolve_indirect_value(_ // be a GCC extensions, so not properly documented... if (is_indirect(encoding)) { - v = static_cast(reinterpret_cast(*reinterpret_cast(v))); + v = (uint64_t)(uintptr_t)*(void**)v; } return v; } @@ -342,14 +342,14 @@ static inline struct dwarf_eh_lsda parse { struct dwarf_eh_lsda lsda; - lsda.region_start = reinterpret_cast(_Unwind_GetRegionStart(context)); + lsda.region_start = (dw_eh_ptr_t)(uintptr_t)_Unwind_GetRegionStart(context); // If the landing pads are relative to anything other than the start of // this region, find out where. This is @LPStart in the spec, although the // encoding that GCC uses does not quite match the spec. - uint64_t v = static_cast(reinterpret_cast(lsda.region_start)); + uint64_t v = (uint64_t)(uintptr_t)lsda.region_start; read_value_with_encoding(context, &data, &v); - lsda.landing_pads = reinterpret_cast(static_cast(v)); + lsda.landing_pads = (dw_eh_ptr_t)(uintptr_t)v; // If there is a type table, find out where it is. This is @TTBase in the // spec. Note: we find whether there is a type table pointer by checking @@ -365,18 +365,18 @@ static inline struct dwarf_eh_lsda parse lsda.type_table = type_table; //lsda.type_table = (uintptr_t*)(data + v); } -#if defined(__arm__) && !defined(__ARM_DWARF_EH__) +#if __arm__ lsda.type_table_encoding = (DW_EH_PE_pcrel | DW_EH_PE_indirect); #endif - lsda.callsite_encoding = static_cast(*(data++)); + lsda.callsite_encoding = (enum dwarf_data_encoding)(*(data++)); // Action table is immediately after the call site table lsda.action_table = data; - uintptr_t callsite_size = static_cast(read_uleb128(&data)); + uintptr_t callsite_size = (uintptr_t)read_uleb128(&data); lsda.action_table = data + callsite_size; // Call site table is immediately after the header - lsda.call_site_table = static_cast(data); + lsda.call_site_table = (dw_eh_ptr_t)data; return lsda; @@ -413,7 +413,7 @@ static bool dwarf_eh_find_callsite(struc result->landing_pad = 0; // The current instruction pointer offset within the region uint64_t ip = _Unwind_GetIP(context) - _Unwind_GetRegionStart(context); - unsigned char *callsite_table = static_cast(lsda->call_site_table); + unsigned char *callsite_table = (unsigned char*)lsda->call_site_table; while (callsite_table <= lsda->action_table) { @@ -463,17 +463,17 @@ static bool dwarf_eh_find_callsite(struc /// Defines an exception class from 8 bytes (endian independent) #define EXCEPTION_CLASS(a,b,c,d,e,f,g,h) \ - ((static_cast(a) << 56) +\ - (static_cast(b) << 48) +\ - (static_cast(c) << 40) +\ - (static_cast(d) << 32) +\ - (static_cast(e) << 24) +\ - (static_cast(f) << 16) +\ - (static_cast(g) << 8) +\ - (static_cast(h))) + (((uint64_t)a << 56) +\ + ((uint64_t)b << 48) +\ + ((uint64_t)c << 40) +\ + ((uint64_t)d << 32) +\ + ((uint64_t)e << 24) +\ + ((uint64_t)f << 16) +\ + ((uint64_t)g << 8) +\ + ((uint64_t)h)) #define GENERIC_EXCEPTION_CLASS(e,f,g,h) \ - (static_cast(e) << 24) +\ - (static_cast(f) << 16) +\ - (static_cast(g) << 8) +\ - (static_cast(h)) + ((uint32_t)e << 24) +\ + ((uint32_t)f << 16) +\ + ((uint32_t)g << 8) +\ + ((uint32_t)h) Modified: stable/9/contrib/libcxxrt/dynamic_cast.cc ============================================================================== --- stable/9/contrib/libcxxrt/dynamic_cast.cc Sun Feb 1 02:02:50 2015 (r278020) +++ stable/9/contrib/libcxxrt/dynamic_cast.cc Sun Feb 1 02:29:58 2015 (r278021) @@ -44,7 +44,7 @@ struct vtable_header * Simple macro that does pointer arithmetic in bytes but returns a value of * the same type as the original. */ -#define ADD_TO_PTR(x, off) reinterpret_cast<__typeof__(x)>(reinterpret_cast(x) + off) +#define ADD_TO_PTR(x, off) (__typeof__(x))(((char*)x) + off) bool std::type_info::__do_catch(std::type_info const *ex_type, void **exception_object, @@ -166,7 +166,7 @@ bool __vmi_class_type_info::__do_upcast( if (info->isVirtual()) { // Object's vtable - ptrdiff_t *off = *static_cast(obj); + ptrdiff_t *off = *(ptrdiff_t**)obj; // Offset location in vtable off = ADD_TO_PTR(off, offset); offset = *off; @@ -202,9 +202,9 @@ extern "C" void* __dynamic_cast(const vo const __class_type_info *dst, ptrdiff_t src2dst_offset) { - const char *vtable_location = *static_cast(sub); + char *vtable_location = *(char**)sub; const vtable_header *header = - reinterpret_cast(vtable_location - sizeof(vtable_header)); - void *leaf = ADD_TO_PTR(const_cast(sub), header->leaf_offset); + (const vtable_header*)(vtable_location - sizeof(vtable_header)); + void *leaf = ADD_TO_PTR((void*)sub, header->leaf_offset); return header->type->cast_to(leaf, dst); } Modified: stable/9/contrib/libcxxrt/exception.cc ============================================================================== --- stable/9/contrib/libcxxrt/exception.cc Sun Feb 1 02:02:50 2015 (r278020) +++ stable/9/contrib/libcxxrt/exception.cc Sun Feb 1 02:29:58 2015 (r278021) @@ -71,11 +71,11 @@ static void saveLandingPad(struct _Unwin int selector, dw_eh_ptr_t landingPad) { -#if defined(__arm__) && !defined(__ARM_DWARF_EH__) +#ifdef __arm__ // On ARM, we store the saved exception in the generic part of the structure ucb->barrier_cache.sp = _Unwind_GetGR(context, 13); - ucb->barrier_cache.bitpattern[1] = static_cast(selector); - ucb->barrier_cache.bitpattern[3] = reinterpret_cast(landingPad); + ucb->barrier_cache.bitpattern[1] = (uint32_t)selector; + ucb->barrier_cache.bitpattern[3] = (uint32_t)landingPad; #endif // Cache the results for the phase 2 unwind, if we found a handler // and this is not a foreign exception. @@ -95,15 +95,15 @@ static int loadLandingPad(struct _Unwind unsigned long *selector, dw_eh_ptr_t *landingPad) { -#if defined(__arm__) && !defined(__ARM_DWARF_EH__) +#ifdef __arm__ *selector = ucb->barrier_cache.bitpattern[1]; - *landingPad = reinterpret_cast(ucb->barrier_cache.bitpattern[3]); + *landingPad = (dw_eh_ptr_t)ucb->barrier_cache.bitpattern[3]; return 1; #else if (ex) { *selector = ex->handlerSwitchValue; - *landingPad = reinterpret_cast(ex->catchTemp); + *landingPad = (dw_eh_ptr_t)ex->catchTemp; return 0; } return 0; @@ -113,7 +113,7 @@ static int loadLandingPad(struct _Unwind static inline _Unwind_Reason_Code continueUnwinding(struct _Unwind_Exception *ex, struct _Unwind_Context *context) { -#if defined(__arm__) && !defined(__ARM_DWARF_EH__) +#ifdef __arm__ if (__gnu_unwind_frame(ex, context) != _URC_OK) { return _URC_FAILURE; } #endif return _URC_CONTINUE_UNWIND; @@ -204,7 +204,7 @@ struct __cxa_dependent_exception terminate_handler terminateHandler; __cxa_exception *nextException; int handlerCount; -#if defined(__arm__) && !defined(__ARM_DWARF_EH__) +#ifdef __arm__ _Unwind_Exception *nextCleanup; int cleanupCount; #endif @@ -267,13 +267,13 @@ static bool isDependentException(uint64_ static __cxa_exception *exceptionFromPointer(void *ex) { - return reinterpret_cast<__cxa_exception*>(static_cast(ex) - + return (__cxa_exception*)((char*)ex - offsetof(struct __cxa_exception, unwindHeader)); } static __cxa_exception *realExceptionFromException(__cxa_exception *ex) { if (!isDependentException(ex->unwindHeader.exception_class)) { return ex; } - return reinterpret_cast<__cxa_exception*>((reinterpret_cast<__cxa_dependent_exception*>(ex))->primaryException)-1; + return ((__cxa_exception*)(((__cxa_dependent_exception*)ex)->primaryException))-1; } @@ -304,13 +304,13 @@ static pthread_key_t eh_key; static void exception_cleanup(_Unwind_Reason_Code reason, struct _Unwind_Exception *ex) { - __cxa_free_exception(static_cast(ex)); + __cxa_free_exception((void*)ex); } static void dependent_exception_cleanup(_Unwind_Reason_Code reason, struct _Unwind_Exception *ex) { - __cxa_free_dependent_exception(static_cast(ex)); + __cxa_free_dependent_exception((void*)ex); } /** @@ -333,13 +333,13 @@ static void free_exception_list(__cxa_ex */ static void thread_cleanup(void* thread_info) { - __cxa_thread_info *info = static_cast<__cxa_thread_info*>(thread_info); + __cxa_thread_info *info = (__cxa_thread_info*)thread_info; if (info->globals.caughtExceptions) { // If this is a foreign exception, ask it to clean itself up. if (info->foreign_exception_state != __cxa_thread_info::none) { - _Unwind_Exception *e = reinterpret_cast<_Unwind_Exception*>(info->globals.caughtExceptions); + _Unwind_Exception *e = (_Unwind_Exception*)info->globals.caughtExceptions; e->exception_cleanup(_URC_FOREIGN_EXCEPTION_CAUGHT, e); } else @@ -379,8 +379,8 @@ static void init_key(void) return; } pthread_key_create(&eh_key, thread_cleanup); - pthread_setspecific(eh_key, reinterpret_cast(0x42)); - fakeTLS = (pthread_getspecific(eh_key) != reinterpret_cast(0x42)); + pthread_setspecific(eh_key, (void*)0x42); + fakeTLS = (pthread_getspecific(eh_key) != (void*)0x42); pthread_setspecific(eh_key, 0); } @@ -394,10 +394,10 @@ static __cxa_thread_info *thread_info() fakeTLS = true; } if (fakeTLS) { return &singleThreadInfo; } - __cxa_thread_info *info = static_cast<__cxa_thread_info*>(pthread_getspecific(eh_key)); + __cxa_thread_info *info = (__cxa_thread_info*)pthread_getspecific(eh_key); if (0 == info) { - info = static_cast<__cxa_thread_info*>(calloc(1, sizeof(__cxa_thread_info))); + info = (__cxa_thread_info*)calloc(1, sizeof(__cxa_thread_info)); pthread_setspecific(eh_key, info); } return info; @@ -409,7 +409,7 @@ static __cxa_thread_info *thread_info() static __cxa_thread_info *thread_info_fast() { if (fakeTLS) { return &singleThreadInfo; } - return static_cast<__cxa_thread_info*>(pthread_getspecific(eh_key)); + return (__cxa_thread_info*)pthread_getspecific(eh_key); } /** * ABI function returning the __cxa_eh_globals structure. @@ -472,7 +472,7 @@ static char *emergency_malloc(size_t siz if (0 != m) { pthread_mutex_unlock(&emergency_malloc_lock); - return static_cast(m); + return (char*)m; } for (int i=0 ; i<16 ; i++) { @@ -510,7 +510,7 @@ static void emergency_malloc_free(char * // Find the buffer corresponding to this pointer. for (int i=0 ; i<16 ; i++) { - if (ptr == static_cast(emergency_buffer + (1024 * i))) + if (ptr == (void*)(emergency_buffer + (1024 * i))) { buffer = i; break; @@ -521,7 +521,7 @@ static void emergency_malloc_free(char * // emergency_malloc() is expected to return 0-initialized data. We don't // zero the buffer when allocating it, because the static buffers will // begin life containing 0 values. - memset(ptr, 0, 1024); + memset((void*)ptr, 0, 1024); // Signal the condition variable to wake up any threads that are blocking // waiting for some space in the emergency buffer pthread_mutex_lock(&emergency_malloc_lock); @@ -535,7 +535,7 @@ static void emergency_malloc_free(char * static char *alloc_or_die(size_t size) { - char *buffer = static_cast(calloc(1, size)); + char *buffer = (char*)calloc(1, size); // If calloc() doesn't want to give us any memory, try using an emergency // buffer. @@ -597,7 +597,7 @@ extern "C" void *__cxa_allocate_dependen */ extern "C" void __cxa_free_exception(void *thrown_exception) { - __cxa_exception *ex = reinterpret_cast<__cxa_exception*>(thrown_exception) - 1; + __cxa_exception *ex = ((__cxa_exception*)thrown_exception) - 1; // Free the object that was thrown, calling its destructor if (0 != ex->exceptionDestructor) { @@ -612,7 +612,7 @@ extern "C" void __cxa_free_exception(voi } } - free_exception(reinterpret_cast(ex)); + free_exception((char*)ex); } static void releaseException(__cxa_exception *exception) @@ -633,13 +633,13 @@ static void releaseException(__cxa_excep void __cxa_free_dependent_exception(void *thrown_exception) { - __cxa_dependent_exception *ex = reinterpret_cast<__cxa_dependent_exception*>(thrown_exception) - 1; + __cxa_dependent_exception *ex = ((__cxa_dependent_exception*)thrown_exception) - 1; assert(isDependentException(ex->unwindHeader.exception_class)); if (ex->primaryException) { - releaseException(realExceptionFromException(reinterpret_cast<__cxa_exception*>(ex))); + releaseException(realExceptionFromException((__cxa_exception*)ex)); } - free_exception(reinterpret_cast(ex)); + free_exception((char*)ex); } /** @@ -654,8 +654,8 @@ static _Unwind_Reason_Code trace(struct { Dl_info myinfo; int mylookup = - dladdr(reinterpret_cast(__cxa_current_exception_type), &myinfo); - void *ip = reinterpret_cast(_Unwind_GetIP(context)); + dladdr((void*)(uintptr_t)__cxa_current_exception_type, &myinfo); + void *ip = (void*)_Unwind_GetIP(context); Dl_info info; if (dladdr(ip, &info) != 0) { @@ -673,11 +673,6 @@ static _Unwind_Reason_Code trace(struct * If the failure happened by falling off the end of the stack without finding * a handler, prints a back trace before aborting. */ -#if __GNUC__ > 3 && __GNUC_MINOR__ > 2 -extern "C" void *__cxa_begin_catch(void *e) throw(); -#else -extern "C" void *__cxa_begin_catch(void *e); -#endif static void report_failure(_Unwind_Reason_Code err, __cxa_exception *thrown_exception) { switch (err) @@ -686,16 +681,14 @@ static void report_failure(_Unwind_Reaso case _URC_FATAL_PHASE1_ERROR: fprintf(stderr, "Fatal error during phase 1 unwinding\n"); break; -#if !defined(__arm__) || defined(__ARM_DWARF_EH__) +#ifndef __arm__ case _URC_FATAL_PHASE2_ERROR: fprintf(stderr, "Fatal error during phase 2 unwinding\n"); break; #endif case _URC_END_OF_STACK: - __cxa_begin_catch (&(thrown_exception->unwindHeader)); - std::terminate(); fprintf(stderr, "Terminating due to uncaught exception %p", - static_cast(thrown_exception)); + (void*)thrown_exception); thrown_exception = realExceptionFromException(thrown_exception); static const __class_type_info *e_ti = static_cast(&typeid(std::exception)); @@ -704,8 +697,8 @@ static void report_failure(_Unwind_Reaso if (throw_ti) { std::exception *e = - static_cast(e_ti->cast_to(static_cast(thrown_exception+1), - throw_ti)); + (std::exception*)e_ti->cast_to((void*)(thrown_exception+1), + throw_ti); if (e) { fprintf(stderr, " '%s'", e->what()); @@ -713,21 +706,18 @@ static void report_failure(_Unwind_Reaso } size_t bufferSize = 128; - char *demangled = static_cast(malloc(bufferSize)); + char *demangled = (char*)malloc(bufferSize); const char *mangled = thrown_exception->exceptionType->name(); int status; demangled = __cxa_demangle(mangled, demangled, &bufferSize, &status); fprintf(stderr, " of type %s\n", - status == 0 ? demangled : mangled); + status == 0 ? (const char*)demangled : mangled); if (status == 0) { free(demangled); } // Print a back trace if no handler is found. // TODO: Make this optional #ifndef __arm__ _Unwind_Backtrace(trace, 0); #endif - - // Just abort. No need to call std::terminate for the second time - abort(); break; } std::terminate(); @@ -765,7 +755,7 @@ extern "C" void __cxa_throw(void *thrown std::type_info *tinfo, void(*dest)(void*)) { - __cxa_exception *ex = reinterpret_cast<__cxa_exception*>(thrown_exception) - 1; + __cxa_exception *ex = ((__cxa_exception*)thrown_exception) - 1; ex->referenceCount = 1; ex->exceptionType = tinfo; @@ -783,7 +773,7 @@ extern "C" void __cxa_rethrow_primary_ex if (NULL == thrown_exception) { return; } __cxa_exception *original = exceptionFromPointer(thrown_exception); - __cxa_dependent_exception *ex = reinterpret_cast<__cxa_dependent_exception*>(__cxa_allocate_dependent_exception())-1; + __cxa_dependent_exception *ex = ((__cxa_dependent_exception*)__cxa_allocate_dependent_exception())-1; ex->primaryException = thrown_exception; __cxa_increment_exception_refcount(thrown_exception); @@ -792,7 +782,7 @@ extern "C" void __cxa_rethrow_primary_ex ex->unwindHeader.exception_class = dependent_exception_class; ex->unwindHeader.exception_cleanup = dependent_exception_cleanup; - throw_exception(reinterpret_cast<__cxa_exception*>(ex)); + throw_exception((__cxa_exception*)ex); } extern "C" void *__cxa_current_primary_exception(void) @@ -809,14 +799,14 @@ extern "C" void *__cxa_current_primary_e extern "C" void __cxa_increment_exception_refcount(void* thrown_exception) { if (NULL == thrown_exception) { return; } - __cxa_exception *ex = static_cast<__cxa_exception*>(thrown_exception) - 1; + __cxa_exception *ex = ((__cxa_exception*)thrown_exception) - 1; if (isDependentException(ex->unwindHeader.exception_class)) { return; } __sync_fetch_and_add(&ex->referenceCount, 1); } extern "C" void __cxa_decrement_exception_refcount(void* thrown_exception) { if (NULL == thrown_exception) { return; } - __cxa_exception *ex = static_cast<__cxa_exception*>(thrown_exception) - 1; + __cxa_exception *ex = ((__cxa_exception*)thrown_exception) - 1; releaseException(ex); } @@ -848,7 +838,7 @@ extern "C" void __cxa_rethrow() if (ti->foreign_exception_state != __cxa_thread_info::none) { ti->foreign_exception_state = __cxa_thread_info::rethrown; - _Unwind_Exception *e = reinterpret_cast<_Unwind_Exception*>(ex); + _Unwind_Exception *e = (_Unwind_Exception*)ex; _Unwind_Reason_Code err = _Unwind_Resume_or_Rethrow(e); report_failure(err, ex); return; @@ -891,8 +881,8 @@ static std::type_info *get_type_info_ent if (offset == 0) { return 0; } // ...so we need to resolve it - return reinterpret_cast(resolve_indirect_value(context, - lsda->type_table_encoding, offset, start)); + return (std::type_info*)resolve_indirect_value(context, + lsda->type_table_encoding, offset, start); } @@ -906,13 +896,13 @@ static bool check_type_signature(__cxa_e const std::type_info *type, void *&adjustedPtr) { - void *exception_ptr = static_cast(ex+1); + void *exception_ptr = (void*)(ex+1); const std::type_info *ex_type = ex ? ex->exceptionType : 0; bool is_ptr = ex ? ex_type->__is_pointer_p() : false; if (is_ptr) { - exception_ptr = *static_cast(exception_ptr); + exception_ptr = *(void**)exception_ptr; } // Always match a catchall, even with a foreign exception // @@ -984,7 +974,7 @@ static handler_type check_action_record( { bool matched = false; *selector = filter; -#if defined(__arm__) && !defined(__ARM_DWARF_EH__) +#ifdef __arm__ filter++; std::type_info *handler_type = get_type_info_entry(context, lsda, filter--); while (handler_type) @@ -997,7 +987,7 @@ static handler_type check_action_record( handler_type = get_type_info_entry(context, lsda, filter--); } #else - unsigned char *type_index = reinterpret_cast(lsda->type_table) - filter - 1; + unsigned char *type_index = ((unsigned char*)lsda->type_table - filter - 1); while (*type_index) { std::type_info *handler_type = get_type_info_entry(context, lsda, *(type_index++)); @@ -1029,7 +1019,7 @@ static handler_type check_action_record( static void pushCleanupException(_Unwind_Exception *exceptionObject, __cxa_exception *ex) { -#if defined(__arm__) && !defined(__ARM_DWARF_EH__) +#ifdef __arm__ __cxa_thread_info *info = thread_info_fast(); if (ex) { @@ -1074,13 +1064,8 @@ BEGIN_PERSONALITY_FUNCTION(__gxx_persona realEx = realExceptionFromException(ex); } -#if defined(__arm__) && !defined(__ARM_DWARF_EH__) - unsigned char *lsda_addr = - static_cast(_Unwind_GetLanguageSpecificData(context)); -#else unsigned char *lsda_addr = - reinterpret_cast(static_cast(_Unwind_GetLanguageSpecificData(context))); -#endif + (unsigned char*)_Unwind_GetLanguageSpecificData(context); // No LSDA implies no landing pads - try the next frame if (0 == lsda_addr) { return continueUnwinding(exceptionObject, context); } @@ -1129,8 +1114,8 @@ BEGIN_PERSONALITY_FUNCTION(__gxx_persona if (ex) { saveLandingPad(context, exceptionObject, ex, selector, action.landing_pad); - ex->languageSpecificData = reinterpret_cast(lsda_addr); - ex->actionRecord = reinterpret_cast(action.action_record); + ex->languageSpecificData = (const char*)lsda_addr; + ex->actionRecord = (const char*)action.action_record; // ex->adjustedPtr is set when finding the action record. } return _URC_HANDLER_FOUND; @@ -1176,9 +1161,9 @@ BEGIN_PERSONALITY_FUNCTION(__gxx_persona } - _Unwind_SetIP(context, reinterpret_cast(action.landing_pad)); + _Unwind_SetIP(context, (unsigned long)action.landing_pad); _Unwind_SetGR(context, __builtin_eh_return_data_regno(0), - reinterpret_cast(exceptionObject)); + (unsigned long)exceptionObject); _Unwind_SetGR(context, __builtin_eh_return_data_regno(1), selector); return _URC_INSTALL_CONTEXT; @@ -1202,7 +1187,7 @@ extern "C" void *__cxa_begin_catch(void __cxa_thread_info *ti = thread_info(); __cxa_eh_globals *globals = &ti->globals; globals->uncaughtExceptions--; - _Unwind_Exception *exceptionObject = static_cast<_Unwind_Exception*>(e); + _Unwind_Exception *exceptionObject = (_Unwind_Exception*)e; if (isCXXException(exceptionObject->exception_class)) { @@ -1256,12 +1241,12 @@ extern "C" void *__cxa_begin_catch(void { std::terminate(); } - globals->caughtExceptions = reinterpret_cast<__cxa_exception*>(exceptionObject); + globals->caughtExceptions = (__cxa_exception*)exceptionObject; ti->foreign_exception_state = __cxa_thread_info::caught; } // exceptionObject is the pointer to the _Unwind_Exception within the // __cxa_exception. The throw object is after this - return (reinterpret_cast(exceptionObject) + sizeof(_Unwind_Exception)); + return ((char*)exceptionObject + sizeof(_Unwind_Exception)); } @@ -1285,7 +1270,7 @@ extern "C" void __cxa_end_catch() globals->caughtExceptions = 0; if (ti->foreign_exception_state != __cxa_thread_info::rethrown) { - _Unwind_Exception *e = reinterpret_cast<_Unwind_Exception*>(ti->globals.caughtExceptions); + _Unwind_Exception *e = (_Unwind_Exception*)ti->globals.caughtExceptions; e->exception_cleanup(_URC_FOREIGN_EXCEPTION_CAUGHT, e); } ti->foreign_exception_state = __cxa_thread_info::none; @@ -1347,7 +1332,7 @@ extern "C" std::type_info *__cxa_current */ extern "C" void __cxa_call_unexpected(void*exception) { - _Unwind_Exception *exceptionObject = static_cast<_Unwind_Exception*>(exception); + _Unwind_Exception *exceptionObject = (_Unwind_Exception*)exception; if (exceptionObject->exception_class == exception_class) { __cxa_exception *ex = exceptionFromPointer(exceptionObject); @@ -1498,7 +1483,7 @@ namespace std return ATOMIC_LOAD(&terminateHandler); } } -#if defined(__arm__) && !defined(__ARM_DWARF_EH__) +#ifdef __arm__ extern "C" _Unwind_Exception *__cxa_get_cleanup(void) { __cxa_thread_info *info = thread_info_fast(); Modified: stable/9/contrib/libcxxrt/guard.cc ============================================================================== --- stable/9/contrib/libcxxrt/guard.cc Sun Feb 1 02:02:50 2015 (r278020) +++ stable/9/contrib/libcxxrt/guard.cc Sun Feb 1 02:29:58 2015 (r278021) @@ -70,45 +70,18 @@ #ifdef __arm__ // ARM ABI - 32-bit guards. typedef uint32_t guard_t; -typedef uint32_t guard_lock_t; -static const uint32_t LOCKED = static_cast(1) << 31; +static const uint32_t LOCKED = ((guard_t)1) << 31; static const uint32_t INITIALISED = 1; -#define LOCK_PART(guard) (guard) -#define INIT_PART(guard) (guard) -#elif defined(_LP64) +#else typedef uint64_t guard_t; -typedef uint64_t guard_lock_t; # if defined(__LITTLE_ENDIAN__) -static const guard_t LOCKED = static_cast(1) << 63; +static const guard_t LOCKED = ((guard_t)1) << 63; static const guard_t INITIALISED = 1; # else static const guard_t LOCKED = 1; -static const guard_t INITIALISED = static_cast(1) << 56; -# endif -#define LOCK_PART(guard) (guard) -#define INIT_PART(guard) (guard) -#else -typedef uint32_t guard_lock_t; -# if defined(__LITTLE_ENDIAN__) -typedef struct { - uint32_t init_half; - uint32_t lock_half; -} guard_t; -static const uint32_t LOCKED = static_cast(1) << 31; -static const uint32_t INITIALISED = 1; -# else -typedef struct { - uint32_t init_half; - uint32_t lock_half; -} guard_t; -_Static_assert(sizeof(guard_t) == sizeof(uint64_t), ""); -static const uint32_t LOCKED = 1; -static const uint32_t INITIALISED = static_cast(1) << 24; +static const guard_t INITIALISED = ((guard_t)1) << 56; # endif -#define LOCK_PART(guard) (&(guard)->lock_half) -#define INIT_PART(guard) (&(guard)->init_half) #endif -static const guard_lock_t INITIAL = 0; /** * Acquires a lock on a guard, returning 0 if the object has already been @@ -117,49 +90,42 @@ static const guard_lock_t INITIAL = 0; */ extern "C" int __cxa_guard_acquire(volatile guard_t *guard_object) { - guard_lock_t old; // Not an atomic read, doesn't establish a happens-before relationship, but // if one is already established and we end up seeing an initialised state // then it's a fast path, otherwise we'll do something more expensive than // this test anyway... - if (INITIALISED == *INIT_PART(guard_object)) - return 0; + if ((INITIALISED == *guard_object)) { return 0; } // Spin trying to do the initialisation - for (;;) + while (1) { // Loop trying to move the value of the guard from 0 (not // locked, not initialised) to the locked-uninitialised // position. - old = __sync_val_compare_and_swap(LOCK_PART(guard_object), - INITIAL, LOCKED); - if (old == INITIAL) { - // Lock obtained. If lock and init bit are - // in separate words, check for init race. - if (INIT_PART(guard_object) == LOCK_PART(guard_object)) + switch (__sync_val_compare_and_swap(guard_object, 0, LOCKED)) + { + // If the old value was 0, we succeeded, so continue + // initialising + case 0: return 1; - if (INITIALISED != *INIT_PART(guard_object)) - return 1; - - // No need for a memory barrier here, - // see first comment. - *LOCK_PART(guard_object) = INITIAL; - return 0; + // If this was already initialised, return and let the caller skip + // initialising it again. + case INITIALISED: + return 0; + // If it is locked by another thread, relinquish the CPU and try + // again later. + case LOCKED: + case LOCKED | INITIALISED: + sched_yield(); + break; + // If it is some other value, then something has gone badly wrong. + // Give up. + default: + fprintf(stderr, "Invalid state detected attempting to lock static initialiser.\n"); + abort(); } - // If lock and init bit are in the same word, check again - // if we are done. - if (INIT_PART(guard_object) == LOCK_PART(guard_object) && - old == INITIALISED) - return 0; - - assert(old == LOCKED); - // Another thread holds the lock. - // If lock and init bit are in different words, check - // if we are done before yielding and looping. - if (INIT_PART(guard_object) != LOCK_PART(guard_object) && - INITIALISED == *INIT_PART(guard_object)) - return 0; - sched_yield(); } + //__builtin_unreachable(); + return 0; } /** @@ -169,8 +135,7 @@ extern "C" int __cxa_guard_acquire(volat extern "C" void __cxa_guard_abort(volatile guard_t *guard_object) { __attribute__((unused)) - bool reset = __sync_bool_compare_and_swap(LOCK_PART(guard_object), - LOCKED, INITIAL); + bool reset = __sync_bool_compare_and_swap(guard_object, LOCKED, 0); assert(reset); } /** @@ -179,15 +144,9 @@ extern "C" void __cxa_guard_abort(volati */ extern "C" void __cxa_guard_release(volatile guard_t *guard_object) { - guard_lock_t old; - if (INIT_PART(guard_object) == LOCK_PART(guard_object)) - old = LOCKED; - else - old = INITIAL; __attribute__((unused)) - bool reset = __sync_bool_compare_and_swap(INIT_PART(guard_object), - old, INITIALISED); + bool reset = __sync_bool_compare_and_swap(guard_object, LOCKED, INITIALISED); assert(reset); - if (INIT_PART(guard_object) != LOCK_PART(guard_object)) - *LOCK_PART(guard_object) = INITIAL; } + + Modified: stable/9/contrib/libcxxrt/stdexcept.cc ============================================================================== --- stable/9/contrib/libcxxrt/stdexcept.cc Sun Feb 1 02:02:50 2015 (r278020) +++ stable/9/contrib/libcxxrt/stdexcept.cc Sun Feb 1 02:29:58 2015 (r278021) @@ -82,18 +82,5 @@ const char* bad_typeid::what() const thr return "std::bad_typeid"; } -bad_array_new_length::bad_array_new_length() throw() {} -bad_array_new_length::~bad_array_new_length() {} -bad_array_new_length::bad_array_new_length(const bad_array_new_length&) throw() {} -bad_array_new_length& bad_array_new_length::operator=(const bad_array_new_length&) throw() -{ - return *this; -} - -const char* bad_array_new_length::what() const throw() -{ - return "std::bad_array_new_length"; -} - } // namespace std Modified: stable/9/contrib/libcxxrt/stdexcept.h ============================================================================== --- stable/9/contrib/libcxxrt/stdexcept.h Sun Feb 1 02:02:50 2015 (r278020) +++ stable/9/contrib/libcxxrt/stdexcept.h Sun Feb 1 02:29:58 2015 (r278021) @@ -81,15 +81,6 @@ namespace std virtual const char* what() const throw(); }; - class bad_array_new_length: public bad_alloc - { - public: - bad_array_new_length() throw(); - bad_array_new_length(const bad_array_new_length&) throw(); - bad_array_new_length& operator=(const bad_array_new_length&) throw(); - virtual ~bad_array_new_length(); - virtual const char *what() const throw(); - }; } // namespace std Modified: stable/9/contrib/libcxxrt/typeinfo.cc ============================================================================== --- stable/9/contrib/libcxxrt/typeinfo.cc Sun Feb 1 02:02:50 2015 (r278020) +++ stable/9/contrib/libcxxrt/typeinfo.cc Sun Feb 1 02:29:58 2015 (r278021) @@ -96,7 +96,7 @@ extern "C" char* __cxa_demangle(const ch } if (*n < len+1) { - buf = static_cast(realloc(buf, len+1)); + buf = (char*)realloc(buf, len+1); } if (0 != buf) { Modified: stable/9/contrib/libcxxrt/unwind-arm.h ============================================================================== --- stable/9/contrib/libcxxrt/unwind-arm.h Sun Feb 1 02:02:50 2015 (r278020) +++ stable/9/contrib/libcxxrt/unwind-arm.h Sun Feb 1 02:29:58 2015 (r278021) @@ -218,6 +218,6 @@ _Unwind_Reason_Code name(_Unwind_State s break;\ }\ }\ - _Unwind_SetGR (context, 12, reinterpret_cast(exceptionObject));\ + _Unwind_SetGR (context, 12, (unsigned long)exceptionObject);\ #define CALL_PERSONALITY_FUNCTION(name) name(state,exceptionObject,context) Modified: stable/9/contrib/libcxxrt/unwind.h ============================================================================== --- stable/9/contrib/libcxxrt/unwind.h Sun Feb 1 02:02:50 2015 (r278020) +++ stable/9/contrib/libcxxrt/unwind.h Sun Feb 1 02:29:58 2015 (r278021) @@ -27,7 +27,7 @@ extern "C" { #endif -#if defined(__arm__) && !defined(__ARM_DWARF_EH__) +#ifdef __arm__ #include "unwind-arm.h" #else #include "unwind-itanium.h" Modified: stable/9/lib/libcxxrt/Version.map ============================================================================== --- stable/9/lib/libcxxrt/Version.map Sun Feb 1 02:02:50 2015 (r278020) +++ stable/9/lib/libcxxrt/Version.map Sun Feb 1 02:29:58 2015 (r278021) @@ -26,7 +26,6 @@ CXXABI_1.3 { __cxa_pure_virtual; __cxa_rethrow; __cxa_throw; - __cxa_throw_bad_array_new_length; __cxa_type_match; __cxa_vec_cctor; __cxa_vec_cleanup; @@ -274,9 +273,6 @@ CXXRT_1.0 { "std::bad_alloc::bad_alloc(std::bad_alloc const&)"; "std::bad_alloc::bad_alloc()"; "std::bad_alloc::operator=(std::bad_alloc const&)"; - "std::bad_array_new_length::bad_array_new_length(std::bad_array_new_length const&)"; - "std::bad_array_new_length::bad_array_new_length()"; - "std::bad_array_new_length::operator=(std::bad_array_new_length const&)"; }; __cxa_allocate_dependent_exception; @@ -311,7 +307,6 @@ GLIBCXX_3.4 { "std::bad_typeid::~bad_typeid()"; "std::exception::~exception()"; "std::bad_alloc::~bad_alloc()"; - "std::bad_array_new_length::~bad_array_new_length()"; "std::exception::what() const"; @@ -325,20 +320,17 @@ GLIBCXX_3.4 { "vtable for std::bad_typeid"; "vtable for std::exception"; "vtable for std::type_info"; - "vtable for std::bad_array_new_length"; "typeinfo for std::bad_alloc"; "typeinfo for std::bad_typeid"; "typeinfo for std::bad_cast"; "typeinfo for std::exception"; "typeinfo for std::type_info"; - "typeinfo for std::bad_array_new_length"; "typeinfo name for std::bad_alloc"; "typeinfo name for std::bad_typeid"; "typeinfo name for std::bad_cast"; "typeinfo name for std::exception"; "typeinfo name for std::type_info"; - "typeinfo name for std::bad_array_new_length"; }; }; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sun Feb 1 02:30:07 2015 Return-Path: Delivered-To: svn-src-stable@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 3B84DAFD; Sun, 1 Feb 2015 02:30:07 +0000 (UTC) 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 1FEF2A44; Sun, 1 Feb 2015 02:30:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t112U7EQ054424; Sun, 1 Feb 2015 02:30:07 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t112U3rb054158; Sun, 1 Feb 2015 02:30:03 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502010230.t112U3rb054158@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 1 Feb 2015 02:30: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: r278021 - in stable: 10/contrib/libc++/src 10/contrib/libcxxrt 10/lib/libcxxrt 9/contrib/libc++/src 9/contrib/libcxxrt 9/lib/libcxxrt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Feb 2015 02:30:07 -0000 Author: dim Date: Sun Feb 1 02:29:58 2015 New Revision: 278021 URL: https://svnweb.freebsd.org/changeset/base/278021 Log: Revert r278017 (MFC of r273381 and r276417) and r278018 (MFC of r273434) until I can figure out why it leads to link failures in some scenarios. Modified: stable/10/contrib/libc++/src/new.cpp stable/10/contrib/libcxxrt/atomic.h stable/10/contrib/libcxxrt/auxhelper.cc stable/10/contrib/libcxxrt/cxxabi.h stable/10/contrib/libcxxrt/dwarf_eh.h stable/10/contrib/libcxxrt/dynamic_cast.cc stable/10/contrib/libcxxrt/exception.cc stable/10/contrib/libcxxrt/guard.cc stable/10/contrib/libcxxrt/stdexcept.cc stable/10/contrib/libcxxrt/stdexcept.h stable/10/contrib/libcxxrt/typeinfo.cc stable/10/contrib/libcxxrt/unwind-arm.h stable/10/contrib/libcxxrt/unwind.h stable/10/lib/libcxxrt/Version.map Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/contrib/libc++/src/new.cpp stable/9/contrib/libcxxrt/atomic.h stable/9/contrib/libcxxrt/auxhelper.cc stable/9/contrib/libcxxrt/cxxabi.h stable/9/contrib/libcxxrt/dwarf_eh.h stable/9/contrib/libcxxrt/dynamic_cast.cc stable/9/contrib/libcxxrt/exception.cc stable/9/contrib/libcxxrt/guard.cc stable/9/contrib/libcxxrt/stdexcept.cc stable/9/contrib/libcxxrt/stdexcept.h stable/9/contrib/libcxxrt/typeinfo.cc stable/9/contrib/libcxxrt/unwind-arm.h stable/9/contrib/libcxxrt/unwind.h stable/9/lib/libcxxrt/Version.map Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/libc++/ (props changed) stable/9/contrib/libcxxrt/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libcxxrt/ (props changed) Modified: stable/10/contrib/libc++/src/new.cpp ============================================================================== --- stable/10/contrib/libc++/src/new.cpp Sun Feb 1 02:02:50 2015 (r278020) +++ stable/10/contrib/libc++/src/new.cpp Sun Feb 1 02:29:58 2015 (r278021) @@ -192,6 +192,8 @@ bad_alloc::what() const _NOEXCEPT #endif // !__GLIBCXX__ +#endif //LIBCXXRT + bad_array_new_length::bad_array_new_length() _NOEXCEPT { } @@ -200,8 +202,6 @@ bad_array_new_length::~bad_array_new_len { } -#endif //LIBCXXRT - const char* bad_array_length::what() const _NOEXCEPT { Modified: stable/10/contrib/libcxxrt/atomic.h ============================================================================== --- stable/10/contrib/libcxxrt/atomic.h Sun Feb 1 02:02:50 2015 (r278020) +++ stable/10/contrib/libcxxrt/atomic.h Sun Feb 1 02:29:58 2015 (r278021) @@ -11,7 +11,7 @@ */ #if __has_builtin(__c11_atomic_exchange) #define ATOMIC_SWAP(addr, val)\ - __c11_atomic_exchange(reinterpret_cast<_Atomic(__typeof__(val))*>(addr), val, __ATOMIC_ACQ_REL) + __c11_atomic_exchange((_Atomic(__typeof__(val))*)addr, val, __ATOMIC_ACQ_REL) #elif __has_builtin(__sync_swap) #define ATOMIC_SWAP(addr, val)\ __sync_swap(addr, val) @@ -22,7 +22,7 @@ #if __has_builtin(__c11_atomic_load) #define ATOMIC_LOAD(addr)\ - __c11_atomic_load(reinterpret_cast<_Atomic(__typeof__(*addr))*>(addr), __ATOMIC_ACQUIRE) + __c11_atomic_load((_Atomic(__typeof__(*addr))*)addr, __ATOMIC_ACQUIRE) #else #define ATOMIC_LOAD(addr)\ (__sync_synchronize(), *addr) Modified: stable/10/contrib/libcxxrt/auxhelper.cc ============================================================================== --- stable/10/contrib/libcxxrt/auxhelper.cc Sun Feb 1 02:02:50 2015 (r278020) +++ stable/10/contrib/libcxxrt/auxhelper.cc Sun Feb 1 02:29:58 2015 (r278021) @@ -75,8 +75,3 @@ extern "C" void __cxa_deleted_virtual() { abort(); } - -extern "C" void __cxa_throw_bad_array_new_length() -{ - throw std::bad_array_new_length(); -} Modified: stable/10/contrib/libcxxrt/cxxabi.h ============================================================================== --- stable/10/contrib/libcxxrt/cxxabi.h Sun Feb 1 02:02:50 2015 (r278020) +++ stable/10/contrib/libcxxrt/cxxabi.h Sun Feb 1 02:29:58 2015 (r278021) @@ -110,7 +110,7 @@ struct __cxa_exception * handler count reaches 0 (which it doesn't with the top bit set). */ int handlerCount; -#if defined(__arm__) && !defined(__ARM_DWARF_EH__) +#ifdef __arm__ /** * The ARM EH ABI requires the unwind library to keep track of exceptions * during cleanups. These support nesting, so we need to keep a list of Modified: stable/10/contrib/libcxxrt/dwarf_eh.h ============================================================================== --- stable/10/contrib/libcxxrt/dwarf_eh.h Sun Feb 1 02:02:50 2015 (r278020) +++ stable/10/contrib/libcxxrt/dwarf_eh.h Sun Feb 1 02:29:58 2015 (r278021) @@ -83,7 +83,7 @@ enum dwarf_data_encoding */ static inline enum dwarf_data_encoding get_encoding(unsigned char x) { - return static_cast(x & 0xf); + return (enum dwarf_data_encoding)(x & 0xf); } /** @@ -115,7 +115,7 @@ enum dwarf_data_relative */ static inline enum dwarf_data_relative get_base(unsigned char x) { - return static_cast(x & 0x70); + return (enum dwarf_data_relative)(x & 0x70); } /** * Returns whether an encoding represents an indirect address. @@ -206,9 +206,9 @@ static int64_t read_sleb128(dw_eh_ptr_t if ((uleb >> (bits-1)) == 1) { // Sign extend by setting all bits in front of it to 1 - uleb |= static_cast(-1) << bits; + uleb |= ((int64_t)-1) << bits; } - return static_cast(uleb); + return (int64_t)uleb; } /** * Reads a value using the specified encoding from the address pointed to by @@ -224,7 +224,7 @@ static uint64_t read_value(char encoding // Read fixed-length types #define READ(dwarf, type) \ case dwarf:\ - v = static_cast(*reinterpret_cast(*data));\ + v = (uint64_t)(*(type*)(*data));\ *data += sizeof(type);\ break; READ(DW_EH_PE_udata2, uint16_t) @@ -263,16 +263,16 @@ static uint64_t resolve_indirect_value(_ switch (get_base(encoding)) { case DW_EH_PE_pcrel: - v += reinterpret_cast(start); + v += (uint64_t)start; break; case DW_EH_PE_textrel: - v += static_cast(static_cast(_Unwind_GetTextRelBase(c))); + v += (uint64_t)_Unwind_GetTextRelBase(c); break; case DW_EH_PE_datarel: - v += static_cast(static_cast(_Unwind_GetDataRelBase(c))); + v += (uint64_t)_Unwind_GetDataRelBase(c); break; case DW_EH_PE_funcrel: - v += static_cast(static_cast(_Unwind_GetRegionStart(c))); + v += (uint64_t)_Unwind_GetRegionStart(c); default: break; } @@ -282,7 +282,7 @@ static uint64_t resolve_indirect_value(_ // be a GCC extensions, so not properly documented... if (is_indirect(encoding)) { - v = static_cast(reinterpret_cast(*reinterpret_cast(v))); + v = (uint64_t)(uintptr_t)*(void**)v; } return v; } @@ -342,14 +342,14 @@ static inline struct dwarf_eh_lsda parse { struct dwarf_eh_lsda lsda; - lsda.region_start = reinterpret_cast(_Unwind_GetRegionStart(context)); + lsda.region_start = (dw_eh_ptr_t)(uintptr_t)_Unwind_GetRegionStart(context); // If the landing pads are relative to anything other than the start of // this region, find out where. This is @LPStart in the spec, although the // encoding that GCC uses does not quite match the spec. - uint64_t v = static_cast(reinterpret_cast(lsda.region_start)); + uint64_t v = (uint64_t)(uintptr_t)lsda.region_start; read_value_with_encoding(context, &data, &v); - lsda.landing_pads = reinterpret_cast(static_cast(v)); + lsda.landing_pads = (dw_eh_ptr_t)(uintptr_t)v; // If there is a type table, find out where it is. This is @TTBase in the // spec. Note: we find whether there is a type table pointer by checking @@ -365,18 +365,18 @@ static inline struct dwarf_eh_lsda parse lsda.type_table = type_table; //lsda.type_table = (uintptr_t*)(data + v); } -#if defined(__arm__) && !defined(__ARM_DWARF_EH__) +#if __arm__ lsda.type_table_encoding = (DW_EH_PE_pcrel | DW_EH_PE_indirect); #endif - lsda.callsite_encoding = static_cast(*(data++)); + lsda.callsite_encoding = (enum dwarf_data_encoding)(*(data++)); // Action table is immediately after the call site table lsda.action_table = data; - uintptr_t callsite_size = static_cast(read_uleb128(&data)); + uintptr_t callsite_size = (uintptr_t)read_uleb128(&data); lsda.action_table = data + callsite_size; // Call site table is immediately after the header - lsda.call_site_table = static_cast(data); + lsda.call_site_table = (dw_eh_ptr_t)data; return lsda; @@ -413,7 +413,7 @@ static bool dwarf_eh_find_callsite(struc result->landing_pad = 0; // The current instruction pointer offset within the region uint64_t ip = _Unwind_GetIP(context) - _Unwind_GetRegionStart(context); - unsigned char *callsite_table = static_cast(lsda->call_site_table); + unsigned char *callsite_table = (unsigned char*)lsda->call_site_table; while (callsite_table <= lsda->action_table) { @@ -463,17 +463,17 @@ static bool dwarf_eh_find_callsite(struc /// Defines an exception class from 8 bytes (endian independent) #define EXCEPTION_CLASS(a,b,c,d,e,f,g,h) \ - ((static_cast(a) << 56) +\ - (static_cast(b) << 48) +\ - (static_cast(c) << 40) +\ - (static_cast(d) << 32) +\ - (static_cast(e) << 24) +\ - (static_cast(f) << 16) +\ - (static_cast(g) << 8) +\ - (static_cast(h))) + (((uint64_t)a << 56) +\ + ((uint64_t)b << 48) +\ + ((uint64_t)c << 40) +\ + ((uint64_t)d << 32) +\ + ((uint64_t)e << 24) +\ + ((uint64_t)f << 16) +\ + ((uint64_t)g << 8) +\ + ((uint64_t)h)) #define GENERIC_EXCEPTION_CLASS(e,f,g,h) \ - (static_cast(e) << 24) +\ - (static_cast(f) << 16) +\ - (static_cast(g) << 8) +\ - (static_cast(h)) + ((uint32_t)e << 24) +\ + ((uint32_t)f << 16) +\ + ((uint32_t)g << 8) +\ + ((uint32_t)h) Modified: stable/10/contrib/libcxxrt/dynamic_cast.cc ============================================================================== --- stable/10/contrib/libcxxrt/dynamic_cast.cc Sun Feb 1 02:02:50 2015 (r278020) +++ stable/10/contrib/libcxxrt/dynamic_cast.cc Sun Feb 1 02:29:58 2015 (r278021) @@ -44,7 +44,7 @@ struct vtable_header * Simple macro that does pointer arithmetic in bytes but returns a value of * the same type as the original. */ -#define ADD_TO_PTR(x, off) reinterpret_cast<__typeof__(x)>(reinterpret_cast(x) + off) +#define ADD_TO_PTR(x, off) (__typeof__(x))(((char*)x) + off) bool std::type_info::__do_catch(std::type_info const *ex_type, void **exception_object, @@ -166,7 +166,7 @@ bool __vmi_class_type_info::__do_upcast( if (info->isVirtual()) { // Object's vtable - ptrdiff_t *off = *static_cast(obj); + ptrdiff_t *off = *(ptrdiff_t**)obj; // Offset location in vtable off = ADD_TO_PTR(off, offset); offset = *off; @@ -202,9 +202,9 @@ extern "C" void* __dynamic_cast(const vo const __class_type_info *dst, ptrdiff_t src2dst_offset) { - const char *vtable_location = *static_cast(sub); + char *vtable_location = *(char**)sub; const vtable_header *header = - reinterpret_cast(vtable_location - sizeof(vtable_header)); - void *leaf = ADD_TO_PTR(const_cast(sub), header->leaf_offset); + (const vtable_header*)(vtable_location - sizeof(vtable_header)); + void *leaf = ADD_TO_PTR((void*)sub, header->leaf_offset); return header->type->cast_to(leaf, dst); } Modified: stable/10/contrib/libcxxrt/exception.cc ============================================================================== --- stable/10/contrib/libcxxrt/exception.cc Sun Feb 1 02:02:50 2015 (r278020) +++ stable/10/contrib/libcxxrt/exception.cc Sun Feb 1 02:29:58 2015 (r278021) @@ -71,11 +71,11 @@ static void saveLandingPad(struct _Unwin int selector, dw_eh_ptr_t landingPad) { -#if defined(__arm__) && !defined(__ARM_DWARF_EH__) +#ifdef __arm__ // On ARM, we store the saved exception in the generic part of the structure ucb->barrier_cache.sp = _Unwind_GetGR(context, 13); - ucb->barrier_cache.bitpattern[1] = static_cast(selector); - ucb->barrier_cache.bitpattern[3] = reinterpret_cast(landingPad); + ucb->barrier_cache.bitpattern[1] = (uint32_t)selector; + ucb->barrier_cache.bitpattern[3] = (uint32_t)landingPad; #endif // Cache the results for the phase 2 unwind, if we found a handler // and this is not a foreign exception. @@ -95,15 +95,15 @@ static int loadLandingPad(struct _Unwind unsigned long *selector, dw_eh_ptr_t *landingPad) { -#if defined(__arm__) && !defined(__ARM_DWARF_EH__) +#ifdef __arm__ *selector = ucb->barrier_cache.bitpattern[1]; - *landingPad = reinterpret_cast(ucb->barrier_cache.bitpattern[3]); + *landingPad = (dw_eh_ptr_t)ucb->barrier_cache.bitpattern[3]; return 1; #else if (ex) { *selector = ex->handlerSwitchValue; - *landingPad = reinterpret_cast(ex->catchTemp); + *landingPad = (dw_eh_ptr_t)ex->catchTemp; return 0; } return 0; @@ -113,7 +113,7 @@ static int loadLandingPad(struct _Unwind static inline _Unwind_Reason_Code continueUnwinding(struct _Unwind_Exception *ex, struct _Unwind_Context *context) { -#if defined(__arm__) && !defined(__ARM_DWARF_EH__) +#ifdef __arm__ if (__gnu_unwind_frame(ex, context) != _URC_OK) { return _URC_FAILURE; } #endif return _URC_CONTINUE_UNWIND; @@ -204,7 +204,7 @@ struct __cxa_dependent_exception terminate_handler terminateHandler; __cxa_exception *nextException; int handlerCount; -#if defined(__arm__) && !defined(__ARM_DWARF_EH__) +#ifdef __arm__ _Unwind_Exception *nextCleanup; int cleanupCount; #endif @@ -267,13 +267,13 @@ static bool isDependentException(uint64_ static __cxa_exception *exceptionFromPointer(void *ex) { - return reinterpret_cast<__cxa_exception*>(static_cast(ex) - + return (__cxa_exception*)((char*)ex - offsetof(struct __cxa_exception, unwindHeader)); } static __cxa_exception *realExceptionFromException(__cxa_exception *ex) { if (!isDependentException(ex->unwindHeader.exception_class)) { return ex; } - return reinterpret_cast<__cxa_exception*>((reinterpret_cast<__cxa_dependent_exception*>(ex))->primaryException)-1; + return ((__cxa_exception*)(((__cxa_dependent_exception*)ex)->primaryException))-1; } @@ -304,13 +304,13 @@ static pthread_key_t eh_key; static void exception_cleanup(_Unwind_Reason_Code reason, struct _Unwind_Exception *ex) { - __cxa_free_exception(static_cast(ex)); + __cxa_free_exception((void*)ex); } static void dependent_exception_cleanup(_Unwind_Reason_Code reason, struct _Unwind_Exception *ex) { - __cxa_free_dependent_exception(static_cast(ex)); + __cxa_free_dependent_exception((void*)ex); } /** @@ -333,13 +333,13 @@ static void free_exception_list(__cxa_ex */ static void thread_cleanup(void* thread_info) { - __cxa_thread_info *info = static_cast<__cxa_thread_info*>(thread_info); + __cxa_thread_info *info = (__cxa_thread_info*)thread_info; if (info->globals.caughtExceptions) { // If this is a foreign exception, ask it to clean itself up. if (info->foreign_exception_state != __cxa_thread_info::none) { - _Unwind_Exception *e = reinterpret_cast<_Unwind_Exception*>(info->globals.caughtExceptions); + _Unwind_Exception *e = (_Unwind_Exception*)info->globals.caughtExceptions; e->exception_cleanup(_URC_FOREIGN_EXCEPTION_CAUGHT, e); } else @@ -379,8 +379,8 @@ static void init_key(void) return; } pthread_key_create(&eh_key, thread_cleanup); - pthread_setspecific(eh_key, reinterpret_cast(0x42)); - fakeTLS = (pthread_getspecific(eh_key) != reinterpret_cast(0x42)); + pthread_setspecific(eh_key, (void*)0x42); + fakeTLS = (pthread_getspecific(eh_key) != (void*)0x42); pthread_setspecific(eh_key, 0); } @@ -394,10 +394,10 @@ static __cxa_thread_info *thread_info() fakeTLS = true; } if (fakeTLS) { return &singleThreadInfo; } - __cxa_thread_info *info = static_cast<__cxa_thread_info*>(pthread_getspecific(eh_key)); + __cxa_thread_info *info = (__cxa_thread_info*)pthread_getspecific(eh_key); if (0 == info) { - info = static_cast<__cxa_thread_info*>(calloc(1, sizeof(__cxa_thread_info))); + info = (__cxa_thread_info*)calloc(1, sizeof(__cxa_thread_info)); pthread_setspecific(eh_key, info); } return info; @@ -409,7 +409,7 @@ static __cxa_thread_info *thread_info() static __cxa_thread_info *thread_info_fast() { if (fakeTLS) { return &singleThreadInfo; } - return static_cast<__cxa_thread_info*>(pthread_getspecific(eh_key)); + return (__cxa_thread_info*)pthread_getspecific(eh_key); } /** * ABI function returning the __cxa_eh_globals structure. @@ -472,7 +472,7 @@ static char *emergency_malloc(size_t siz if (0 != m) { pthread_mutex_unlock(&emergency_malloc_lock); - return static_cast(m); + return (char*)m; } for (int i=0 ; i<16 ; i++) { @@ -510,7 +510,7 @@ static void emergency_malloc_free(char * // Find the buffer corresponding to this pointer. for (int i=0 ; i<16 ; i++) { - if (ptr == static_cast(emergency_buffer + (1024 * i))) + if (ptr == (void*)(emergency_buffer + (1024 * i))) { buffer = i; break; @@ -521,7 +521,7 @@ static void emergency_malloc_free(char * // emergency_malloc() is expected to return 0-initialized data. We don't // zero the buffer when allocating it, because the static buffers will // begin life containing 0 values. - memset(ptr, 0, 1024); + memset((void*)ptr, 0, 1024); // Signal the condition variable to wake up any threads that are blocking // waiting for some space in the emergency buffer pthread_mutex_lock(&emergency_malloc_lock); @@ -535,7 +535,7 @@ static void emergency_malloc_free(char * static char *alloc_or_die(size_t size) { - char *buffer = static_cast(calloc(1, size)); + char *buffer = (char*)calloc(1, size); // If calloc() doesn't want to give us any memory, try using an emergency // buffer. @@ -597,7 +597,7 @@ extern "C" void *__cxa_allocate_dependen */ extern "C" void __cxa_free_exception(void *thrown_exception) { - __cxa_exception *ex = reinterpret_cast<__cxa_exception*>(thrown_exception) - 1; + __cxa_exception *ex = ((__cxa_exception*)thrown_exception) - 1; // Free the object that was thrown, calling its destructor if (0 != ex->exceptionDestructor) { @@ -612,7 +612,7 @@ extern "C" void __cxa_free_exception(voi } } - free_exception(reinterpret_cast(ex)); + free_exception((char*)ex); } static void releaseException(__cxa_exception *exception) @@ -633,13 +633,13 @@ static void releaseException(__cxa_excep void __cxa_free_dependent_exception(void *thrown_exception) { - __cxa_dependent_exception *ex = reinterpret_cast<__cxa_dependent_exception*>(thrown_exception) - 1; + __cxa_dependent_exception *ex = ((__cxa_dependent_exception*)thrown_exception) - 1; assert(isDependentException(ex->unwindHeader.exception_class)); if (ex->primaryException) { - releaseException(realExceptionFromException(reinterpret_cast<__cxa_exception*>(ex))); + releaseException(realExceptionFromException((__cxa_exception*)ex)); } - free_exception(reinterpret_cast(ex)); + free_exception((char*)ex); } /** @@ -654,8 +654,8 @@ static _Unwind_Reason_Code trace(struct { Dl_info myinfo; int mylookup = - dladdr(reinterpret_cast(__cxa_current_exception_type), &myinfo); - void *ip = reinterpret_cast(_Unwind_GetIP(context)); + dladdr((void*)(uintptr_t)__cxa_current_exception_type, &myinfo); + void *ip = (void*)_Unwind_GetIP(context); Dl_info info; if (dladdr(ip, &info) != 0) { @@ -673,11 +673,6 @@ static _Unwind_Reason_Code trace(struct * If the failure happened by falling off the end of the stack without finding * a handler, prints a back trace before aborting. */ -#if __GNUC__ > 3 && __GNUC_MINOR__ > 2 -extern "C" void *__cxa_begin_catch(void *e) throw(); -#else -extern "C" void *__cxa_begin_catch(void *e); -#endif static void report_failure(_Unwind_Reason_Code err, __cxa_exception *thrown_exception) { switch (err) @@ -686,16 +681,14 @@ static void report_failure(_Unwind_Reaso case _URC_FATAL_PHASE1_ERROR: fprintf(stderr, "Fatal error during phase 1 unwinding\n"); break; -#if !defined(__arm__) || defined(__ARM_DWARF_EH__) +#ifndef __arm__ case _URC_FATAL_PHASE2_ERROR: fprintf(stderr, "Fatal error during phase 2 unwinding\n"); break; #endif case _URC_END_OF_STACK: - __cxa_begin_catch (&(thrown_exception->unwindHeader)); - std::terminate(); fprintf(stderr, "Terminating due to uncaught exception %p", - static_cast(thrown_exception)); + (void*)thrown_exception); thrown_exception = realExceptionFromException(thrown_exception); static const __class_type_info *e_ti = static_cast(&typeid(std::exception)); @@ -704,8 +697,8 @@ static void report_failure(_Unwind_Reaso if (throw_ti) { std::exception *e = - static_cast(e_ti->cast_to(static_cast(thrown_exception+1), - throw_ti)); + (std::exception*)e_ti->cast_to((void*)(thrown_exception+1), + throw_ti); if (e) { fprintf(stderr, " '%s'", e->what()); @@ -713,21 +706,18 @@ static void report_failure(_Unwind_Reaso } size_t bufferSize = 128; - char *demangled = static_cast(malloc(bufferSize)); + char *demangled = (char*)malloc(bufferSize); const char *mangled = thrown_exception->exceptionType->name(); int status; demangled = __cxa_demangle(mangled, demangled, &bufferSize, &status); fprintf(stderr, " of type %s\n", - status == 0 ? demangled : mangled); + status == 0 ? (const char*)demangled : mangled); if (status == 0) { free(demangled); } // Print a back trace if no handler is found. // TODO: Make this optional #ifndef __arm__ _Unwind_Backtrace(trace, 0); #endif - - // Just abort. No need to call std::terminate for the second time - abort(); break; } std::terminate(); @@ -765,7 +755,7 @@ extern "C" void __cxa_throw(void *thrown std::type_info *tinfo, void(*dest)(void*)) { - __cxa_exception *ex = reinterpret_cast<__cxa_exception*>(thrown_exception) - 1; + __cxa_exception *ex = ((__cxa_exception*)thrown_exception) - 1; ex->referenceCount = 1; ex->exceptionType = tinfo; @@ -783,7 +773,7 @@ extern "C" void __cxa_rethrow_primary_ex if (NULL == thrown_exception) { return; } __cxa_exception *original = exceptionFromPointer(thrown_exception); - __cxa_dependent_exception *ex = reinterpret_cast<__cxa_dependent_exception*>(__cxa_allocate_dependent_exception())-1; + __cxa_dependent_exception *ex = ((__cxa_dependent_exception*)__cxa_allocate_dependent_exception())-1; ex->primaryException = thrown_exception; __cxa_increment_exception_refcount(thrown_exception); @@ -792,7 +782,7 @@ extern "C" void __cxa_rethrow_primary_ex ex->unwindHeader.exception_class = dependent_exception_class; ex->unwindHeader.exception_cleanup = dependent_exception_cleanup; - throw_exception(reinterpret_cast<__cxa_exception*>(ex)); + throw_exception((__cxa_exception*)ex); } extern "C" void *__cxa_current_primary_exception(void) @@ -809,14 +799,14 @@ extern "C" void *__cxa_current_primary_e extern "C" void __cxa_increment_exception_refcount(void* thrown_exception) { if (NULL == thrown_exception) { return; } - __cxa_exception *ex = static_cast<__cxa_exception*>(thrown_exception) - 1; + __cxa_exception *ex = ((__cxa_exception*)thrown_exception) - 1; if (isDependentException(ex->unwindHeader.exception_class)) { return; } __sync_fetch_and_add(&ex->referenceCount, 1); } extern "C" void __cxa_decrement_exception_refcount(void* thrown_exception) { if (NULL == thrown_exception) { return; } - __cxa_exception *ex = static_cast<__cxa_exception*>(thrown_exception) - 1; + __cxa_exception *ex = ((__cxa_exception*)thrown_exception) - 1; releaseException(ex); } @@ -848,7 +838,7 @@ extern "C" void __cxa_rethrow() if (ti->foreign_exception_state != __cxa_thread_info::none) { ti->foreign_exception_state = __cxa_thread_info::rethrown; - _Unwind_Exception *e = reinterpret_cast<_Unwind_Exception*>(ex); + _Unwind_Exception *e = (_Unwind_Exception*)ex; _Unwind_Reason_Code err = _Unwind_Resume_or_Rethrow(e); report_failure(err, ex); return; @@ -891,8 +881,8 @@ static std::type_info *get_type_info_ent if (offset == 0) { return 0; } // ...so we need to resolve it - return reinterpret_cast(resolve_indirect_value(context, - lsda->type_table_encoding, offset, start)); + return (std::type_info*)resolve_indirect_value(context, + lsda->type_table_encoding, offset, start); } @@ -906,13 +896,13 @@ static bool check_type_signature(__cxa_e const std::type_info *type, void *&adjustedPtr) { - void *exception_ptr = static_cast(ex+1); + void *exception_ptr = (void*)(ex+1); const std::type_info *ex_type = ex ? ex->exceptionType : 0; bool is_ptr = ex ? ex_type->__is_pointer_p() : false; if (is_ptr) { - exception_ptr = *static_cast(exception_ptr); + exception_ptr = *(void**)exception_ptr; } // Always match a catchall, even with a foreign exception // @@ -984,7 +974,7 @@ static handler_type check_action_record( { bool matched = false; *selector = filter; -#if defined(__arm__) && !defined(__ARM_DWARF_EH__) +#ifdef __arm__ filter++; std::type_info *handler_type = get_type_info_entry(context, lsda, filter--); while (handler_type) @@ -997,7 +987,7 @@ static handler_type check_action_record( handler_type = get_type_info_entry(context, lsda, filter--); } #else - unsigned char *type_index = reinterpret_cast(lsda->type_table) - filter - 1; + unsigned char *type_index = ((unsigned char*)lsda->type_table - filter - 1); while (*type_index) { std::type_info *handler_type = get_type_info_entry(context, lsda, *(type_index++)); @@ -1029,7 +1019,7 @@ static handler_type check_action_record( static void pushCleanupException(_Unwind_Exception *exceptionObject, __cxa_exception *ex) { -#if defined(__arm__) && !defined(__ARM_DWARF_EH__) +#ifdef __arm__ __cxa_thread_info *info = thread_info_fast(); if (ex) { @@ -1074,13 +1064,8 @@ BEGIN_PERSONALITY_FUNCTION(__gxx_persona realEx = realExceptionFromException(ex); } -#if defined(__arm__) && !defined(__ARM_DWARF_EH__) - unsigned char *lsda_addr = - static_cast(_Unwind_GetLanguageSpecificData(context)); -#else unsigned char *lsda_addr = - reinterpret_cast(static_cast(_Unwind_GetLanguageSpecificData(context))); -#endif + (unsigned char*)_Unwind_GetLanguageSpecificData(context); // No LSDA implies no landing pads - try the next frame if (0 == lsda_addr) { return continueUnwinding(exceptionObject, context); } @@ -1129,8 +1114,8 @@ BEGIN_PERSONALITY_FUNCTION(__gxx_persona if (ex) { saveLandingPad(context, exceptionObject, ex, selector, action.landing_pad); - ex->languageSpecificData = reinterpret_cast(lsda_addr); - ex->actionRecord = reinterpret_cast(action.action_record); + ex->languageSpecificData = (const char*)lsda_addr; + ex->actionRecord = (const char*)action.action_record; // ex->adjustedPtr is set when finding the action record. } return _URC_HANDLER_FOUND; @@ -1176,9 +1161,9 @@ BEGIN_PERSONALITY_FUNCTION(__gxx_persona } - _Unwind_SetIP(context, reinterpret_cast(action.landing_pad)); + _Unwind_SetIP(context, (unsigned long)action.landing_pad); _Unwind_SetGR(context, __builtin_eh_return_data_regno(0), - reinterpret_cast(exceptionObject)); + (unsigned long)exceptionObject); _Unwind_SetGR(context, __builtin_eh_return_data_regno(1), selector); return _URC_INSTALL_CONTEXT; @@ -1202,7 +1187,7 @@ extern "C" void *__cxa_begin_catch(void __cxa_thread_info *ti = thread_info(); __cxa_eh_globals *globals = &ti->globals; globals->uncaughtExceptions--; - _Unwind_Exception *exceptionObject = static_cast<_Unwind_Exception*>(e); + _Unwind_Exception *exceptionObject = (_Unwind_Exception*)e; if (isCXXException(exceptionObject->exception_class)) { @@ -1256,12 +1241,12 @@ extern "C" void *__cxa_begin_catch(void { std::terminate(); } - globals->caughtExceptions = reinterpret_cast<__cxa_exception*>(exceptionObject); + globals->caughtExceptions = (__cxa_exception*)exceptionObject; ti->foreign_exception_state = __cxa_thread_info::caught; } // exceptionObject is the pointer to the _Unwind_Exception within the // __cxa_exception. The throw object is after this - return (reinterpret_cast(exceptionObject) + sizeof(_Unwind_Exception)); + return ((char*)exceptionObject + sizeof(_Unwind_Exception)); } @@ -1285,7 +1270,7 @@ extern "C" void __cxa_end_catch() globals->caughtExceptions = 0; if (ti->foreign_exception_state != __cxa_thread_info::rethrown) { - _Unwind_Exception *e = reinterpret_cast<_Unwind_Exception*>(ti->globals.caughtExceptions); + _Unwind_Exception *e = (_Unwind_Exception*)ti->globals.caughtExceptions; e->exception_cleanup(_URC_FOREIGN_EXCEPTION_CAUGHT, e); } ti->foreign_exception_state = __cxa_thread_info::none; @@ -1347,7 +1332,7 @@ extern "C" std::type_info *__cxa_current */ extern "C" void __cxa_call_unexpected(void*exception) { - _Unwind_Exception *exceptionObject = static_cast<_Unwind_Exception*>(exception); + _Unwind_Exception *exceptionObject = (_Unwind_Exception*)exception; if (exceptionObject->exception_class == exception_class) { __cxa_exception *ex = exceptionFromPointer(exceptionObject); @@ -1498,7 +1483,7 @@ namespace std return ATOMIC_LOAD(&terminateHandler); } } -#if defined(__arm__) && !defined(__ARM_DWARF_EH__) +#ifdef __arm__ extern "C" _Unwind_Exception *__cxa_get_cleanup(void) { __cxa_thread_info *info = thread_info_fast(); Modified: stable/10/contrib/libcxxrt/guard.cc ============================================================================== --- stable/10/contrib/libcxxrt/guard.cc Sun Feb 1 02:02:50 2015 (r278020) +++ stable/10/contrib/libcxxrt/guard.cc Sun Feb 1 02:29:58 2015 (r278021) @@ -70,45 +70,18 @@ #ifdef __arm__ // ARM ABI - 32-bit guards. typedef uint32_t guard_t; -typedef uint32_t guard_lock_t; -static const uint32_t LOCKED = static_cast(1) << 31; +static const uint32_t LOCKED = ((guard_t)1) << 31; static const uint32_t INITIALISED = 1; -#define LOCK_PART(guard) (guard) -#define INIT_PART(guard) (guard) -#elif defined(_LP64) +#else typedef uint64_t guard_t; -typedef uint64_t guard_lock_t; # if defined(__LITTLE_ENDIAN__) -static const guard_t LOCKED = static_cast(1) << 63; +static const guard_t LOCKED = ((guard_t)1) << 63; static const guard_t INITIALISED = 1; # else static const guard_t LOCKED = 1; -static const guard_t INITIALISED = static_cast(1) << 56; -# endif -#define LOCK_PART(guard) (guard) -#define INIT_PART(guard) (guard) -#else -typedef uint32_t guard_lock_t; -# if defined(__LITTLE_ENDIAN__) -typedef struct { - uint32_t init_half; - uint32_t lock_half; -} guard_t; -static const uint32_t LOCKED = static_cast(1) << 31; -static const uint32_t INITIALISED = 1; -# else -typedef struct { - uint32_t init_half; - uint32_t lock_half; -} guard_t; -_Static_assert(sizeof(guard_t) == sizeof(uint64_t), ""); -static const uint32_t LOCKED = 1; -static const uint32_t INITIALISED = static_cast(1) << 24; +static const guard_t INITIALISED = ((guard_t)1) << 56; # endif -#define LOCK_PART(guard) (&(guard)->lock_half) -#define INIT_PART(guard) (&(guard)->init_half) #endif -static const guard_lock_t INITIAL = 0; /** * Acquires a lock on a guard, returning 0 if the object has already been @@ -117,49 +90,42 @@ static const guard_lock_t INITIAL = 0; */ extern "C" int __cxa_guard_acquire(volatile guard_t *guard_object) { - guard_lock_t old; // Not an atomic read, doesn't establish a happens-before relationship, but // if one is already established and we end up seeing an initialised state // then it's a fast path, otherwise we'll do something more expensive than // this test anyway... - if (INITIALISED == *INIT_PART(guard_object)) - return 0; + if ((INITIALISED == *guard_object)) { return 0; } // Spin trying to do the initialisation - for (;;) + while (1) { // Loop trying to move the value of the guard from 0 (not // locked, not initialised) to the locked-uninitialised // position. - old = __sync_val_compare_and_swap(LOCK_PART(guard_object), - INITIAL, LOCKED); - if (old == INITIAL) { - // Lock obtained. If lock and init bit are - // in separate words, check for init race. - if (INIT_PART(guard_object) == LOCK_PART(guard_object)) + switch (__sync_val_compare_and_swap(guard_object, 0, LOCKED)) + { + // If the old value was 0, we succeeded, so continue + // initialising + case 0: return 1; - if (INITIALISED != *INIT_PART(guard_object)) - return 1; - - // No need for a memory barrier here, - // see first comment. - *LOCK_PART(guard_object) = INITIAL; - return 0; + // If this was already initialised, return and let the caller skip + // initialising it again. + case INITIALISED: + return 0; + // If it is locked by another thread, relinquish the CPU and try + // again later. + case LOCKED: + case LOCKED | INITIALISED: + sched_yield(); + break; + // If it is some other value, then something has gone badly wrong. + // Give up. + default: + fprintf(stderr, "Invalid state detected attempting to lock static initialiser.\n"); + abort(); } - // If lock and init bit are in the same word, check again - // if we are done. - if (INIT_PART(guard_object) == LOCK_PART(guard_object) && - old == INITIALISED) - return 0; - - assert(old == LOCKED); - // Another thread holds the lock. - // If lock and init bit are in different words, check - // if we are done before yielding and looping. - if (INIT_PART(guard_object) != LOCK_PART(guard_object) && - INITIALISED == *INIT_PART(guard_object)) - return 0; - sched_yield(); } + //__builtin_unreachable(); + return 0; } /** @@ -169,8 +135,7 @@ extern "C" int __cxa_guard_acquire(volat extern "C" void __cxa_guard_abort(volatile guard_t *guard_object) { __attribute__((unused)) - bool reset = __sync_bool_compare_and_swap(LOCK_PART(guard_object), - LOCKED, INITIAL); + bool reset = __sync_bool_compare_and_swap(guard_object, LOCKED, 0); assert(reset); } /** @@ -179,15 +144,9 @@ extern "C" void __cxa_guard_abort(volati */ extern "C" void __cxa_guard_release(volatile guard_t *guard_object) { - guard_lock_t old; - if (INIT_PART(guard_object) == LOCK_PART(guard_object)) - old = LOCKED; - else - old = INITIAL; __attribute__((unused)) - bool reset = __sync_bool_compare_and_swap(INIT_PART(guard_object), - old, INITIALISED); + bool reset = __sync_bool_compare_and_swap(guard_object, LOCKED, INITIALISED); assert(reset); - if (INIT_PART(guard_object) != LOCK_PART(guard_object)) - *LOCK_PART(guard_object) = INITIAL; } + + Modified: stable/10/contrib/libcxxrt/stdexcept.cc ============================================================================== --- stable/10/contrib/libcxxrt/stdexcept.cc Sun Feb 1 02:02:50 2015 (r278020) +++ stable/10/contrib/libcxxrt/stdexcept.cc Sun Feb 1 02:29:58 2015 (r278021) @@ -82,18 +82,5 @@ const char* bad_typeid::what() const thr return "std::bad_typeid"; } -bad_array_new_length::bad_array_new_length() throw() {} -bad_array_new_length::~bad_array_new_length() {} -bad_array_new_length::bad_array_new_length(const bad_array_new_length&) throw() {} -bad_array_new_length& bad_array_new_length::operator=(const bad_array_new_length&) throw() -{ - return *this; -} - -const char* bad_array_new_length::what() const throw() -{ - return "std::bad_array_new_length"; -} - } // namespace std Modified: stable/10/contrib/libcxxrt/stdexcept.h ============================================================================== --- stable/10/contrib/libcxxrt/stdexcept.h Sun Feb 1 02:02:50 2015 (r278020) +++ stable/10/contrib/libcxxrt/stdexcept.h Sun Feb 1 02:29:58 2015 (r278021) @@ -81,15 +81,6 @@ namespace std virtual const char* what() const throw(); }; - class bad_array_new_length: public bad_alloc - { - public: - bad_array_new_length() throw(); - bad_array_new_length(const bad_array_new_length&) throw(); - bad_array_new_length& operator=(const bad_array_new_length&) throw(); - virtual ~bad_array_new_length(); - virtual const char *what() const throw(); - }; } // namespace std Modified: stable/10/contrib/libcxxrt/typeinfo.cc ============================================================================== --- stable/10/contrib/libcxxrt/typeinfo.cc Sun Feb 1 02:02:50 2015 (r278020) +++ stable/10/contrib/libcxxrt/typeinfo.cc Sun Feb 1 02:29:58 2015 (r278021) @@ -96,7 +96,7 @@ extern "C" char* __cxa_demangle(const ch } if (*n < len+1) { - buf = static_cast(realloc(buf, len+1)); + buf = (char*)realloc(buf, len+1); } if (0 != buf) { Modified: stable/10/contrib/libcxxrt/unwind-arm.h ============================================================================== --- stable/10/contrib/libcxxrt/unwind-arm.h Sun Feb 1 02:02:50 2015 (r278020) +++ stable/10/contrib/libcxxrt/unwind-arm.h Sun Feb 1 02:29:58 2015 (r278021) @@ -218,6 +218,6 @@ _Unwind_Reason_Code name(_Unwind_State s break;\ }\ }\ - _Unwind_SetGR (context, 12, reinterpret_cast(exceptionObject));\ + _Unwind_SetGR (context, 12, (unsigned long)exceptionObject);\ #define CALL_PERSONALITY_FUNCTION(name) name(state,exceptionObject,context) Modified: stable/10/contrib/libcxxrt/unwind.h ============================================================================== --- stable/10/contrib/libcxxrt/unwind.h Sun Feb 1 02:02:50 2015 (r278020) +++ stable/10/contrib/libcxxrt/unwind.h Sun Feb 1 02:29:58 2015 (r278021) @@ -27,7 +27,7 @@ extern "C" { #endif -#if defined(__arm__) && !defined(__ARM_DWARF_EH__) +#ifdef __arm__ #include "unwind-arm.h" #else #include "unwind-itanium.h" Modified: stable/10/lib/libcxxrt/Version.map ============================================================================== --- stable/10/lib/libcxxrt/Version.map Sun Feb 1 02:02:50 2015 (r278020) +++ stable/10/lib/libcxxrt/Version.map Sun Feb 1 02:29:58 2015 (r278021) @@ -26,7 +26,6 @@ CXXABI_1.3 { __cxa_pure_virtual; __cxa_rethrow; __cxa_throw; - __cxa_throw_bad_array_new_length; __cxa_type_match; __cxa_vec_cctor; __cxa_vec_cleanup; @@ -274,9 +273,6 @@ CXXRT_1.0 { "std::bad_alloc::bad_alloc(std::bad_alloc const&)"; "std::bad_alloc::bad_alloc()"; "std::bad_alloc::operator=(std::bad_alloc const&)"; - "std::bad_array_new_length::bad_array_new_length(std::bad_array_new_length const&)"; - "std::bad_array_new_length::bad_array_new_length()"; - "std::bad_array_new_length::operator=(std::bad_array_new_length const&)"; }; __cxa_allocate_dependent_exception; @@ -311,7 +307,6 @@ GLIBCXX_3.4 { "std::bad_typeid::~bad_typeid()"; "std::exception::~exception()"; "std::bad_alloc::~bad_alloc()"; - "std::bad_array_new_length::~bad_array_new_length()"; "std::exception::what() const"; @@ -325,20 +320,17 @@ GLIBCXX_3.4 { "vtable for std::bad_typeid"; "vtable for std::exception"; "vtable for std::type_info"; - "vtable for std::bad_array_new_length"; "typeinfo for std::bad_alloc"; "typeinfo for std::bad_typeid"; "typeinfo for std::bad_cast"; "typeinfo for std::exception"; "typeinfo for std::type_info"; - "typeinfo for std::bad_array_new_length"; "typeinfo name for std::bad_alloc"; "typeinfo name for std::bad_typeid"; "typeinfo name for std::bad_cast"; "typeinfo name for std::exception"; "typeinfo name for std::type_info"; - "typeinfo name for std::bad_array_new_length"; }; }; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sun Feb 1 12:33:42 2015 Return-Path: Delivered-To: svn-src-stable@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 DD779503; Sun, 1 Feb 2015 12:33:41 +0000 (UTC) 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 BDC12F1F; Sun, 1 Feb 2015 12:33:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t11CXfmC058044; Sun, 1 Feb 2015 12:33:41 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t11CXft7058043; Sun, 1 Feb 2015 12:33:41 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201502011233.t11CXft7058043@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Sun, 1 Feb 2015 12:33: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: r278027 - stable/10/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Feb 2015 12:33:42 -0000 Author: smh Date: Sun Feb 1 12:33:40 2015 New Revision: 278027 URL: https://svnweb.freebsd.org/changeset/base/278027 Log: MFC r276027: Switch zfsboot installer force 4K option to use vfs.zfs.min_auto_ashift=12 MFC r277333: Fix bsdinstall when working with geli boot disks Sponsored by: Multiplay Modified: stable/10/usr.sbin/bsdinstall/scripts/zfsboot Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/zfsboot Sun Feb 1 12:08:11 2015 (r278026) +++ stable/10/usr.sbin/bsdinstall/scripts/zfsboot Sun Feb 1 12:33:40 2015 (r278027) @@ -65,9 +65,9 @@ f_include $BSDCFG_SHARE/variable.subr : ${ZFSBOOT_VDEV_TYPE:=stripe} # -# Should we use gnop(8) to configure a transparent mapping to 4K sectors? +# Should we use sysctl(8) vfs.zfs.min_auto_ashift=12 to force 4K sectors? # -: ${ZFSBOOT_GNOP_4K_FORCE_ALIGN:=1} +: ${ZFSBOOT_FORCE_4K_SECTORS:=1} # # Should we use geli(8) to encrypt the drives? @@ -185,8 +185,6 @@ ECHO_APPEND='echo "%s" >> "%s"' GELI_ATTACH='geli attach -j - -k "%s" "%s"' GELI_DETACH_F='geli detach -f "%s"' GELI_PASSWORD_INIT='geli init -b -B "%s" -e %s -J - -K "%s" -l 256 -s 4096 "%s"' -GNOP_CREATE='gnop create -S 4096 "%s"' -GNOP_DESTROY='gnop destroy "%s"' GPART_ADD='gpart add -t %s "%s"' GPART_ADD_INDEX='gpart add -i %s -t %s "%s"' GPART_ADD_INDEX_WITH_SIZE='gpart add -i %s -t %s -s %s "%s"' @@ -205,6 +203,7 @@ PRINTF_CONF="printf '%s=\"%%s\"\\\n' %s PRINTF_FSTAB='printf "$FSTAB_FMT" "%s" "%s" "%s" "%s" "%s" "%s" >> "%s"' SHELL_TRUNCATE=':> "%s"' SWAP_GMIRROR_LABEL='gmirror label swap %s' +SYSCTL_ZFS_MIN_ASHIFT_12='sysctl vfs.zfs.min_auto_ashift=12' UMOUNT='umount "%s"' ZFS_CREATE_WITH_OPTIONS='zfs create %s "%s"' ZFS_SET='zfs set "%s" "%s"' @@ -236,7 +235,7 @@ msg_encrypt_disks="Encrypt Disks?" msg_encrypt_disks_help="Use geli(8) to encrypt all data partitions" msg_error="Error" msg_force_4k_sectors="Force 4K Sectors?" -msg_force_4k_sectors_help="Use gnop(8) to configure forced 4K sector alignment" +msg_force_4k_sectors_help="Use sysctl(8) vfs.zfs.min_auto_ashift=12 to force 4K sectors" msg_freebsd_installer="FreeBSD Installer" msg_geli_password="Enter a strong passphrase, used to protect your encryption keys. You will be required to enter this passphrase each time the system is booted" msg_geli_setup="Initializing encryption on selected disks,\n this will take several seconds per disk" @@ -315,7 +314,7 @@ dialog_menu_main() local usegeli="$msg_no" local swapgeli="$msg_no" local swapmirror="$msg_no" - [ "$ZFSBOOT_GNOP_4K_FORCE_ALIGN" ] && force4k="$msg_yes" + [ "$ZFSBOOT_FORCE_4K_SECTORS" ] && force4k="$msg_yes" [ "$ZFSBOOT_GELI_ENCRYPTION" ] && usegeli="$msg_yes" [ "$ZFSBOOT_SWAP_ENCRYPTION" ] && swapgeli="$msg_yes" [ "$ZFSBOOT_SWAP_MIRROR" ] && swapmirror="$msg_yes" @@ -1062,35 +1061,24 @@ zfs_create_boot() # Prepare the disks and build pool device list(s) # f_dprintf "$funcname: Preparing disk partitions for ZFS pool..." - [ "$ZFSBOOT_GNOP_4K_FORCE_ALIGN" ] && - f_dprintf "$funcname: With 4k alignment using gnop(8)..." + + # Force 4K sectors using vfs.zfs.min_auto_ashift=12 + if [ "$ZFSBOOT_FORCE_4K_SECTORS" ]; then + f_dprintf "$funcname: With 4K sectors..." + f_eval_catch $funcname sysctl "$SYSCTL_ZFS_MIN_ASHIFT_12" \ + || return $FAILURE + fi local n=0 for disk in $disks; do zfs_create_diskpart $disk $n || return $FAILURE # Now $bootpart, $targetpart, and $swappart are set (suffix # for $disk) - - # Forced 4k alignment support using Geom NOP (see gnop(8)) - if [ "$ZFSBOOT_GNOP_4K_FORCE_ALIGN" ]; then - if [ "$ZFSBOOT_BOOT_POOL" ]; then - boot_vdevs="$boot_vdevs $disk$bootpart.nop" - f_eval_catch $funcname gnop "$GNOP_CREATE" \ - $disk$bootpart || return $FAILURE - fi - # Don't gnop encrypted partition - if [ "$ZFSBOOT_GELI_ENCRYPTION" ]; then - zroot_vdevs="$zroot_vdevs $disk$targetpart.eli" - else - zroot_vdevs="$zroot_vdevs $disk$targetpart.nop" - f_eval_catch $funcname gnop "$GNOP_CREATE" \ - $disk$targetpart || - return $FAILURE - fi - else - if [ "$ZFSBOOT_BOOT_POOL" ]; then - boot_vdevs="$boot_vdevs $disk$bootpart" - fi - zroot_vdevs="$zroot_vdevs $disk$targetpart" + if [ "$ZFSBOOT_BOOT_POOL" ]; then + boot_vdevs="$boot_vdevs $disk$bootpart" + fi + zroot_vdevs="$zroot_vdevs $disk$targetpart" + if [ "$ZFSBOOT_GELI_ENCRYPTION" ]; then + zroot_vdevs="$zroot_vdevs.eli" fi n=$(( $n + 1 )) @@ -1266,18 +1254,6 @@ zfs_create_boot() "$bootpool_name" || return $FAILURE fi - # Destroy the gnop devices (if enabled) - for disk in ${ZFSBOOT_GNOP_4K_FORCE_ALIGN:+$disks}; do - if [ "$ZFSBOOT_BOOT_POOL" ]; then - f_eval_catch -d $funcname gnop "$GNOP_DESTROY" \ - $disk$bootpart.nop - fi - if [ ! "$ZFSBOOT_GELI_ENCRYPTION" ]; then - f_eval_catch -d $funcname gnop "$GNOP_DESTROY" \ - $disk$targetpart.nop - fi - done - # MBR boot loader touch-up if [ "$ZFSBOOT_PARTITION_SCHEME" = "MBR" ]; then f_dprintf "$funcname: Updating MBR boot loader on disks..." @@ -1541,10 +1517,10 @@ while :; do ;; ?" $msg_force_4k_sectors") # Toggle the variable referenced both by the menu and later - if [ "$ZFSBOOT_GNOP_4K_FORCE_ALIGN" ]; then - ZFSBOOT_GNOP_4K_FORCE_ALIGN= + if [ "$ZFSBOOT_FORCE_4K_SECTORS" ]; then + ZFSBOOT_FORCE_4K_SECTORS= else - ZFSBOOT_GNOP_4K_FORCE_ALIGN=1 + ZFSBOOT_FORCE_4K_SECTORS=1 fi ;; ?" $msg_encrypt_disks") @@ -1552,7 +1528,7 @@ while :; do if [ "$ZFSBOOT_GELI_ENCRYPTION" ]; then ZFSBOOT_GELI_ENCRYPTION= else - ZFSBOOT_GNOP_4K_FORCE_ALIGN=1 + ZFSBOOT_FORCE_4K_SECTORS=1 ZFSBOOT_GELI_ENCRYPTION=1 fi ;; From owner-svn-src-stable@FreeBSD.ORG Sun Feb 1 12:39:41 2015 Return-Path: Delivered-To: svn-src-stable@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 EB1C4659; Sun, 1 Feb 2015 12:39:41 +0000 (UTC) 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 BBF20F37; Sun, 1 Feb 2015 12:39:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t11CdfhN058878; Sun, 1 Feb 2015 12:39:41 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t11CdfWO058877; Sun, 1 Feb 2015 12:39:41 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201502011239.t11CdfWO058877@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Sun, 1 Feb 2015 12:39: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: r278028 - 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-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Feb 2015 12:39:42 -0000 Author: smh Date: Sun Feb 1 12:39:40 2015 New Revision: 278028 URL: https://svnweb.freebsd.org/changeset/base/278028 Log: MFC r276123: Always sync the global ZFS config cache to reflect the new mosconfig MFC r277351: Clean ZFS spa config before syncing Sponsored by: Multiplay Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c Sun Feb 1 12:33:40 2015 (r278027) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c Sun Feb 1 12:39:40 2015 (r278028) @@ -140,6 +140,26 @@ out: kobj_close_file(file); } +static void +spa_config_clean(nvlist_t *nvl) +{ + nvlist_t **child; + nvlist_t *nvroot = NULL; + uint_t c, children; + + if (nvlist_lookup_nvlist_array(nvl, ZPOOL_CONFIG_CHILDREN, &child, + &children) == 0) { + for (c = 0; c < children; c++) + spa_config_clean(child[c]); + } + + if (nvlist_lookup_nvlist(nvl, ZPOOL_CONFIG_VDEV_TREE, &nvroot) == 0) + spa_config_clean(nvroot); + + nvlist_remove(nvl, ZPOOL_CONFIG_VDEV_STATS, DATA_TYPE_UINT64_ARRAY); + nvlist_remove(nvl, ZPOOL_CONFIG_SCAN_STATS, DATA_TYPE_UINT64_ARRAY); +} + static int spa_config_write(spa_config_dirent_t *dp, nvlist_t *nvl) { @@ -233,6 +253,7 @@ spa_config_sync(spa_t *target, boolean_t */ nvl = NULL; while ((spa = spa_next(spa)) != NULL) { + nvlist_t *nvroot = NULL; /* * Skip over our own pool if we're about to remove * ourselves from the spa namespace or any pool that @@ -241,7 +262,8 @@ spa_config_sync(spa_t *target, boolean_t * we don't allow them to be written to the cache file. */ if ((spa == target && removing) || - !spa_writeable(spa)) + (spa_state(spa) == POOL_STATE_ACTIVE && + !spa_writeable(spa))) continue; mutex_enter(&spa->spa_props_lock); @@ -260,6 +282,9 @@ spa_config_sync(spa_t *target, boolean_t VERIFY(nvlist_add_nvlist(nvl, spa->spa_name, spa->spa_config) == 0); mutex_exit(&spa->spa_props_lock); + + if (nvlist_lookup_nvlist(nvl, spa->spa_name, &nvroot) == 0) + spa_config_clean(nvroot); } error = spa_config_write(dp, nvl); @@ -536,8 +561,7 @@ spa_config_update(spa_t *spa, int what) /* * Update the global config cache to reflect the new mosconfig. */ - if (!spa->spa_is_root) - spa_config_sync(spa, B_FALSE, what != SPA_CONFIG_UPDATE_POOL); + spa_config_sync(spa, B_FALSE, what != SPA_CONFIG_UPDATE_POOL); if (what == SPA_CONFIG_UPDATE_POOL) spa_config_update(spa, SPA_CONFIG_UPDATE_VDEVS); From owner-svn-src-stable@FreeBSD.ORG Mon Feb 2 01:02:50 2015 Return-Path: Delivered-To: svn-src-stable@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 76D0B53F; Mon, 2 Feb 2015 01:02:50 +0000 (UTC) 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 62A60E40; Mon, 2 Feb 2015 01:02:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1212o4c018685; Mon, 2 Feb 2015 01:02:50 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1212oNs018684; Mon, 2 Feb 2015 01:02:50 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201502020102.t1212oNs018684@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 2 Feb 2015 01:02: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: r278042 - stable/10/release/tools/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2015 01:02:50 -0000 Author: gjb Date: Mon Feb 2 01:02:49 2015 New Revision: 278042 URL: https://svnweb.freebsd.org/changeset/base/278042 Log: MFC r262936: Update board definition for WANDBOARD-QUAD to match crochet. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/tools/arm/crochet-WANDBOARD-QUAD.conf Directory Properties: stable/10/ (props changed) Modified: stable/10/release/tools/arm/crochet-WANDBOARD-QUAD.conf ============================================================================== --- stable/10/release/tools/arm/crochet-WANDBOARD-QUAD.conf Mon Feb 2 00:21:34 2015 (r278041) +++ stable/10/release/tools/arm/crochet-WANDBOARD-QUAD.conf Mon Feb 2 01:02:49 2015 (r278042) @@ -5,7 +5,7 @@ # This is the configuration file for use with crochet to produce # FreeBSD WandboardQuad images. -board_setup WandboardQuad +board_setup Wandboard option ImageSize 1gb option AutoSize From owner-svn-src-stable@FreeBSD.ORG Mon Feb 2 04:54:44 2015 Return-Path: Delivered-To: svn-src-stable@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 6ECCBED5; Mon, 2 Feb 2015 04:54:44 +0000 (UTC) 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 5AE3F917; Mon, 2 Feb 2015 04:54:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t124si1C027588; Mon, 2 Feb 2015 04:54:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t124siA9027587; Mon, 2 Feb 2015 04:54:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502020454.t124siA9027587@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 2 Feb 2015 04:54: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: r278051 - stable/10/usr.bin/grep X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2015 04:54:44 -0000 Author: ngie Date: Mon Feb 2 04:54:43 2015 New Revision: 278051 URL: https://svnweb.freebsd.org/changeset/base/278051 Log: MFC r277939: r277939 (by ngie): Create MANLINKS for lzgrep, etc when MK_LZMA_SUPPORT != no Sponsored by: EMC / Isilon Storage Division Modified: stable/10/usr.bin/grep/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/grep/Makefile ============================================================================== --- stable/10/usr.bin/grep/Makefile Mon Feb 2 03:45:02 2015 (r278050) +++ stable/10/usr.bin/grep/Makefile Mon Feb 2 04:54:43 2015 (r278051) @@ -31,13 +31,7 @@ MLINKS= grep.1 egrep.1 \ grep.1 fgrep.1 \ grep.1 zgrep.1 \ grep.1 zegrep.1 \ - grep.1 zfgrep.1 \ - grep.1 xzgrep.1 \ - grep.1 xzegrep.1 \ - grep.1 xzfgrep.1 \ - grep.1 lzgrep.1 \ - grep.1 lzegrep.1 \ - grep.1 lzfgrep.1 + grep.1 zfgrep.1 .endif LDADD= -lz @@ -53,6 +47,13 @@ LINKS+= ${BINDIR}/${PROG} ${BINDIR}/xzgr ${BINDIR}/${PROG} ${BINDIR}/lzgrep \ ${BINDIR}/${PROG} ${BINDIR}/lzegrep \ ${BINDIR}/${PROG} ${BINDIR}/lzfgrep + +MLINKS+= grep.1 xzgrep.1 \ + grep.1 xzegrep.1 \ + grep.1 xzfgrep.1 \ + grep.1 lzgrep.1 \ + grep.1 lzegrep.1 \ + grep.1 lzfgrep.1 .else CFLAGS+= -DWITHOUT_LZMA .endif From owner-svn-src-stable@FreeBSD.ORG Mon Feb 2 05:17:27 2015 Return-Path: Delivered-To: svn-src-stable@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 36801BEA; Mon, 2 Feb 2015 05:17:27 +0000 (UTC) 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 2272FB56; Mon, 2 Feb 2015 05:17:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t125HRpN038342; Mon, 2 Feb 2015 05:17:27 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t125HQNl038341; Mon, 2 Feb 2015 05:17:26 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502020517.t125HQNl038341@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 2 Feb 2015 05:17: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: r278052 - stable/10/etc/rc.d X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2015 05:17:27 -0000 Author: ngie Date: Mon Feb 2 05:17:26 2015 New Revision: 278052 URL: https://svnweb.freebsd.org/changeset/base/278052 Log: MFC r271892: r271892 (by ngie): Sort the optional rc.d scripts by their knobs Sponsored by: EMC / Isilon Storage Division Modified: stable/10/etc/rc.d/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/Makefile ============================================================================== --- stable/10/etc/rc.d/Makefile Mon Feb 2 04:54:43 2015 (r278051) +++ stable/10/etc/rc.d/Makefile Mon Feb 2 05:17:26 2015 (r278052) @@ -169,6 +169,13 @@ FILES= DAEMON \ zfs \ zvol +.if ${MK_BLUETOOTH} != "no" +_bluetooth= bluetooth +_bthidd= bthidd +_hcsecd= hcsecd +_ubthidhci= ubthidhci +.endif + .if ${MK_IPX} != "no" _ipxrouted= ipxrouted .endif @@ -180,6 +187,10 @@ _kfd= kfd _kpasswdd= kpasswdd .endif +.if ${MK_NS_CACHING} != "no" +_nscd= nscd +.endif + .if ${MK_OFED} != "no" _opensm= opensm .endif @@ -188,17 +199,6 @@ _opensm= opensm _sshd= sshd .endif -.if ${MK_NS_CACHING} != "no" -_nscd= nscd -.endif - -.if ${MK_BLUETOOTH} != "no" -_bluetooth= bluetooth -_bthidd= bthidd -_hcsecd= hcsecd -_ubthidhci= ubthidhci -.endif - .if ${MK_UNBOUND} != "no" _unbound= local_unbound .endif From owner-svn-src-stable@FreeBSD.ORG Mon Feb 2 05:44:35 2015 Return-Path: Delivered-To: svn-src-stable@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 5F1D223F; Mon, 2 Feb 2015 05:44:35 +0000 (UTC) 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 4B582DBC; Mon, 2 Feb 2015 05:44:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t125iZtU052069; Mon, 2 Feb 2015 05:44:35 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t125iZRj052068; Mon, 2 Feb 2015 05:44:35 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502020544.t125iZRj052068@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 2 Feb 2015 05:44: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: r278054 - stable/10/share X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2015 05:44:35 -0000 Author: ngie Date: Mon Feb 2 05:44:34 2015 New Revision: 278054 URL: https://svnweb.freebsd.org/changeset/base/278054 Log: MFC r277666: r277666 (by ngie): Only build share/dtrace if MK_CDDL != no Sponsored by: EMC / Isilon Storage Division Modified: stable/10/share/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/Makefile ============================================================================== --- stable/10/share/Makefile Mon Feb 2 05:41:17 2015 (r278053) +++ stable/10/share/Makefile Mon Feb 2 05:44:34 2015 (r278054) @@ -8,7 +8,7 @@ SUBDIR= ${_colldef} \ ${_dict} \ ${_doc} \ - dtrace \ + ${_dtrace} \ ${_examples} \ ${_i18n} \ keys \ @@ -37,6 +37,10 @@ SUBDIR= ${_colldef} \ _snmp= snmp .endif +.if ${MK_CDDL} != "no" +_dtrace= dtrace +.endif + .if ${MK_DICT} != "no" _dict= dict .endif From owner-svn-src-stable@FreeBSD.ORG Mon Feb 2 05:46:38 2015 Return-Path: Delivered-To: svn-src-stable@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 EE810377; Mon, 2 Feb 2015 05:46:37 +0000 (UTC) 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 DA19ADCA; Mon, 2 Feb 2015 05:46:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t125kbqs052412; Mon, 2 Feb 2015 05:46:37 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t125kbOT052408; Mon, 2 Feb 2015 05:46:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502020546.t125kbOT052408@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 2 Feb 2015 05:46: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: r278055 - stable/10/sbin/rcorder X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2015 05:46:38 -0000 Author: ngie Date: Mon Feb 2 05:46:36 2015 New Revision: 278055 URL: https://svnweb.freebsd.org/changeset/base/278055 Log: MFC r277674: r277674 (by ngie): Fix building rcorder with -DDEBUG by using libutil.h instead of util.h from usr.bin/make Sponsored by: EMC / Isilon Storage Division Modified: stable/10/sbin/rcorder/Makefile stable/10/sbin/rcorder/rcorder.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/rcorder/Makefile ============================================================================== --- stable/10/sbin/rcorder/Makefile Mon Feb 2 05:44:34 2015 (r278054) +++ stable/10/sbin/rcorder/Makefile Mon Feb 2 05:46:36 2015 (r278055) @@ -8,13 +8,8 @@ MAN= rcorder.8 LDADD= -lutil DPADD= ${LIBUTIL} -# XXX hack for make's hash.[ch] -CFLAGS+= -DORDER -I. +CFLAGS+= -DORDER -SRCS+= util.h -CLEANFILES+= util.h - -util.h: - ln -sf ${.CURDIR}/../../lib/libutil/libutil.h ${.TARGET} +#CFLAGS+= -DDEBUG .include Modified: stable/10/sbin/rcorder/rcorder.c ============================================================================== --- stable/10/sbin/rcorder/rcorder.c Mon Feb 2 05:44:34 2015 (r278054) +++ stable/10/sbin/rcorder/rcorder.c Mon Feb 2 05:46:36 2015 (r278055) @@ -42,10 +42,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include -#include #include "ealloc.h" #include "sprite.h" From owner-svn-src-stable@FreeBSD.ORG Mon Feb 2 07:30:01 2015 Return-Path: Delivered-To: svn-src-stable@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 EAF12331; Mon, 2 Feb 2015 07:30:01 +0000 (UTC) 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 D6B7A9CE; Mon, 2 Feb 2015 07:30:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t127U1Ba099467; Mon, 2 Feb 2015 07:30:01 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t127U1h7099465; Mon, 2 Feb 2015 07:30:01 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502020730.t127U1h7099465@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 2 Feb 2015 07:30: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: r278058 - in stable: 10/sys/sys 9/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2015 07:30:02 -0000 Author: dim Date: Mon Feb 2 07:30:00 2015 New Revision: 278058 URL: https://svnweb.freebsd.org/changeset/base/278058 Log: MFC r277883: Ensure that lint does not pick up C11 keywords (e.g. _Noreturn), even if C11 mode is used. It does not support any C11 constructs. Modified: stable/10/sys/sys/cdefs.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/sys/cdefs.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/sys/cdefs.h ============================================================================== --- stable/10/sys/sys/cdefs.h Mon Feb 2 06:34:38 2015 (r278057) +++ stable/10/sys/sys/cdefs.h Mon Feb 2 07:30:00 2015 (r278058) @@ -250,7 +250,7 @@ * Keywords added in C11. */ -#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L +#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L || defined(lint) #if !__has_extension(c_alignas) #if (defined(__cplusplus) && __cplusplus >= 201103L) || \ From owner-svn-src-stable@FreeBSD.ORG Mon Feb 2 07:30:01 2015 Return-Path: Delivered-To: svn-src-stable@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 68C28330; Mon, 2 Feb 2015 07:30:01 +0000 (UTC) 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 53EE69CD; Mon, 2 Feb 2015 07:30:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t127U1oY099408; Mon, 2 Feb 2015 07:30:01 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t127U1sU099406; Mon, 2 Feb 2015 07:30:01 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502020730.t127U1sU099406@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 2 Feb 2015 07:30:01 +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: r278058 - in stable: 10/sys/sys 9/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-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2015 07:30:01 -0000 Author: dim Date: Mon Feb 2 07:30:00 2015 New Revision: 278058 URL: https://svnweb.freebsd.org/changeset/base/278058 Log: MFC r277883: Ensure that lint does not pick up C11 keywords (e.g. _Noreturn), even if C11 mode is used. It does not support any C11 constructs. Modified: stable/9/sys/sys/cdefs.h Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/sys/cdefs.h Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/sys/cdefs.h ============================================================================== --- stable/9/sys/sys/cdefs.h Mon Feb 2 06:34:38 2015 (r278057) +++ stable/9/sys/sys/cdefs.h Mon Feb 2 07:30:00 2015 (r278058) @@ -239,7 +239,7 @@ #define _Static_assert(e, s) static_assert(e, s) /* FIXME: change this to thread_local when clang in base supports it */ #define _Thread_local __thread -#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L +#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L && !defined(lint) /* Do nothing. They are language keywords. */ #else /* Not supported. Implement them using our versions. */ From owner-svn-src-stable@FreeBSD.ORG Mon Feb 2 07:37:26 2015 Return-Path: Delivered-To: svn-src-stable@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 654C65DE; Mon, 2 Feb 2015 07:37:26 +0000 (UTC) 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 36A8EA8B; Mon, 2 Feb 2015 07:37:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t127bQIj004026; Mon, 2 Feb 2015 07:37:26 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t127bQnV004025; Mon, 2 Feb 2015 07:37:26 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502020737.t127bQnV004025@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 2 Feb 2015 07:37: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: r278059 - in stable: 10/sys/fs/msdosfs 9/sys/fs/msdosfs 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2015 07:37:26 -0000 Author: dim Date: Mon Feb 2 07:37:25 2015 New Revision: 278059 URL: https://svnweb.freebsd.org/changeset/base/278059 Log: MFC r277898: Fix a bunch of -Wcast-qual warnings in msdosfs_conv.c, by using __DECONST. No functional change. Modified: stable/9/sys/fs/msdosfs/msdosfs_conv.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/fs/msdosfs/msdosfs_conv.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/fs/msdosfs/msdosfs_conv.c ============================================================================== --- stable/9/sys/fs/msdosfs/msdosfs_conv.c Mon Feb 2 07:30:00 2015 (r278058) +++ stable/9/sys/fs/msdosfs/msdosfs_conv.c Mon Feb 2 07:37:25 2015 (r278059) @@ -257,7 +257,7 @@ dos2unixfn(dn, un, lower, pmp) * Copy the name portion into the unix filename string. */ for (i = 8; i > 0 && *dn != ' ';) { - c = dos2unixchr(tmpbuf, (const u_char **)&dn, &i, + c = dos2unixchr(tmpbuf, __DECONST(const u_char **, &dn), &i, lower & LCASE_BASE, pmp); while (*c != '\0') { *un++ = *c++; @@ -274,8 +274,8 @@ dos2unixfn(dn, un, lower, pmp) *un++ = '.'; thislong++; for (i = 3; i > 0 && *dn != ' ';) { - c = dos2unixchr(tmpbuf, (const u_char **)&dn, &i, - lower & LCASE_EXT, pmp); + c = dos2unixchr(tmpbuf, __DECONST(const u_char **, &dn), + &i, lower & LCASE_EXT, pmp); while (*c != '\0') { *un++ = *c++; thislong++; @@ -629,7 +629,8 @@ winChkName(nbp, un, unlen, chksum, pmp) * to look up or create files in case sensitive even when * it's a long file name. */ - c1 = unix2winchr((const u_char **)&np, &len, LCASE_BASE, pmp); + c1 = unix2winchr(__DECONST(const u_char **, &np), &len, + LCASE_BASE, pmp); c2 = unix2winchr(&un, &unlen, LCASE_BASE, pmp); if (c1 != c2) return -2; @@ -947,8 +948,8 @@ win2unixchr(u_char *outbuf, u_int16_t wc ilen = 2; olen = len = 4; inp = inbuf; - msdosfs_iconv->convchr(pmp->pm_w2u, (const char **)&inp, &ilen, - (char **)&outp, &olen); + msdosfs_iconv->convchr(pmp->pm_w2u, __DECONST(const char **, + &inp), &ilen, (char **)&outp, &olen); len -= olen; /* From owner-svn-src-stable@FreeBSD.ORG Mon Feb 2 07:37:27 2015 Return-Path: Delivered-To: svn-src-stable@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 08E605DF; Mon, 2 Feb 2015 07:37:27 +0000 (UTC) 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 CE4A3A8C; Mon, 2 Feb 2015 07:37:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t127bQ6q004032; Mon, 2 Feb 2015 07:37:26 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t127bQGm004031; Mon, 2 Feb 2015 07:37:26 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502020737.t127bQGm004031@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 2 Feb 2015 07:37: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: r278059 - in stable: 10/sys/fs/msdosfs 9/sys/fs/msdosfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2015 07:37:27 -0000 Author: dim Date: Mon Feb 2 07:37:25 2015 New Revision: 278059 URL: https://svnweb.freebsd.org/changeset/base/278059 Log: MFC r277898: Fix a bunch of -Wcast-qual warnings in msdosfs_conv.c, by using __DECONST. No functional change. Modified: stable/10/sys/fs/msdosfs/msdosfs_conv.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/fs/msdosfs/msdosfs_conv.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/fs/msdosfs/msdosfs_conv.c ============================================================================== --- stable/10/sys/fs/msdosfs/msdosfs_conv.c Mon Feb 2 07:30:00 2015 (r278058) +++ stable/10/sys/fs/msdosfs/msdosfs_conv.c Mon Feb 2 07:37:25 2015 (r278059) @@ -257,7 +257,7 @@ dos2unixfn(dn, un, lower, pmp) * Copy the name portion into the unix filename string. */ for (i = 8; i > 0 && *dn != ' ';) { - c = dos2unixchr(tmpbuf, (const u_char **)&dn, &i, + c = dos2unixchr(tmpbuf, __DECONST(const u_char **, &dn), &i, lower & LCASE_BASE, pmp); while (*c != '\0') { *un++ = *c++; @@ -274,8 +274,8 @@ dos2unixfn(dn, un, lower, pmp) *un++ = '.'; thislong++; for (i = 3; i > 0 && *dn != ' ';) { - c = dos2unixchr(tmpbuf, (const u_char **)&dn, &i, - lower & LCASE_EXT, pmp); + c = dos2unixchr(tmpbuf, __DECONST(const u_char **, &dn), + &i, lower & LCASE_EXT, pmp); while (*c != '\0') { *un++ = *c++; thislong++; @@ -629,7 +629,8 @@ winChkName(nbp, un, unlen, chksum, pmp) * to look up or create files in case sensitive even when * it's a long file name. */ - c1 = unix2winchr((const u_char **)&np, &len, LCASE_BASE, pmp); + c1 = unix2winchr(__DECONST(const u_char **, &np), &len, + LCASE_BASE, pmp); c2 = unix2winchr(&un, &unlen, LCASE_BASE, pmp); if (c1 != c2) return -2; @@ -947,8 +948,8 @@ win2unixchr(u_char *outbuf, u_int16_t wc ilen = 2; olen = len = 4; inp = inbuf; - msdosfs_iconv->convchr(pmp->pm_w2u, (const char **)&inp, &ilen, - (char **)&outp, &olen); + msdosfs_iconv->convchr(pmp->pm_w2u, __DECONST(const char **, + &inp), &ilen, (char **)&outp, &olen); len -= olen; /* From owner-svn-src-stable@FreeBSD.ORG Mon Feb 2 07:42:04 2015 Return-Path: Delivered-To: svn-src-stable@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 32D3F882; Mon, 2 Feb 2015 07:42:04 +0000 (UTC) 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 1E456B40; Mon, 2 Feb 2015 07:42:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t127g3iv008081; Mon, 2 Feb 2015 07:42:03 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t127g3Ni008080; Mon, 2 Feb 2015 07:42:03 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502020742.t127g3Ni008080@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 2 Feb 2015 07:42:03 +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: r278060 - in stable: 10/sys/fs/cd9660 9/sys/fs/cd9660 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2015 07:42:04 -0000 Author: dim Date: Mon Feb 2 07:42:03 2015 New Revision: 278060 URL: https://svnweb.freebsd.org/changeset/base/278060 Log: MFC r277899: Fix a bunch of -Wcast-qual warnings in cd9660_util.c, by using __DECONST. No functional change. Modified: stable/9/sys/fs/cd9660/cd9660_util.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/fs/cd9660/cd9660_util.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/fs/cd9660/cd9660_util.c ============================================================================== --- stable/9/sys/fs/cd9660/cd9660_util.c Mon Feb 2 07:37:25 2015 (r278059) +++ stable/9/sys/fs/cd9660/cd9660_util.c Mon Feb 2 07:42:03 2015 (r278060) @@ -80,7 +80,8 @@ isochar(isofn, isoend, joliet_level, c, inbuf[2]='\0'; inp = inbuf; outp = outbuf; - cd9660_iconv->convchr(handle, (const char **)&inp, &i, &outp, &j); + cd9660_iconv->convchr(handle, __DECONST(const char **, &inp), &i, + &outp, &j); len -= j; if (clen) *clen = len; *c = '\0'; @@ -121,7 +122,8 @@ isofncmp(fn, fnlen, isofn, isolen, jolie u_char *fnend = fn + fnlen, *isoend = isofn + isolen; for (; fn < fnend; ) { - d = sgetrune(fn, fnend - fn, (char const **)&fn, flags, lhandle); + d = sgetrune(fn, fnend - fn, __DECONST(const char **, &fn), + flags, lhandle); if (isofn == isoend) return d; isofn += isochar(isofn, isoend, joliet_level, &c, NULL, flags, handle); From owner-svn-src-stable@FreeBSD.ORG Mon Feb 2 07:42:04 2015 Return-Path: Delivered-To: svn-src-stable@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 D9D3A883; Mon, 2 Feb 2015 07:42:04 +0000 (UTC) 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 C5EB8B41; Mon, 2 Feb 2015 07:42:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t127g4IM008087; Mon, 2 Feb 2015 07:42:04 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t127g4NG008086; Mon, 2 Feb 2015 07:42:04 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502020742.t127g4NG008086@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 2 Feb 2015 07:42: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: r278060 - in stable: 10/sys/fs/cd9660 9/sys/fs/cd9660 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2015 07:42:05 -0000 Author: dim Date: Mon Feb 2 07:42:03 2015 New Revision: 278060 URL: https://svnweb.freebsd.org/changeset/base/278060 Log: MFC r277899: Fix a bunch of -Wcast-qual warnings in cd9660_util.c, by using __DECONST. No functional change. Modified: stable/10/sys/fs/cd9660/cd9660_util.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/fs/cd9660/cd9660_util.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/fs/cd9660/cd9660_util.c ============================================================================== --- stable/10/sys/fs/cd9660/cd9660_util.c Mon Feb 2 07:37:25 2015 (r278059) +++ stable/10/sys/fs/cd9660/cd9660_util.c Mon Feb 2 07:42:03 2015 (r278060) @@ -80,7 +80,8 @@ isochar(isofn, isoend, joliet_level, c, inbuf[2]='\0'; inp = inbuf; outp = outbuf; - cd9660_iconv->convchr(handle, (const char **)&inp, &i, &outp, &j); + cd9660_iconv->convchr(handle, __DECONST(const char **, &inp), &i, + &outp, &j); len -= j; if (clen) *clen = len; *c = '\0'; @@ -121,7 +122,8 @@ isofncmp(fn, fnlen, isofn, isolen, jolie u_char *fnend = fn + fnlen, *isoend = isofn + isolen; for (; fn < fnend; ) { - d = sgetrune(fn, fnend - fn, (char const **)&fn, flags, lhandle); + d = sgetrune(fn, fnend - fn, __DECONST(const char **, &fn), + flags, lhandle); if (isofn == isoend) return d; isofn += isochar(isofn, isoend, joliet_level, &c, NULL, flags, handle); From owner-svn-src-stable@FreeBSD.ORG Mon Feb 2 08:04:40 2015 Return-Path: Delivered-To: svn-src-stable@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 67558FCD; Mon, 2 Feb 2015 08:04:40 +0000 (UTC) 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 483C8D34; Mon, 2 Feb 2015 08:04:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1284e1t017885; Mon, 2 Feb 2015 08:04:40 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1284dmu017879; Mon, 2 Feb 2015 08:04:39 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502020804.t1284dmu017879@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 2 Feb 2015 08:04:39 +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: r278062 - in stable/9: tools/build/make_check tools/build/options usr.bin/grep 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2015 08:04:40 -0000 Author: ngie Date: Mon Feb 2 08:04:38 2015 New Revision: 278062 URL: https://svnweb.freebsd.org/changeset/base/278062 Log: MFC r228099,r245171,r277939: r228099: - Create links to the xz and lzma versions even if BSD grep is not the default. Nor GNU nor liblzma in base provides such functionality so it may be useful. r245171: Following r226271, allow disabling lzma support with "WITHOUT_LZMA_SUPPORT". Correct r226271 which should have used WITHOUT_BZIP2_SUPPORT per r166255. Obtained from: Juniper Networks r277939: Create MANLINKS for lzgrep, etc when MK_LZMA_SUPPORT != no Sponsored by: EMC / Isilon Storage Division Added: stable/9/tools/build/options/WITHOUT_LZMA_SUPPORT - copied unchanged from r245171, head/tools/build/options/WITHOUT_LZMA_SUPPORT Modified: stable/9/tools/build/make_check/Makefile stable/9/usr.bin/grep/Makefile stable/9/usr.bin/grep/file.c Directory Properties: stable/9/ (props changed) stable/9/tools/ (props changed) stable/9/tools/build/ (props changed) stable/9/tools/build/options/ (props changed) stable/9/usr.bin/ (props changed) stable/9/usr.bin/grep/ (props changed) Modified: stable/9/tools/build/make_check/Makefile ============================================================================== --- stable/9/tools/build/make_check/Makefile Mon Feb 2 08:01:10 2015 (r278061) +++ stable/9/tools/build/make_check/Makefile Mon Feb 2 08:04:38 2015 (r278062) @@ -24,7 +24,7 @@ SMAKE= MAKEFLAGS= ${MAKE} -C ${.CURDIR} all: @echo '1..17' - @${SMAKE} C_check || { cd ${.CURDIR} ; ${MAKE} failure ; } + @${SMAKE} C_check || { ${MAKE} -C ${.CURDIR} failure ; } @echo "ok 1 - C_check # Test of -C flag existence detected no regression." @echo 1:${DATA1} 2:${DATA2} 3:${DATA3} 4:${DATA4} 5:${DATA5} | \ diff -u ${.CURDIR}/regress.variables.out - || \ Copied: stable/9/tools/build/options/WITHOUT_LZMA_SUPPORT (from r245171, head/tools/build/options/WITHOUT_LZMA_SUPPORT) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/build/options/WITHOUT_LZMA_SUPPORT Mon Feb 2 08:04:38 2015 (r278062, copy of r245171, head/tools/build/options/WITHOUT_LZMA_SUPPORT) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to build some programs without optional lzma compression support. Modified: stable/9/usr.bin/grep/Makefile ============================================================================== --- stable/9/usr.bin/grep/Makefile Mon Feb 2 08:01:10 2015 (r278061) +++ stable/9/usr.bin/grep/Makefile Mon Feb 2 08:04:38 2015 (r278062) @@ -31,15 +31,16 @@ MLINKS= grep.1 egrep.1 \ grep.1 fgrep.1 \ grep.1 zgrep.1 \ grep.1 zegrep.1 \ - grep.1 zfgrep.1 \ - grep.1 xzgrep.1 \ - grep.1 xzegrep.1 \ - grep.1 xzfgrep.1 \ - grep.1 lzgrep.1 \ - grep.1 lzegrep.1 \ - grep.1 lzfgrep.1 + grep.1 zfgrep.1 .endif +LDADD= -lz +DPADD= ${LIBZ} + +.if !defined(WITHOUT_LZMA_SUPPORT) +LDADD+= -llzma +DPADD+= ${LIBLZMA} + LINKS+= ${BINDIR}/${PROG} ${BINDIR}/xzgrep \ ${BINDIR}/${PROG} ${BINDIR}/xzegrep \ ${BINDIR}/${PROG} ${BINDIR}/xzfgrep \ @@ -47,10 +48,17 @@ LINKS+= ${BINDIR}/${PROG} ${BINDIR}/xzgr ${BINDIR}/${PROG} ${BINDIR}/lzegrep \ ${BINDIR}/${PROG} ${BINDIR}/lzfgrep -LDADD= -lz -llzma -DPADD= ${LIBZ} ${LIBLZMA} +MLINKS+= grep.1 xzgrep.1 \ + grep.1 xzegrep.1 \ + grep.1 xzfgrep.1 \ + grep.1 lzgrep.1 \ + grep.1 lzegrep.1 \ + grep.1 lzfgrep.1 +.else +CFLAGS+= -DWITHOUT_LZMA +.endif -.if !defined(WITHOUT_BZIP2) +.if !defined(WITHOUT_BZIP2_SUPPORT) LDADD+= -lbz2 DPADD+= ${LIBBZ2} Modified: stable/9/usr.bin/grep/file.c ============================================================================== --- stable/9/usr.bin/grep/file.c Mon Feb 2 08:01:10 2015 (r278061) +++ stable/9/usr.bin/grep/file.c Mon Feb 2 08:04:38 2015 (r278062) @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -50,6 +49,10 @@ __FBSDID("$FreeBSD$"); #include #include +#ifndef WITHOUT_LZMA +#include +#endif + #ifndef WITHOUT_BZIP2 #include #endif @@ -60,7 +63,9 @@ __FBSDID("$FreeBSD$"); #define LNBUFBUMP 80 static gzFile gzbufdesc; +#ifndef WITHOUT_LZMA static lzma_stream lstrm = LZMA_STREAM_INIT; +#endif #ifndef WITHOUT_BZIP2 static BZFILE* bzbufdesc; #endif @@ -116,6 +121,7 @@ grep_refill(struct file *f) nr = -1; } #endif +#ifndef WITHOUT_LZMA } else if ((filebehave == FILE_XZ) || (filebehave == FILE_LZMA)) { lzma_action action = LZMA_RUN; uint8_t in_buf[MAXBUFSIZ]; @@ -146,6 +152,7 @@ grep_refill(struct file *f) return (-1); bufrem = MAXBUFSIZ - lstrm.avail_out; return (0); +#endif /* WIHTOUT_LZMA */ } else nr = read(f->fd, buffer, MAXBUFSIZ); From owner-svn-src-stable@FreeBSD.ORG Mon Feb 2 08:05:13 2015 Return-Path: Delivered-To: svn-src-stable@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 376DC169; Mon, 2 Feb 2015 08:05:13 +0000 (UTC) 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 08A6ED3A; Mon, 2 Feb 2015 08:05:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1285CVv018040; Mon, 2 Feb 2015 08:05:12 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1285CrF018034; Mon, 2 Feb 2015 08:05:12 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502020805.t1285CrF018034@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 2 Feb 2015 08:05:12 +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: r278063 - in stable: 10/sys/libkern 9/sys/libkern 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2015 08:05:13 -0000 Author: dim Date: Mon Feb 2 08:05:11 2015 New Revision: 278063 URL: https://svnweb.freebsd.org/changeset/base/278063 Log: MFC r277901: Fix a -Wcast-qual warning in libkern's strtol(), by using __DECONST. No functional change. MFC r277903: Similar to r277901, fix more -Wcast-qual warnings in libkern's strtoq(), strtoul() and strtouq(), by using __DECONST. No functional change. Modified: stable/9/sys/libkern/strtol.c stable/9/sys/libkern/strtoq.c stable/9/sys/libkern/strtoul.c stable/9/sys/libkern/strtouq.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/libkern/strtol.c stable/10/sys/libkern/strtoq.c stable/10/sys/libkern/strtoul.c stable/10/sys/libkern/strtouq.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/libkern/strtol.c ============================================================================== --- stable/9/sys/libkern/strtol.c Mon Feb 2 08:04:38 2015 (r278062) +++ stable/9/sys/libkern/strtol.c Mon Feb 2 08:05:11 2015 (r278063) @@ -124,6 +124,6 @@ strtol(nptr, endptr, base) } else if (neg) acc = -acc; if (endptr != 0) - *((const char **)endptr) = any ? s - 1 : nptr; + *endptr = __DECONST(char *, any ? s - 1 : nptr); return (acc); } Modified: stable/9/sys/libkern/strtoq.c ============================================================================== --- stable/9/sys/libkern/strtoq.c Mon Feb 2 08:04:38 2015 (r278062) +++ stable/9/sys/libkern/strtoq.c Mon Feb 2 08:05:11 2015 (r278063) @@ -125,6 +125,6 @@ strtoq(const char *nptr, char **endptr, } else if (neg) acc = -acc; if (endptr != 0) - *((const char **)endptr) = any ? s - 1 : nptr; + *endptr = __DECONST(char *, any ? s - 1 : nptr); return (acc); } Modified: stable/9/sys/libkern/strtoul.c ============================================================================== --- stable/9/sys/libkern/strtoul.c Mon Feb 2 08:04:38 2015 (r278062) +++ stable/9/sys/libkern/strtoul.c Mon Feb 2 08:05:11 2015 (r278063) @@ -103,6 +103,6 @@ strtoul(nptr, endptr, base) } else if (neg) acc = -acc; if (endptr != 0) - *((const char **)endptr) = any ? s - 1 : nptr; + *endptr = __DECONST(char *, any ? s - 1 : nptr); return (acc); } Modified: stable/9/sys/libkern/strtouq.c ============================================================================== --- stable/9/sys/libkern/strtouq.c Mon Feb 2 08:04:38 2015 (r278062) +++ stable/9/sys/libkern/strtouq.c Mon Feb 2 08:05:11 2015 (r278063) @@ -102,6 +102,6 @@ strtouq(const char *nptr, char **endptr, } else if (neg) acc = -acc; if (endptr != 0) - *((const char **)endptr) = any ? s - 1 : nptr; + *endptr = __DECONST(char *, any ? s - 1 : nptr); return (acc); } From owner-svn-src-stable@FreeBSD.ORG Mon Feb 2 08:05:14 2015 Return-Path: Delivered-To: svn-src-stable@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 8365016A; Mon, 2 Feb 2015 08:05:14 +0000 (UTC) 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 55DCAD3B; Mon, 2 Feb 2015 08:05:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1285E2I018049; Mon, 2 Feb 2015 08:05:14 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1285Drt018045; Mon, 2 Feb 2015 08:05:13 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502020805.t1285Drt018045@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 2 Feb 2015 08:05: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: r278063 - in stable: 10/sys/libkern 9/sys/libkern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2015 08:05:14 -0000 Author: dim Date: Mon Feb 2 08:05:11 2015 New Revision: 278063 URL: https://svnweb.freebsd.org/changeset/base/278063 Log: MFC r277901: Fix a -Wcast-qual warning in libkern's strtol(), by using __DECONST. No functional change. MFC r277903: Similar to r277901, fix more -Wcast-qual warnings in libkern's strtoq(), strtoul() and strtouq(), by using __DECONST. No functional change. Modified: stable/10/sys/libkern/strtol.c stable/10/sys/libkern/strtoq.c stable/10/sys/libkern/strtoul.c stable/10/sys/libkern/strtouq.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/libkern/strtol.c stable/9/sys/libkern/strtoq.c stable/9/sys/libkern/strtoul.c stable/9/sys/libkern/strtouq.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/libkern/strtol.c ============================================================================== --- stable/10/sys/libkern/strtol.c Mon Feb 2 08:04:38 2015 (r278062) +++ stable/10/sys/libkern/strtol.c Mon Feb 2 08:05:11 2015 (r278063) @@ -124,6 +124,6 @@ strtol(nptr, endptr, base) } else if (neg) acc = -acc; if (endptr != 0) - *((const char **)endptr) = any ? s - 1 : nptr; + *endptr = __DECONST(char *, any ? s - 1 : nptr); return (acc); } Modified: stable/10/sys/libkern/strtoq.c ============================================================================== --- stable/10/sys/libkern/strtoq.c Mon Feb 2 08:04:38 2015 (r278062) +++ stable/10/sys/libkern/strtoq.c Mon Feb 2 08:05:11 2015 (r278063) @@ -125,6 +125,6 @@ strtoq(const char *nptr, char **endptr, } else if (neg) acc = -acc; if (endptr != 0) - *((const char **)endptr) = any ? s - 1 : nptr; + *endptr = __DECONST(char *, any ? s - 1 : nptr); return (acc); } Modified: stable/10/sys/libkern/strtoul.c ============================================================================== --- stable/10/sys/libkern/strtoul.c Mon Feb 2 08:04:38 2015 (r278062) +++ stable/10/sys/libkern/strtoul.c Mon Feb 2 08:05:11 2015 (r278063) @@ -103,6 +103,6 @@ strtoul(nptr, endptr, base) } else if (neg) acc = -acc; if (endptr != 0) - *((const char **)endptr) = any ? s - 1 : nptr; + *endptr = __DECONST(char *, any ? s - 1 : nptr); return (acc); } Modified: stable/10/sys/libkern/strtouq.c ============================================================================== --- stable/10/sys/libkern/strtouq.c Mon Feb 2 08:04:38 2015 (r278062) +++ stable/10/sys/libkern/strtouq.c Mon Feb 2 08:05:11 2015 (r278063) @@ -102,6 +102,6 @@ strtouq(const char *nptr, char **endptr, } else if (neg) acc = -acc; if (endptr != 0) - *((const char **)endptr) = any ? s - 1 : nptr; + *endptr = __DECONST(char *, any ? s - 1 : nptr); return (acc); } From owner-svn-src-stable@FreeBSD.ORG Mon Feb 2 08:37:46 2015 Return-Path: Delivered-To: svn-src-stable@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 45C1374D; Mon, 2 Feb 2015 08:37:46 +0000 (UTC) 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 3140377; Mon, 2 Feb 2015 08:37:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t128bkc0032132; Mon, 2 Feb 2015 08:37:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t128bjUP032127; Mon, 2 Feb 2015 08:37:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502020837.t128bjUP032127@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 2 Feb 2015 08:37: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: r278064 - stable/9/sbin/rcorder 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2015 08:37:46 -0000 Author: ngie Date: Mon Feb 2 08:37:45 2015 New Revision: 278064 URL: https://svnweb.freebsd.org/changeset/base/278064 Log: MFC r277674: r277674 (by ngie): Fix building rcorder with -DDEBUG by using libutil.h instead of util.h from usr.bin/make Sponsored by: EMC / Isilon Storage Division Modified: stable/9/sbin/rcorder/Makefile stable/9/sbin/rcorder/rcorder.c Directory Properties: stable/9/ (props changed) stable/9/sbin/ (props changed) stable/9/sbin/rcorder/ (props changed) Modified: stable/9/sbin/rcorder/Makefile ============================================================================== --- stable/9/sbin/rcorder/Makefile Mon Feb 2 08:05:11 2015 (r278063) +++ stable/9/sbin/rcorder/Makefile Mon Feb 2 08:37:45 2015 (r278064) @@ -8,13 +8,8 @@ MAN= rcorder.8 LDADD= -lutil DPADD= ${LIBUTIL} -# XXX hack for make's hash.[ch] -CFLAGS+= -DORDER -I. +CFLAGS+= -DORDER -SRCS+= util.h -CLEANFILES+= util.h - -util.h: - ln -sf ${.CURDIR}/../../lib/libutil/libutil.h ${.TARGET} +#CFLAGS+= -DDEBUG .include Modified: stable/9/sbin/rcorder/rcorder.c ============================================================================== --- stable/9/sbin/rcorder/rcorder.c Mon Feb 2 08:05:11 2015 (r278063) +++ stable/9/sbin/rcorder/rcorder.c Mon Feb 2 08:37:45 2015 (r278064) @@ -42,10 +42,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include -#include #include "ealloc.h" #include "sprite.h" From owner-svn-src-stable@FreeBSD.ORG Mon Feb 2 08:53:46 2015 Return-Path: Delivered-To: svn-src-stable@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 501439BB; Mon, 2 Feb 2015 08:53:46 +0000 (UTC) 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 3B93A2A5; Mon, 2 Feb 2015 08:53:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t128rkJp040944; Mon, 2 Feb 2015 08:53:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t128rkbG040943; Mon, 2 Feb 2015 08:53:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502020853.t128rkbG040943@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 2 Feb 2015 08:53: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: r278065 - stable/10/tools/build/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-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2015 08:53:46 -0000 Author: ngie Date: Mon Feb 2 08:53:45 2015 New Revision: 278065 URL: https://svnweb.freebsd.org/changeset/base/278065 Log: MFC r277685: r277685: Fill in some dtrace entries when MK_CDDL == no Sponsored by: EMC / Isilon Storage Division Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Mon Feb 2 08:37:45 2015 (r278064) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Mon Feb 2 08:53:45 2015 (r278065) @@ -389,9 +389,24 @@ OLD_FILES+=usr/lib32/libuutil.so OLD_LIBS+=usr/lib32/libuutil.so.2 OLD_FILES+=usr/lib32/libuutil_p.a .endif +OLD_LIBS+=lib/libdtrace.so.2 OLD_FILES+=usr/sbin/dtrace OLD_FILES+=usr/sbin/lockstat OLD_FILES+=usr/share/man/man1/dtrace.1.gz +OLD_FILES+=usr/share/dtrace/disklatency +OLD_FILES+=usr/share/dtrace/disklatencycmd +OLD_FILES+=usr/share/dtrace/hotopen +OLD_FILES+=usr/share/dtrace/nfsclienttime +OLD_FILES+=usr/share/dtrace/toolkit/execsnoop +OLD_FILES+=usr/share/dtrace/toolkit/hotkernel +OLD_FILES+=usr/share/dtrace/toolkit/hotuser +OLD_FILES+=usr/share/dtrace/toolkit/opensnoop +OLD_FILES+=usr/share/dtrace/toolkit/procsystime +OLD_FILES+=usr/share/man/man1/dtrace.1.gz +OLD_DIRS+=usr/lib/dtrace +OLD_DIRS+=usr/lib32/dtrace +OLD_DIRS+=usr/share/dtrace/toolkit +OLD_DIRS+=usr/share/dtrace .endif .if ${MK_ZFS} == no From owner-svn-src-stable@FreeBSD.ORG Mon Feb 2 09:23:19 2015 Return-Path: Delivered-To: svn-src-stable@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 838ECEDF; Mon, 2 Feb 2015 09:23:19 +0000 (UTC) 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 5559F7AE; Mon, 2 Feb 2015 09:23:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t129NJ35054979; Mon, 2 Feb 2015 09:23:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t129NIOA054977; Mon, 2 Feb 2015 09:23:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502020923.t129NIOA054977@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 2 Feb 2015 09:23:18 +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: r278066 - in stable/9: share tools/build/mk 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2015 09:23:19 -0000 Author: ngie Date: Mon Feb 2 09:23:18 2015 New Revision: 278066 URL: https://svnweb.freebsd.org/changeset/base/278066 Log: MFC r277666,r277685: r277666: Only build share/dtrace if MK_CDDL != no Sponsored by: EMC / Isilon Storage Division r277685: Fill in some dtrace entries when MK_CDDL == no Sponsored by: EMC / Isilon Storage Division Modified: stable/9/share/Makefile stable/9/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/9/ (props changed) stable/9/share/ (props changed) stable/9/tools/ (props changed) stable/9/tools/build/ (props changed) Modified: stable/9/share/Makefile ============================================================================== --- stable/9/share/Makefile Mon Feb 2 08:53:45 2015 (r278065) +++ stable/9/share/Makefile Mon Feb 2 09:23:18 2015 (r278066) @@ -8,7 +8,7 @@ SUBDIR= ${_colldef} \ ${_dict} \ ${_doc} \ - dtrace \ + ${_dtrace} \ ${_examples} \ ${_i18n} \ keys \ @@ -35,6 +35,10 @@ SUBDIR= ${_colldef} \ _snmp= snmp .endif +.if ${MK_CDDL} != "no" +_dtrace= dtrace +.endif + .if ${MK_DICT} != "no" _dict= dict .endif Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Mon Feb 2 08:53:45 2015 (r278065) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Mon Feb 2 09:23:18 2015 (r278066) @@ -587,9 +587,24 @@ OLD_FILES+=usr/lib32/libuutil.so OLD_LIBS+=usr/lib32/libuutil.so.2 OLD_FILES+=usr/lib32/libuutil_p.a .endif +OLD_LIBS+=lib/libdtrace.so.2 OLD_FILES+=usr/sbin/dtrace OLD_FILES+=usr/sbin/lockstat OLD_FILES+=usr/share/man/man1/dtrace.1.gz +OLD_FILES+=usr/share/dtrace/disklatency +OLD_FILES+=usr/share/dtrace/disklatencycmd +OLD_FILES+=usr/share/dtrace/hotopen +OLD_FILES+=usr/share/dtrace/nfsclienttime +OLD_FILES+=usr/share/dtrace/toolkit/execsnoop +OLD_FILES+=usr/share/dtrace/toolkit/hotkernel +OLD_FILES+=usr/share/dtrace/toolkit/hotuser +OLD_FILES+=usr/share/dtrace/toolkit/opensnoop +OLD_FILES+=usr/share/dtrace/toolkit/procsystime +OLD_FILES+=usr/share/man/man1/dtrace.1.gz +OLD_DIRS+=usr/lib/dtrace +OLD_DIRS+=usr/lib32/dtrace +OLD_DIRS+=usr/share/dtrace/toolkit +OLD_DIRS+=usr/share/dtrace .endif .if ${MK_ZFS} == no From owner-svn-src-stable@FreeBSD.ORG Mon Feb 2 09:24:41 2015 Return-Path: Delivered-To: svn-src-stable@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 5C742D1; Mon, 2 Feb 2015 09:24:41 +0000 (UTC) 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 47C9A7CC; Mon, 2 Feb 2015 09:24:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t129OfAn055191; Mon, 2 Feb 2015 09:24:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t129Oep0055189; Mon, 2 Feb 2015 09:24:40 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502020924.t129Oep0055189@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 2 Feb 2015 09:24: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: r278067 - in stable/10/etc: . newsyslog.conf.d X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2015 09:24:41 -0000 Author: ngie Date: Mon Feb 2 09:24:40 2015 New Revision: 278067 URL: https://svnweb.freebsd.org/changeset/base/278067 Log: MFC r277541: r277541: Add sample log rotation support for opensm Up to 7 archives of the log will be kept (just for consistency with the other log rotation rules) PR: 196788 Reviewed by: hselasky Sponsored by: EMC / Isilon Storage Division Added: stable/10/etc/newsyslog.conf.d/ - copied from r277541, head/etc/newsyslog.conf.d/ Modified: stable/10/etc/Makefile stable/10/etc/newsyslog.conf.d/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/Makefile ============================================================================== --- stable/10/etc/Makefile Mon Feb 2 09:23:18 2015 (r278066) +++ stable/10/etc/Makefile Mon Feb 2 09:24:40 2015 (r278067) @@ -3,8 +3,11 @@ .include +SUBDIR= \ + newsyslog.conf.d + .if ${MK_SENDMAIL} != "no" -SUBDIR= sendmail +SUBDIR+=sendmail .endif .if ${MK_TESTS} != "no" Modified: stable/10/etc/newsyslog.conf.d/Makefile ============================================================================== --- head/etc/newsyslog.conf.d/Makefile Thu Jan 22 23:50:47 2015 (r277541) +++ stable/10/etc/newsyslog.conf.d/Makefile Mon Feb 2 09:24:40 2015 (r278067) @@ -1,6 +1,6 @@ # $FreeBSD$ -.include +.include BINDIR= /etc/newsyslog.conf.d From owner-svn-src-stable@FreeBSD.ORG Mon Feb 2 09:56:59 2015 Return-Path: Delivered-To: svn-src-stable@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 37EF77F3; Mon, 2 Feb 2015 09:56:59 +0000 (UTC) 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 18010AA5; Mon, 2 Feb 2015 09:56:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t129uwH1069617; Mon, 2 Feb 2015 09:56:58 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t129uwp6069615; Mon, 2 Feb 2015 09:56:58 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502020956.t129uwp6069615@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 2 Feb 2015 09: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: r278068 - in stable/10: etc/rc.d tools/build/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-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2015 09:56:59 -0000 Author: ngie Date: Mon Feb 2 09:56:57 2015 New Revision: 278068 URL: https://svnweb.freebsd.org/changeset/base/278068 Log: MFC r277686,r277687: r277686: Install bsnmp rc.d script if MK_BSNMP != no Sponsored by: EMC / Isilon Storage Division r277687: Fill in entries for MK_BSNMP == no Sponsored by: EMC / Isilon Storage Division Modified: stable/10/etc/rc.d/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/Makefile ============================================================================== --- stable/10/etc/rc.d/Makefile Mon Feb 2 09:24:40 2015 (r278067) +++ stable/10/etc/rc.d/Makefile Mon Feb 2 09:56:57 2015 (r278068) @@ -27,7 +27,6 @@ FILES= DAEMON \ ${_bluetooth} \ bootparams \ bridge \ - bsnmpd \ ${_bthidd} \ ccd \ cleanvar \ @@ -176,6 +175,10 @@ _hcsecd= hcsecd _ubthidhci= ubthidhci .endif +.if ${MK_BSNMP} != "no" +FILES+= bsnmpd +.endif + .if ${MK_IPX} != "no" _ipxrouted= ipxrouted .endif Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Mon Feb 2 09:24:40 2015 (r278067) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Mon Feb 2 09:56:57 2015 (r278068) @@ -268,6 +268,99 @@ OLD_FILES+=usr/share/man/man8/sdpd.8.gz # to be filled in #.endif +.if ${MK_BSNMP} == no +OLD_FILES+=etc/snmpd.config +OLD_FILES+=etc/rc.d/bsnmpd +OLD_FILES+=usr/bin/bsnmpget +OLD_FILES+=usr/bin/bsnmpset +OLD_FILES+=usr/bin/bsnmpwalk +OLD_FILES+=usr/include/bsnmp/asn1.h +OLD_FILES+=usr/include/bsnmp/bridge_snmp.h +OLD_FILES+=usr/include/bsnmp/snmp.h +OLD_FILES+=usr/include/bsnmp/snmp_atm.h +OLD_FILES+=usr/include/bsnmp/snmp_mibII.h +OLD_FILES+=usr/include/bsnmp/snmp_netgraph.h +OLD_FILES+=usr/include/bsnmp/snmpagent.h +OLD_FILES+=usr/include/bsnmp/snmpclient.h +OLD_FILES+=usr/include/bsnmp/snmpmod.h +OLD_FILES+=usr/lib/libbsnmp.a +OLD_LIBS+=usr/lib/libbsnmp.so.6 +OLD_FILES+=usr/lib/libbsnmp_p.a +OLD_FILES+=usr/lib/libbsnmptools.a +OLD_LIBS+=usr/lib/libbsnmptools.so.0 +OLD_FILES+=usr/lib/libbsnmptools_p.a +OLD_LIBS+=usr/lib/snmp_atm.so.6 +OLD_LIBS+=usr/lib/snmp_bridge.so.6 +OLD_LIBS+=usr/lib/snmp_hast.so.6 +OLD_LIBS+=usr/lib/snmp_hostres.so.6 +OLD_LIBS+=usr/lib/snmp_lm75.so.6 +OLD_LIBS+=usr/lib/snmp_mibII.so.6 +OLD_LIBS+=usr/lib/snmp_netgraph.so.6 +OLD_LIBS+=usr/lib/snmp_pf.so.6 +OLD_LIBS+=usr/lib/snmp_target.so.6 +OLD_LIBS+=usr/lib/snmp_usm.so.6 +OLD_LIBS+=usr/lib/snmp_vacm.so.6 +OLD_LIBS+=usr/lib/snmp_wlan.so.6 +OLD_FILES+=usr/sbin/bsnmpd +OLD_FILES+=usr/sbin/gensnmptree +OLD_FILES+=usr/share/man/man1/bsnmpd.1.gz +OLD_FILES+=usr/share/man/man1/bsnmpget.1.gz +OLD_FILES+=usr/share/man/man1/bsnmpset.1.gz +OLD_FILES+=usr/share/man/man1/bsnmpwalk.1.gz +OLD_FILES+=usr/share/man/man1/gensnmptree.1.gz +OLD_FILES+=usr/share/man/man3/asn1.3.gz +OLD_FILES+=usr/share/man/man3/bsnmpagent.3.gz +OLD_FILES+=usr/share/man/man3/bsnmpclient.3.gz +OLD_FILES+=usr/share/man/man3/bsnmplib.3.gz +OLD_FILES+=usr/share/man/man3/snmp_atm.3.gz +OLD_FILES+=usr/share/man/man3/snmp_bridge.3.gz +OLD_FILES+=usr/share/man/man3/snmp_hast.3.gz +OLD_FILES+=usr/share/man/man3/snmp_hostres.3.gz +OLD_FILES+=usr/share/man/man3/snmp_lm75.3.gz +OLD_FILES+=usr/share/man/man3/snmp_mibII.3.gz +OLD_FILES+=usr/share/man/man3/snmp_netgraph.3.gz +OLD_FILES+=usr/share/man/man3/snmp_target.3.gz +OLD_FILES+=usr/share/man/man3/snmp_usm.3.gz +OLD_FILES+=usr/share/man/man3/snmp_vacm.3.gz +OLD_FILES+=usr/share/man/man3/snmp_wlan.3.gz +OLD_FILES+=usr/share/man/man3/snmpmod.3.gz +OLD_FILES+=usr/share/snmp/defs/atm_freebsd.def +OLD_FILES+=usr/share/snmp/defs/atm_tree.def +OLD_FILES+=usr/share/snmp/defs/bridge_tree.def +OLD_FILES+=usr/share/snmp/defs/hast_tree.def +OLD_FILES+=usr/share/snmp/defs/hostres_tree.def +OLD_FILES+=usr/share/snmp/defs/lm75_tree.def +OLD_FILES+=usr/share/snmp/defs/mibII_tree.def +OLD_FILES+=usr/share/snmp/defs/netgraph_tree.def +OLD_FILES+=usr/share/snmp/defs/pf_tree.def +OLD_FILES+=usr/share/snmp/defs/target_tree.def +OLD_FILES+=usr/share/snmp/defs/tree.def +OLD_FILES+=usr/share/snmp/defs/usm_tree.def +OLD_FILES+=usr/share/snmp/defs/vacm_tree.def +OLD_FILES+=usr/share/snmp/defs/wlan_tree.def +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-ATM-FREEBSD-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-ATM.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-BRIDGE-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-HAST-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-HOSTRES-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-IP-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-LM75-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-MIB2-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-NETGRAPH.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-PF-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-SNMPD.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-WIRELESS-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/BRIDGE-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/FOKUS-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/FREEBSD-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/RSTP-MIB.txt +OLD_DIRS+=usr/include/bsnmp +OLD_DIRS+=usr/share/snmp +OLD_DIRS+=usr/share/snmp/defs +OLD_DIRS+=usr/share/snmp/mibs +.endif + .if ${MK_CALENDAR} == no OLD_FILES+=etc/periodic/daily/300.calendar OLD_FILES+=usr/bin/calendar From owner-svn-src-stable@FreeBSD.ORG Mon Feb 2 10:00:46 2015 Return-Path: Delivered-To: svn-src-stable@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 5A82C976; Mon, 2 Feb 2015 10:00:46 +0000 (UTC) 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 45F0DAC9; Mon, 2 Feb 2015 10:00:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t12A0kX5070270; Mon, 2 Feb 2015 10:00:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t12A0kLL070269; Mon, 2 Feb 2015 10:00:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502021000.t12A0kLL070269@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 2 Feb 2015 10:00:46 +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: r278069 - in stable/9/etc: . newsyslog.conf.d 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2015 10:00:46 -0000 Author: ngie Date: Mon Feb 2 10:00:45 2015 New Revision: 278069 URL: https://svnweb.freebsd.org/changeset/base/278069 Log: MFC r278067: r278067: MFC r277541: r277541: Add sample log rotation support for opensm Up to 7 archives of the log will be kept (just for consistency with the other log rotation rules) PR: 196788 Reviewed by: hselasky Sponsored by: EMC / Isilon Storage Division Added: stable/9/etc/newsyslog.conf.d/ - copied from r278067, stable/10/etc/newsyslog.conf.d/ Modified: stable/9/etc/Makefile Directory Properties: stable/9/ (props changed) stable/9/etc/ (props changed) Modified: stable/9/etc/Makefile ============================================================================== --- stable/9/etc/Makefile Mon Feb 2 09:56:57 2015 (r278068) +++ stable/9/etc/Makefile Mon Feb 2 10:00:45 2015 (r278069) @@ -3,8 +3,11 @@ .include +SUBDIR= \ + newsyslog.conf.d + .if ${MK_SENDMAIL} != "no" -SUBDIR= sendmail +SUBDIR+=sendmail .endif BIN1= crontab \ From owner-svn-src-stable@FreeBSD.ORG Mon Feb 2 11:12:32 2015 Return-Path: Delivered-To: svn-src-stable@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 9F440799; Mon, 2 Feb 2015 11:12:32 +0000 (UTC) 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 7063B2F5; Mon, 2 Feb 2015 11:12:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t12BCWV7007025; Mon, 2 Feb 2015 11:12:32 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t12BCWXT007022; Mon, 2 Feb 2015 11:12:32 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201502021112.t12BCWXT007022@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Mon, 2 Feb 2015 11:12: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: r278072 - stable/10/sys/arm/broadcom/bcm2835 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2015 11:12:32 -0000 Author: loos Date: Mon Feb 2 11:12:31 2015 New Revision: 278072 URL: https://svnweb.freebsd.org/changeset/base/278072 Log: MFC r277206: Catch a few cases where we need to release memory resources on errors. Place parentheses around variables in macros. Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_bsc.c stable/10/sys/arm/broadcom/bcm2835/bcm2835_bscvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_bsc.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Mon Feb 2 11:06:41 2015 (r278071) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Mon Feb 2 11:12:31 2015 (r278072) @@ -252,6 +252,7 @@ bcm_bsc_attach(device_t dev) } if (i == nitems(bcm_bsc_pins)) { device_printf(dev, "only bsc0 and bsc1 are supported\n"); + bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); return (ENXIO); } @@ -262,6 +263,7 @@ bcm_bsc_attach(device_t dev) gpio = devclass_get_device(devclass_find("gpio"), 0); if (!gpio) { device_printf(dev, "cannot find gpio0\n"); + bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); return (ENXIO); } bcm_gpio_set_alternate(gpio, bcm_bsc_pins[i].sda, BCM_GPIO_ALT0); Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_bscvar.h ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_bscvar.h Mon Feb 2 11:06:41 2015 (r278071) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_bscvar.h Mon Feb 2 11:12:31 2015 (r278072) @@ -58,9 +58,9 @@ struct bcm_bsc_softc { #define BCM_I2C_ERROR 0x04 #define BCM_BSC_WRITE(_sc, _off, _val) \ - bus_space_write_4(_sc->sc_bst, _sc->sc_bsh, _off, _val) + bus_space_write_4((_sc)->sc_bst, (_sc)->sc_bsh, _off, _val) #define BCM_BSC_READ(_sc, _off) \ - bus_space_read_4(_sc->sc_bst, _sc->sc_bsh, _off) + bus_space_read_4((_sc)->sc_bst, (_sc)->sc_bsh, _off) #define BCM_BSC_LOCK(_sc) \ mtx_lock(&(_sc)->sc_mtx) From owner-svn-src-stable@FreeBSD.ORG Mon Feb 2 11:26:53 2015 Return-Path: Delivered-To: svn-src-stable@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 C2F87F06; Mon, 2 Feb 2015 11:26:53 +0000 (UTC) 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 AE929660; Mon, 2 Feb 2015 11:26:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t12BQrYR012408; Mon, 2 Feb 2015 11:26:53 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t12BQrVn012407; Mon, 2 Feb 2015 11:26:53 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201502021126.t12BQrVn012407@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Mon, 2 Feb 2015 11: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: r278073 - stable/10/sys/boot/fdt/dts/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2015 11:26:53 -0000 Author: loos Date: Mon Feb 2 11:26:52 2015 New Revision: 278073 URL: https://svnweb.freebsd.org/changeset/base/278073 Log: MFC r277208: Fix the PMIC node name to match the PMIC i2c address. Remove an extra blank line. No functional changes. Modified: stable/10/sys/boot/fdt/dts/arm/beaglebone-black.dts Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/fdt/dts/arm/beaglebone-black.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/beaglebone-black.dts Mon Feb 2 11:12:31 2015 (r278072) +++ stable/10/sys/boot/fdt/dts/arm/beaglebone-black.dts Mon Feb 2 11:26:52 2015 (r278073) @@ -144,10 +144,9 @@ status = "okay"; non-removable; }; - i2c@44e0b000 { - pmic@24 { + pmic@48 { compatible = "ti,am335x-pmic"; reg = <0x48>; }; From owner-svn-src-stable@FreeBSD.ORG Mon Feb 2 11:42:36 2015 Return-Path: Delivered-To: svn-src-stable@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 C4A315D8; Mon, 2 Feb 2015 11:42:36 +0000 (UTC) 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 AFCCD8AF; Mon, 2 Feb 2015 11:42:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t12Bgaf0021453; Mon, 2 Feb 2015 11:42:36 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t12BgaqY021452; Mon, 2 Feb 2015 11:42:36 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201502021142.t12BgaqY021452@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Mon, 2 Feb 2015 11:42: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: r278075 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2015 11:42:36 -0000 Author: loos Date: Mon Feb 2 11:42:35 2015 New Revision: 278075 URL: https://svnweb.freebsd.org/changeset/base/278075 Log: MFC r276751: Remove the check that prevent carp(4) advskew to be set to '0'. CARP devices are created with advskew set to '0' and once you set it to any other value in the valid range (0..254) you can't set it back to zero. The code in question is also used to prevent that zeroed values overwrite the CARP defaults when a new CARP device is created. Since advskew already defaults to '0' for newly created devices and the new value is guaranteed to be within the valid range, it is safe to overwrite it here. PR: 194672 Reported by: cmb@pfsense.org Modified: stable/10/sys/netinet/ip_carp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/ip_carp.c ============================================================================== --- stable/10/sys/netinet/ip_carp.c Mon Feb 2 11:32:15 2015 (r278074) +++ stable/10/sys/netinet/ip_carp.c Mon Feb 2 11:42:35 2015 (r278075) @@ -1701,13 +1701,11 @@ carp_ioctl(struct ifreq *ifr, u_long cmd } sc->sc_advbase = carpr.carpr_advbase; } - if (carpr.carpr_advskew > 0) { - if (carpr.carpr_advskew >= 255) { - error = EINVAL; - break; - } - sc->sc_advskew = carpr.carpr_advskew; + if (carpr.carpr_advskew >= 255) { + error = EINVAL; + break; } + sc->sc_advskew = carpr.carpr_advskew; if (carpr.carpr_key[0] != '\0') { bcopy(carpr.carpr_key, sc->sc_key, sizeof(sc->sc_key)); carp_hmac_prepare(sc); From owner-svn-src-stable@FreeBSD.ORG Mon Feb 2 12:09:43 2015 Return-Path: Delivered-To: svn-src-stable@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 471BAB40; Mon, 2 Feb 2015 12:09:43 +0000 (UTC) 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 185B5AC2; Mon, 2 Feb 2015 12:09:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t12C9gVr031766; Mon, 2 Feb 2015 12:09:42 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t12C9gT7031765; Mon, 2 Feb 2015 12:09:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201502021209.t12C9gT7031765@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 2 Feb 2015 12:09: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: r278076 - stable/10/sys/cam/scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2015 12:09:43 -0000 Author: mav Date: Mon Feb 2 12:09:42 2015 New Revision: 278076 URL: https://svnweb.freebsd.org/changeset/base/278076 Log: MFC r277758: Fix several potential overflows in UNMAP code. 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 Feb 2 11:42:35 2015 (r278075) +++ stable/10/sys/cam/scsi/scsi_da.c Mon Feb 2 12:09:42 2015 (r278076) @@ -1914,18 +1914,18 @@ dadeletemaxsize(struct da_softc *softc, sectors = (off_t)ATA_DSM_RANGE_MAX * softc->trim_max_ranges; break; case DA_DELETE_WS16: - sectors = (off_t)min(softc->ws_max_blks, WS16_MAX_BLKS); + sectors = omin(softc->ws_max_blks, WS16_MAX_BLKS); break; case DA_DELETE_ZERO: case DA_DELETE_WS10: - sectors = (off_t)min(softc->ws_max_blks, WS10_MAX_BLKS); + sectors = omin(softc->ws_max_blks, WS10_MAX_BLKS); break; default: return 0; } return (off_t)softc->params.secsize * - min(sectors, (off_t)softc->params.sectors); + omin(sectors, softc->params.sectors); } static void @@ -2688,7 +2688,7 @@ da_delete_trim(struct cam_periph *periph /* Try to extend the previous range. */ if (lba == lastlba) { - c = min(count, ATA_DSM_RANGE_MAX - lastcount); + c = omin(count, ATA_DSM_RANGE_MAX - lastcount); lastcount += c; off = (ranges - 1) * 8; buf[off + 6] = lastcount & 0xff; @@ -2698,7 +2698,7 @@ da_delete_trim(struct cam_periph *periph } while (count > 0) { - c = min(count, ATA_DSM_RANGE_MAX); + c = omin(count, ATA_DSM_RANGE_MAX); off = ranges * 8; buf[off + 0] = lba & 0xff; @@ -2774,7 +2774,7 @@ da_delete_ws(struct cam_periph *periph, "%s issuing short delete %ld > %ld\n", da_delete_method_desc[softc->delete_method], count, ws_max_blks); - count = min(count, ws_max_blks); + count = omin(count, ws_max_blks); break; } bp1 = bioq_first(&softc->delete_queue); From owner-svn-src-stable@FreeBSD.ORG Mon Feb 2 12:10:26 2015 Return-Path: Delivered-To: svn-src-stable@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 17FF1C7E; Mon, 2 Feb 2015 12:10:26 +0000 (UTC) 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 DDE73ACF; Mon, 2 Feb 2015 12:10:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t12CAPBn032911; Mon, 2 Feb 2015 12:10:25 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t12CAP1i032910; Mon, 2 Feb 2015 12:10:25 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201502021210.t12CAP1i032910@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 2 Feb 2015 12:10: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: r278077 - stable/9/sys/cam/scsi 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2015 12:10:26 -0000 Author: mav Date: Mon Feb 2 12:10:24 2015 New Revision: 278077 URL: https://svnweb.freebsd.org/changeset/base/278077 Log: MFC r277758: Fix several potential overflows in UNMAP code. Modified: stable/9/sys/cam/scsi/scsi_da.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Mon Feb 2 12:09:42 2015 (r278076) +++ stable/9/sys/cam/scsi/scsi_da.c Mon Feb 2 12:10:24 2015 (r278077) @@ -1902,18 +1902,18 @@ dadeletemaxsize(struct da_softc *softc, sectors = (off_t)ATA_DSM_RANGE_MAX * softc->trim_max_ranges; break; case DA_DELETE_WS16: - sectors = (off_t)min(softc->ws_max_blks, WS16_MAX_BLKS); + sectors = omin(softc->ws_max_blks, WS16_MAX_BLKS); break; case DA_DELETE_ZERO: case DA_DELETE_WS10: - sectors = (off_t)min(softc->ws_max_blks, WS10_MAX_BLKS); + sectors = omin(softc->ws_max_blks, WS10_MAX_BLKS); break; default: return 0; } return (off_t)softc->params.secsize * - min(sectors, (off_t)softc->params.sectors); + omin(sectors, softc->params.sectors); } static void @@ -2683,7 +2683,7 @@ da_delete_trim(struct cam_periph *periph /* Try to extend the previous range. */ if (lba == lastlba) { - c = min(count, ATA_DSM_RANGE_MAX - lastcount); + c = omin(count, ATA_DSM_RANGE_MAX - lastcount); lastcount += c; off = (ranges - 1) * 8; buf[off + 6] = lastcount & 0xff; @@ -2693,7 +2693,7 @@ da_delete_trim(struct cam_periph *periph } while (count > 0) { - c = min(count, ATA_DSM_RANGE_MAX); + c = omin(count, ATA_DSM_RANGE_MAX); off = ranges * 8; buf[off + 0] = lba & 0xff; @@ -2768,7 +2768,7 @@ da_delete_ws(struct cam_periph *periph, "%s issuing short delete %ld > %ld\n", da_delete_method_desc[softc->delete_method], count, ws_max_blks); - count = min(count, ws_max_blks); + count = omin(count, ws_max_blks); break; } bp1 = bioq_first(&softc->delete_queue); From owner-svn-src-stable@FreeBSD.ORG Mon Feb 2 12:36:06 2015 Return-Path: Delivered-To: svn-src-stable@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 7C93A26C; Mon, 2 Feb 2015 12:36:06 +0000 (UTC) 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 4DB17D80; Mon, 2 Feb 2015 12:36:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t12Ca6r1045699; Mon, 2 Feb 2015 12:36:06 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t12Ca5U1045697; Mon, 2 Feb 2015 12:36:05 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201502021236.t12Ca5U1045697@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Mon, 2 Feb 2015 12:36: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: r278078 - in stable/10/sys/arm: conf ti/am335x X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2015 12:36:06 -0000 Author: loos Date: Mon Feb 2 12:36:05 2015 New Revision: 278078 URL: https://svnweb.freebsd.org/changeset/base/278078 Log: MFC r261459, r273045, r273047. r261459: Remove trailing tabs causing false grep positives. r273045: Sort the files in the am355x directory. r273047: Remove the need for files.beaglebone and std.beaglebone by moving the one option they defined into files.am335x. Deleted: stable/10/sys/arm/ti/am335x/files.beaglebone stable/10/sys/arm/ti/am335x/std.beaglebone Modified: stable/10/sys/arm/conf/BEAGLEBONE stable/10/sys/arm/ti/am335x/files.am335x Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/BEAGLEBONE ============================================================================== --- stable/10/sys/arm/conf/BEAGLEBONE Mon Feb 2 12:10:24 2015 (r278077) +++ stable/10/sys/arm/conf/BEAGLEBONE Mon Feb 2 12:36:05 2015 (r278078) @@ -22,7 +22,7 @@ ident BEAGLEBONE -include "../ti/am335x/std.beaglebone" +include "../ti/am335x/std.am335x" makeoptions WITHOUT_MODULES="ahc" Modified: stable/10/sys/arm/ti/am335x/files.am335x ============================================================================== --- stable/10/sys/arm/ti/am335x/files.am335x Mon Feb 2 12:10:24 2015 (r278077) +++ stable/10/sys/arm/ti/am335x/files.am335x Mon Feb 2 12:36:05 2015 (r278078) @@ -1,13 +1,16 @@ #$FreeBSD$ arm/ti/aintc.c standard -arm/ti/am335x/am335x_prcm.c standard + arm/ti/am335x/am335x_dmtimer.c standard -arm/ti/am335x/am335x_scm_padconf.c standard -arm/ti/am335x/am335x_lcd.c optional sc +arm/ti/am335x/am335x_lcd.c optional sc arm/ti/am335x/am335x_lcd_syscons.c optional sc -arm/ti/am335x/am335x_pwm.c standard +arm/ti/am335x/am335x_pmic.c optional am335x_pmic +arm/ti/am335x/am335x_prcm.c standard +arm/ti/am335x/am335x_pwm.c standard +arm/ti/am335x/am335x_scm_padconf.c standard arm/ti/am335x/am335x_usbss.c optional musb fdt + arm/ti/ti_edma3.c standard arm/ti/ti_sdhci.c optional sdhci #arm/ti/ti_mmchs.c optional mmc From owner-svn-src-stable@FreeBSD.ORG Mon Feb 2 12:48:17 2015 Return-Path: Delivered-To: svn-src-stable@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 E373753B; Mon, 2 Feb 2015 12:48:16 +0000 (UTC) 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 CCCCFE80; Mon, 2 Feb 2015 12:48:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t12CmGDi050690; Mon, 2 Feb 2015 12:48:16 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t12CmEYl050675; Mon, 2 Feb 2015 12:48:14 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201502021248.t12CmEYl050675@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Mon, 2 Feb 2015 12: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: r278079 - in stable/10/sys: arm/conf arm/ti arm/ti/am335x boot/fdt/dts/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2015 12:48:17 -0000 Author: loos Date: Mon Feb 2 12:48:13 2015 New Revision: 278079 URL: https://svnweb.freebsd.org/changeset/base/278079 Log: MFC r277042: Add support to turn off Beaglebone with poweroff(8) or shutdown(8) -p. To cut off the power we need to start the shutdown sequence by writing the OFF bit on PMIC. Once the PMIC is programmed the SoC needs to toggle the PMIC_PWR_ENABLE pin when it is ready for the PMIC to cut off the power. This is done by triggering the ALARM2 interrupt on SoC RTC. The RTC driver only works in power management mode which means it won't provide any kind of time keeping functionality. It only implements a way to trigger the ALARM2 interrupt when requested. Added: stable/10/sys/arm/ti/am335x/am335x_rtc.c - copied unchanged from r277042, head/sys/arm/ti/am335x/am335x_rtc.c stable/10/sys/arm/ti/am335x/am335x_rtcreg.h - copied unchanged from r277042, head/sys/arm/ti/am335x/am335x_rtcreg.h stable/10/sys/arm/ti/am335x/am335x_rtcvar.h - copied unchanged from r277042, head/sys/arm/ti/am335x/am335x_rtcvar.h Modified: stable/10/sys/arm/conf/BEAGLEBONE stable/10/sys/arm/ti/am335x/am335x_pmic.c stable/10/sys/arm/ti/am335x/am335x_prcm.c stable/10/sys/arm/ti/am335x/files.am335x stable/10/sys/arm/ti/ti_prcm.h stable/10/sys/boot/fdt/dts/arm/am335x.dtsi Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/BEAGLEBONE ============================================================================== --- stable/10/sys/arm/conf/BEAGLEBONE Mon Feb 2 12:36:05 2015 (r278078) +++ stable/10/sys/arm/conf/BEAGLEBONE Mon Feb 2 12:48:13 2015 (r278079) @@ -87,6 +87,8 @@ device sdhci # mmc/sd host controller # Boot device is 2nd slice on MMC/SD card options ROOTDEVNAME=\"ufs:mmcsd0s2\" +device am335x_rtc # RTC support (power management only) + # Console and misc device uart device uart_ns8250 Modified: stable/10/sys/arm/ti/am335x/am335x_pmic.c ============================================================================== --- stable/10/sys/arm/ti/am335x/am335x_pmic.c Mon Feb 2 12:36:05 2015 (r278078) +++ stable/10/sys/arm/ti/am335x/am335x_pmic.c Mon Feb 2 12:48:13 2015 (r278079) @@ -31,11 +31,13 @@ __FBSDID("$FreeBSD$"); */ #include #include +#include #include #include #include #include #include +#include #include #include @@ -46,6 +48,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include "iicbus_if.h" #define TPS65217A 0x7 @@ -56,6 +60,10 @@ __FBSDID("$FreeBSD$"); /* TPS65217 Reisters */ #define TPS65217_CHIPID_REG 0x00 #define TPS65217_STATUS_REG 0x0A +#define TPS65217_STATUS_OFF (1U << 7) +#define TPS65217_STATUS_ACPWR (1U << 3) +#define TPS65217_STATUS_USBPWR (1U << 2) +#define TPS65217_STATUS_BT (1U << 0) #define MAX_IIC_DATA_SIZE 2 @@ -66,6 +74,8 @@ struct am335x_pmic_softc { struct intr_config_hook enum_hook; }; +static void am335x_pmic_shutdown(void *, int); + static int am335x_pmic_read(device_t dev, uint8_t addr, uint8_t *data, uint8_t size) { @@ -77,7 +87,6 @@ am335x_pmic_read(device_t dev, uint8_t a return (iicbus_transfer(dev, msg, 2)); } -#ifdef notyet static int am335x_pmic_write(device_t dev, uint8_t address, uint8_t *data, uint8_t size) { @@ -95,7 +104,6 @@ am335x_pmic_write(device_t dev, uint8_t return (iicbus_transfer(dev, msg, 1)); } -#endif static int am335x_pmic_probe(device_t dev) @@ -146,6 +154,9 @@ am335x_pmic_start(void *xdev) am335x_pmic_read(dev, TPS65217_STATUS_REG, ®, 1); device_printf(dev, "%s powered by %s\n", name, pwr[(reg>>2)&0x03]); + EVENTHANDLER_REGISTER(shutdown_final, am335x_pmic_shutdown, dev, + SHUTDOWN_PRI_LAST); + config_intrhook_disestablish(&sc->enum_hook); } @@ -165,6 +176,22 @@ am335x_pmic_attach(device_t dev) return (0); } +static void +am335x_pmic_shutdown(void *xdev, int howto) +{ + device_t dev; + uint8_t reg; + + if (!(howto & RB_POWEROFF)) + return; + dev = (device_t)xdev; + /* Set the OFF bit on status register to start the shutdown sequence. */ + reg = TPS65217_STATUS_OFF; + am335x_pmic_write(dev, TPS65217_STATUS_REG, ®, 1); + /* Toggle pmic_pwr_enable to shutdown the PMIC. */ + am335x_rtc_pmic_pwr_toggle(); +} + static device_method_t am335x_pmic_methods[] = { DEVMETHOD(device_probe, am335x_pmic_probe), DEVMETHOD(device_attach, am335x_pmic_attach), Modified: stable/10/sys/arm/ti/am335x/am335x_prcm.c ============================================================================== --- stable/10/sys/arm/ti/am335x/am335x_prcm.c Mon Feb 2 12:36:05 2015 (r278078) +++ stable/10/sys/arm/ti/am335x/am335x_prcm.c Mon Feb 2 12:48:13 2015 (r278079) @@ -118,6 +118,10 @@ __FBSDID("$FreeBSD$"); #define CLKSEL_TIMER6_CLK (CM_DPLL + 0x01C) #define CLKSEL_PRUSS_OCP_CLK (CM_DPLL + 0x030) +#define CM_RTC 0x800 +#define CM_RTC_RTC_CLKCTRL (CM_RTC + 0x000) +#define CM_RTC_CLKSTCTRL (CM_RTC + 0x004) + #define PRM_PER 0xC00 #define PRM_PER_RSTCTRL (PRM_PER + 0x00) @@ -295,7 +299,8 @@ struct ti_clock_dev ti_clk_devmap[] = { .clk_get_source_freq = NULL, }, - + /* RTC */ + AM335X_GENERIC_CLOCK_DEV(RTC_CLK), { INVALID_CLK_IDENT, NULL, NULL, NULL, NULL } }; @@ -363,6 +368,9 @@ static struct am335x_clk_details g_am335 _CLK_DETAIL(MAILBOX0_CLK, CM_PER_MAILBOX0_CLKCTRL, 0), _CLK_DETAIL(SPINLOCK0_CLK, CM_PER_SPINLOCK0_CLKCTRL, 0), + /* RTC module */ + _CLK_DETAIL(RTC_CLK, CM_RTC_RTC_CLKCTRL, 0), + { INVALID_CLK_IDENT, 0}, }; Copied: stable/10/sys/arm/ti/am335x/am335x_rtc.c (from r277042, head/sys/arm/ti/am335x/am335x_rtc.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/ti/am335x/am335x_rtc.c Mon Feb 2 12:48:13 2015 (r278079, copy of r277042, head/sys/arm/ti/am335x/am335x_rtc.c) @@ -0,0 +1,211 @@ +/*- + * Copyright (c) 2015 Luiz Otavio O Souza + * 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 + +#define RTC_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) +#define RTC_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) +#define RTC_LOCK_INIT(_sc) mtx_init(&(_sc)->sc_mtx, \ + device_get_nameunit(_sc->sc_dev), "am335x_rtc", MTX_DEF) +#define RTC_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx) + +#define RTC_READ4(_sc, reg) \ + bus_read_4((_sc)->sc_mem_res, reg) +#define RTC_WRITE4(_sc, reg, value) \ + bus_write_4((_sc)->sc_mem_res, reg, value) + +#define RTC_MAXIRQS 2 + +struct am335x_rtc_softc { + device_t sc_dev; + struct mtx sc_mtx; + struct resource *sc_irq_res[RTC_MAXIRQS]; + struct resource *sc_mem_res; +}; + +static struct am335x_rtc_softc *rtc_sc = NULL; +static struct resource_spec am335x_rtc_irq_spec[] = { + { SYS_RES_IRQ, 0, RF_ACTIVE }, + { SYS_RES_IRQ, 1, RF_ACTIVE }, + { -1, 0, 0 } +}; + +static int +am335x_rtc_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "ti,da830-rtc")) + return (ENXIO); + device_set_desc(dev, "AM335x RTC (power management mode)"); + + return (BUS_PROBE_DEFAULT); +} + +static int +am335x_rtc_attach(device_t dev) +{ + int rid; + struct am335x_rtc_softc *sc; + uint32_t rev; + + if (rtc_sc != NULL) + return (ENXIO); + rtc_sc = sc = device_get_softc(dev); + sc->sc_dev = dev; + rid = 0; + sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + if (!sc->sc_mem_res) { + device_printf(dev, "cannot allocate memory resources\n"); + return (ENXIO); + } + if (bus_alloc_resources(dev, am335x_rtc_irq_spec, sc->sc_irq_res) != 0) { + bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); + device_printf(dev, "cannot allocate irq resources\n"); + return (ENXIO); + } + RTC_LOCK_INIT(sc); + + /* Enable the RTC module. */ + ti_prcm_clk_enable(RTC_CLK); + rev = RTC_READ4(sc, RTC_REVISION); + device_printf(dev, "AM335X RTC v%d.%d.%d\n", + (rev >> 8) & 0x7, (rev >> 6) & 0x3, rev & 0x3f); + /* Unlock the RTC. */ + RTC_WRITE4(sc, RTC_KICK0R, RTC_KICK0R_PASS); + RTC_WRITE4(sc, RTC_KICK1R, RTC_KICK1R_PASS); + /* Stop the RTC, we don't need it right now. */ + RTC_WRITE4(sc, RTC_CTRL, 0); + /* Disable interrupts. */ + RTC_WRITE4(sc, RTC_INTR, 0); + /* Ack any pending interrupt. */ + RTC_WRITE4(sc, RTC_STATUS, RTC_STATUS_ALARM2 | RTC_STATUS_ALARM); + /* Enable external clock (xtal) and 32 kHz clock. */ + RTC_WRITE4(sc, RTC_OSC, RTC_OSC_32KCLK_EN | RTC_OSC_32KCLK_SEL); + /* Enable pmic_pwr_enable. */ + RTC_WRITE4(sc, RTC_PMIC, PMIC_PWR_ENABLE); + + return (0); +} + +static int +am335x_rtc_detach(device_t dev) +{ + struct am335x_rtc_softc *sc; + + sc = device_get_softc(dev); + if (sc->sc_irq_res) + bus_release_resources(dev, am335x_rtc_irq_spec, sc->sc_irq_res); + if (sc->sc_mem_res) + bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); + RTC_LOCK_DESTROY(sc); + + return (0); +} + +void +am335x_rtc_pmic_pwr_toggle(void) +{ + int timeout; + struct clocktime ct; + struct timespec ts; + + /* + * We stop the RTC so we don't need to check the STATUS.BUSY bit + * before update ALARM2 registers. + */ + timeout = 10; + RTC_WRITE4(rtc_sc, RTC_CTRL, 0); + while (--timeout && RTC_READ4(rtc_sc, RTC_STATUS) & RTC_STATUS_RUN) + DELAY(100); + if (timeout == 0) { + device_printf(rtc_sc->sc_dev, "RTC does not stop.\n"); + return; + } + /* Program the ALARM2 to fire in 2 seconds. */ + ct.dow = 0; + ct.nsec = 0; + ct.sec = FROMBCD(RTC_READ4(rtc_sc, RTC_SECONDS) & 0x7f); + ct.min = FROMBCD(RTC_READ4(rtc_sc, RTC_MINUTES) & 0x7f); + ct.hour = FROMBCD(RTC_READ4(rtc_sc, RTC_HOURS) & 0x3f); + ct.day = FROMBCD(RTC_READ4(rtc_sc, RTC_DAYS) & 0x3f); + ct.mon = FROMBCD(RTC_READ4(rtc_sc, RTC_MONTHS) & 0x1f); + ct.year = FROMBCD(RTC_READ4(rtc_sc, RTC_YEARS) & 0xff); + ct.year += POSIX_BASE_YEAR; + clock_ct_to_ts(&ct, &ts); + ts.tv_sec += 2; + clock_ts_to_ct(&ts, &ct); + RTC_WRITE4(rtc_sc, RTC_ALARM2_SECONDS, TOBCD(ct.sec)); + RTC_WRITE4(rtc_sc, RTC_ALARM2_MINUTES, TOBCD(ct.min)); + RTC_WRITE4(rtc_sc, RTC_ALARM2_HOURS, TOBCD(ct.hour)); + RTC_WRITE4(rtc_sc, RTC_ALARM2_DAYS, TOBCD(ct.day)); + RTC_WRITE4(rtc_sc, RTC_ALARM2_MONTHS, TOBCD(ct.mon)); + RTC_WRITE4(rtc_sc, RTC_ALARM2_YEARS, TOBCD(ct.year - POSIX_BASE_YEAR)); + /* Enable ALARM2 interrupt. */ + RTC_WRITE4(rtc_sc, RTC_INTR, RTC_INTR_ALARM2); + /* Start count. */ + RTC_WRITE4(rtc_sc, RTC_CTRL, RTC_CTRL_RUN); +} + +static device_method_t am335x_rtc_methods[] = { + DEVMETHOD(device_probe, am335x_rtc_probe), + DEVMETHOD(device_attach, am335x_rtc_attach), + DEVMETHOD(device_detach, am335x_rtc_detach), + + DEVMETHOD_END +}; + +static driver_t am335x_rtc_driver = { + "am335x_rtc", + am335x_rtc_methods, + sizeof(struct am335x_rtc_softc), +}; + +static devclass_t am335x_rtc_devclass; + +DRIVER_MODULE(am335x_rtc, simplebus, am335x_rtc_driver, am335x_rtc_devclass, 0, 0); +MODULE_VERSION(am335x_rtc, 1); +MODULE_DEPEND(am335x_rtc, simplebus, 1, 1, 1); Copied: stable/10/sys/arm/ti/am335x/am335x_rtcreg.h (from r277042, head/sys/arm/ti/am335x/am335x_rtcreg.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/ti/am335x/am335x_rtcreg.h Mon Feb 2 12:48:13 2015 (r278079, copy of r277042, head/sys/arm/ti/am335x/am335x_rtcreg.h) @@ -0,0 +1,76 @@ +/*- + * Copyright 2015 Luiz Otavio O Souza + * 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. + * + * $FreeBSD$ + */ + +#ifndef _AM335X_RTCREG_H_ +#define _AM335X_RTCREG_H_ + +#define RTC_SECONDS 0x00 +#define RTC_MINUTES 0x04 +#define RTC_HOURS 0x08 +#define RTC_DAYS 0x0c +#define RTC_MONTHS 0x10 +#define RTC_YEARS 0x14 +#define RTC_WEEK 0x18 +#define RTC_CTRL 0x40 +#define RTC_CTRL_DISABLE (1U << 6) +#define RTC_CTRL_RUN (1U << 0) +#define RTC_STATUS 0x44 +#define RTC_STATUS_ALARM2 (1U << 7) +#define RTC_STATUS_ALARM (1U << 6) +#define RTC_STATUS_1D_EVENT (1U << 5) +#define RTC_STATUS_1H_EVENT (1U << 4) +#define RTC_STATUS_1M_EVENT (1U << 3) +#define RTC_STATUS_1S_EVENT (1U << 2) +#define RTC_STATUS_RUN (1U << 1) +#define RTC_STATUS_BUSY (1U << 0) +#define RTC_INTR 0x48 +#define RTC_INTR_ALARM2 (1U << 4) +#define RTC_INTR_ALARM (1U << 3) +#define RTC_INTR_TIMER (1U << 2) +#define RTC_OSC 0x54 +#define RTC_OSC_32KCLK_EN (1U << 6) +#define RTC_OSC_OSC32K_GZ (1U << 4) +#define RTC_OSC_32KCLK_SEL (1U << 3) +#define RTC_OSC_RES_SELECT (1U << 2) +#define RTC_OSC_SW2 (1U << 1) +#define RTC_OSC_SW1 (1U << 0) +#define RTC_KICK0R 0x6c +#define RTC_KICK0R_PASS 0x83e70b13 +#define RTC_KICK1R 0x70 +#define RTC_KICK1R_PASS 0x95a4f1e0 +#define RTC_REVISION 0x74 +#define RTC_ALARM2_SECONDS 0x80 +#define RTC_ALARM2_MINUTES 0x84 +#define RTC_ALARM2_HOURS 0x88 +#define RTC_ALARM2_DAYS 0x8c +#define RTC_ALARM2_MONTHS 0x90 +#define RTC_ALARM2_YEARS 0x94 +#define RTC_PMIC 0x98 +#define PMIC_PWR_ENABLE (1U << 16) + +#endif /* _AM335X_RTCREG_H_ */ Copied: stable/10/sys/arm/ti/am335x/am335x_rtcvar.h (from r277042, head/sys/arm/ti/am335x/am335x_rtcvar.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/ti/am335x/am335x_rtcvar.h Mon Feb 2 12:48:13 2015 (r278079, copy of r277042, head/sys/arm/ti/am335x/am335x_rtcvar.h) @@ -0,0 +1,34 @@ +/*- + * Copyright 2015 Luiz Otavio O Souza + * 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. + * + * $FreeBSD$ + */ + +#ifndef _AM335X_RTCVAR_H_ +#define _AM335X_RTCVAR_H_ + +void am335x_rtc_pmic_pwr_toggle(void); + +#endif /* _AM335X_RTCVAR_H_ */ Modified: stable/10/sys/arm/ti/am335x/files.am335x ============================================================================== --- stable/10/sys/arm/ti/am335x/files.am335x Mon Feb 2 12:36:05 2015 (r278078) +++ stable/10/sys/arm/ti/am335x/files.am335x Mon Feb 2 12:48:13 2015 (r278079) @@ -8,6 +8,7 @@ arm/ti/am335x/am335x_lcd_syscons.c optio arm/ti/am335x/am335x_pmic.c optional am335x_pmic arm/ti/am335x/am335x_prcm.c standard arm/ti/am335x/am335x_pwm.c standard +arm/ti/am335x/am335x_rtc.c optional am335x_rtc arm/ti/am335x/am335x_scm_padconf.c standard arm/ti/am335x/am335x_usbss.c optional musb fdt Modified: stable/10/sys/arm/ti/ti_prcm.h ============================================================================== --- stable/10/sys/arm/ti/ti_prcm.h Mon Feb 2 12:36:05 2015 (r278078) +++ stable/10/sys/arm/ti/ti_prcm.h Mon Feb 2 12:48:13 2015 (r278079) @@ -164,6 +164,9 @@ typedef enum { TSC_ADC_CLK = 1800, + /* RTC module */ + RTC_CLK = 1900, + INVALID_CLK_IDENT } clk_ident_t; Modified: stable/10/sys/boot/fdt/dts/arm/am335x.dtsi ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/am335x.dtsi Mon Feb 2 12:36:05 2015 (r278078) +++ stable/10/sys/boot/fdt/dts/arm/am335x.dtsi Mon Feb 2 12:48:13 2015 (r278079) @@ -75,6 +75,13 @@ interrupt-parent = <&AINTC>; }; + rtc: rtc@44E3E000 { + compatible = "ti,da830-rtc"; + reg = <0x44E3E000 0x1000>; + interrupts = < 75 76 >; + interrupt-parent = <&AINTC>; + }; + adc0: adc@44E0D000 { compatible = "ti,adc"; reg = <0x44E0D000 0x2000>; From owner-svn-src-stable@FreeBSD.ORG Mon Feb 2 15:52:13 2015 Return-Path: Delivered-To: svn-src-stable@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 A14FADCF; Mon, 2 Feb 2015 15:52:13 +0000 (UTC) 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 81FF083D; Mon, 2 Feb 2015 15:52:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t12FqDOi040220; Mon, 2 Feb 2015 15:52:13 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t12FqBrx040212; Mon, 2 Feb 2015 15:52:11 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201502021552.t12FqBrx040212@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 2 Feb 2015 15:52: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: r278096 - stable/10/sys/fs/ext2fs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2015 15:52:13 -0000 Author: pfg Date: Mon Feb 2 15:52:11 2015 New Revision: 278096 URL: https://svnweb.freebsd.org/changeset/base/278096 Log: MFC r277354, r277365: ext2: Garbage-collect some unused variables Reported by: clang static analysis Modified: stable/10/sys/fs/ext2fs/ext2_bmap.c stable/10/sys/fs/ext2fs/ext2_extents.c stable/10/sys/fs/ext2fs/ext2_htree.c stable/10/sys/fs/ext2fs/ext2_inode.c stable/10/sys/fs/ext2fs/ext2_lookup.c stable/10/sys/fs/ext2fs/ext2_vfsops.c stable/10/sys/fs/ext2fs/ext2_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/ext2fs/ext2_bmap.c ============================================================================== --- stable/10/sys/fs/ext2fs/ext2_bmap.c Mon Feb 2 14:59:55 2015 (r278095) +++ stable/10/sys/fs/ext2fs/ext2_bmap.c Mon Feb 2 15:52:11 2015 (r278096) @@ -145,7 +145,6 @@ ext2_bmaparray(struct vnode *vp, daddr_t struct buf *bp; struct ext2mount *ump; struct mount *mp; - struct vnode *devvp; struct indir a[NIADDR+1], *ap; daddr_t daddr; e2fs_lbn_t metalbn; @@ -156,7 +155,6 @@ ext2_bmaparray(struct vnode *vp, daddr_t ip = VTOI(vp); mp = vp->v_mount; ump = VFSTOEXT2(mp); - devvp = ump->um_devvp; bsize = EXT2_BLOCK_SIZE(ump->um_e2fs); Modified: stable/10/sys/fs/ext2fs/ext2_extents.c ============================================================================== --- stable/10/sys/fs/ext2fs/ext2_extents.c Mon Feb 2 14:59:55 2015 (r278095) +++ stable/10/sys/fs/ext2fs/ext2_extents.c Mon Feb 2 15:52:11 2015 (r278096) @@ -131,13 +131,11 @@ struct ext4_extent_path * ext4_ext_find_extent(struct m_ext2fs *fs, struct inode *ip, daddr_t lbn, struct ext4_extent_path *path) { - struct vnode *vp; struct ext4_extent_header *ehp; uint16_t i; int error, size; daddr_t nblk; - vp = ITOV(ip); ehp = (struct ext4_extent_header *)(char *)ip->i_db; if (ehp->eh_magic != EXT4_EXT_MAGIC) Modified: stable/10/sys/fs/ext2fs/ext2_htree.c ============================================================================== --- stable/10/sys/fs/ext2fs/ext2_htree.c Mon Feb 2 14:59:55 2015 (r278095) +++ stable/10/sys/fs/ext2fs/ext2_htree.c Mon Feb 2 15:52:11 2015 (r278096) @@ -395,7 +395,7 @@ ext2_htree_append_block(struct vnode *vp int error; cursize = roundup(dp->i_size, blksize); - newsize = roundup(dp->i_size, blksize) + blksize; + newsize = cursize + blksize; auio.uio_offset = cursize; auio.uio_resid = blksize; @@ -771,7 +771,7 @@ ext2_htree_add_entry(struct vnode *dvp, dst_node->h_fake_dirent.e2d_reclen = blksize; cursize = roundup(ip->i_size, blksize); - dirsize = roundup(ip->i_size, blksize) + blksize; + dirsize = cursize + blksize; blknum = dirsize / blksize - 1; error = ext2_htree_append_block(dvp, newidxblock, Modified: stable/10/sys/fs/ext2fs/ext2_inode.c ============================================================================== --- stable/10/sys/fs/ext2fs/ext2_inode.c Mon Feb 2 14:59:55 2015 (r278095) +++ stable/10/sys/fs/ext2fs/ext2_inode.c Mon Feb 2 15:52:11 2015 (r278096) @@ -115,16 +115,20 @@ ext2_truncate(struct vnode *vp, off_t le struct inode *oip; int32_t bn, lbn, lastiblock[NIADDR], indir_lbn[NIADDR]; uint32_t oldblks[NDADDR + NIADDR], newblks[NDADDR + NIADDR]; - struct bufobj *bo; struct m_ext2fs *fs; struct buf *bp; int offset, size, level; e4fs_daddr_t count, nblocks, blocksreleased = 0; int error, i, allerror; off_t osize; +#ifdef INVARIANTS + struct bufobj *bo; +#endif oip = VTOI(ovp); +#ifdef INVARIANTS bo = &ovp->v_bufobj; +#endif ASSERT_VOP_LOCKED(vp, "ext2_truncate"); Modified: stable/10/sys/fs/ext2fs/ext2_lookup.c ============================================================================== --- stable/10/sys/fs/ext2fs/ext2_lookup.c Mon Feb 2 14:59:55 2015 (r278095) +++ stable/10/sys/fs/ext2fs/ext2_lookup.c Mon Feb 2 15:52:11 2015 (r278096) @@ -343,7 +343,6 @@ restart: * we watch for a place to put the new file in * case it doesn't already exist. */ - ino = 0; i_diroff = dp->i_diroff; ss.slotstatus = FOUND; ss.slotfreespace = ss.slotsize = ss.slotneeded = 0; Modified: stable/10/sys/fs/ext2fs/ext2_vfsops.c ============================================================================== --- stable/10/sys/fs/ext2fs/ext2_vfsops.c Mon Feb 2 14:59:55 2015 (r278095) +++ stable/10/sys/fs/ext2fs/ext2_vfsops.c Mon Feb 2 15:52:11 2015 (r278096) @@ -902,7 +902,6 @@ ext2_vget(struct mount *mp, ino_t ino, i struct ext2mount *ump; struct buf *bp; struct vnode *vp; - struct cdev *dev; struct thread *td; int i, error; int used_blocks; @@ -913,7 +912,6 @@ ext2_vget(struct mount *mp, ino_t ino, i return (error); ump = VFSTOEXT2(mp); - dev = ump->um_dev; ip = malloc(sizeof(struct inode), M_EXT2NODE, M_WAITOK | M_ZERO); /* Allocate a new vnode/inode. */ Modified: stable/10/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- stable/10/sys/fs/ext2fs/ext2_vnops.c Mon Feb 2 14:59:55 2015 (r278095) +++ stable/10/sys/fs/ext2fs/ext2_vnops.c Mon Feb 2 15:52:11 2015 (r278096) @@ -1224,7 +1224,6 @@ ext2_rmdir(struct vop_rmdir_args *ap) * the current directory and thus be * non-empty.) */ - error = 0; if (ip->i_nlink != 2 || !ext2_dirempty(ip, dp->i_number, cnp->cn_cred)) { error = ENOTEMPTY; goto out; @@ -1330,12 +1329,10 @@ ext2_strategy(struct vop_strategy_args * { struct buf *bp = ap->a_bp; struct vnode *vp = ap->a_vp; - struct inode *ip; struct bufobj *bo; daddr_t blkno; int error; - ip = VTOI(vp); if (vp->v_type == VBLK || vp->v_type == VCHR) panic("ext2_strategy: spec"); if (bp->b_blkno == bp->b_lblkno) { From owner-svn-src-stable@FreeBSD.ORG Mon Feb 2 15:53:04 2015 Return-Path: Delivered-To: svn-src-stable@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 EB305F90; Mon, 2 Feb 2015 15:53:03 +0000 (UTC) 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 CD01A850; Mon, 2 Feb 2015 15:53:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t12Fr3kc040397; Mon, 2 Feb 2015 15:53:03 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t12Fr1sO040387; Mon, 2 Feb 2015 15:53:01 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201502021553.t12Fr1sO040387@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 2 Feb 2015 15:53:01 +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: r278097 - stable/9/sys/fs/ext2fs 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2015 15:53:04 -0000 Author: pfg Date: Mon Feb 2 15:53:01 2015 New Revision: 278097 URL: https://svnweb.freebsd.org/changeset/base/278097 Log: MFC r277354, r277365: ext2: Garbage-collect some unused variables Reported by: clang static analysis Modified: stable/9/sys/fs/ext2fs/ext2_bmap.c stable/9/sys/fs/ext2fs/ext2_extents.c stable/9/sys/fs/ext2fs/ext2_htree.c stable/9/sys/fs/ext2fs/ext2_inode.c stable/9/sys/fs/ext2fs/ext2_lookup.c stable/9/sys/fs/ext2fs/ext2_vfsops.c stable/9/sys/fs/ext2fs/ext2_vnops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/ext2fs/ext2_bmap.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_bmap.c Mon Feb 2 15:52:11 2015 (r278096) +++ stable/9/sys/fs/ext2fs/ext2_bmap.c Mon Feb 2 15:53:01 2015 (r278097) @@ -145,7 +145,6 @@ ext2_bmaparray(struct vnode *vp, daddr_t struct buf *bp; struct ext2mount *ump; struct mount *mp; - struct vnode *devvp; struct indir a[NIADDR+1], *ap; daddr_t daddr; e2fs_lbn_t metalbn; @@ -156,7 +155,6 @@ ext2_bmaparray(struct vnode *vp, daddr_t ip = VTOI(vp); mp = vp->v_mount; ump = VFSTOEXT2(mp); - devvp = ump->um_devvp; bsize = EXT2_BLOCK_SIZE(ump->um_e2fs); Modified: stable/9/sys/fs/ext2fs/ext2_extents.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_extents.c Mon Feb 2 15:52:11 2015 (r278096) +++ stable/9/sys/fs/ext2fs/ext2_extents.c Mon Feb 2 15:53:01 2015 (r278097) @@ -131,13 +131,11 @@ struct ext4_extent_path * ext4_ext_find_extent(struct m_ext2fs *fs, struct inode *ip, daddr_t lbn, struct ext4_extent_path *path) { - struct vnode *vp; struct ext4_extent_header *ehp; uint16_t i; int error, size; daddr_t nblk; - vp = ITOV(ip); ehp = (struct ext4_extent_header *)(char *)ip->i_db; if (ehp->eh_magic != EXT4_EXT_MAGIC) Modified: stable/9/sys/fs/ext2fs/ext2_htree.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_htree.c Mon Feb 2 15:52:11 2015 (r278096) +++ stable/9/sys/fs/ext2fs/ext2_htree.c Mon Feb 2 15:53:01 2015 (r278097) @@ -395,7 +395,7 @@ ext2_htree_append_block(struct vnode *vp int error; cursize = roundup(dp->i_size, blksize); - newsize = roundup(dp->i_size, blksize) + blksize; + newsize = cursize + blksize; auio.uio_offset = cursize; auio.uio_resid = blksize; @@ -771,7 +771,7 @@ ext2_htree_add_entry(struct vnode *dvp, dst_node->h_fake_dirent.e2d_reclen = blksize; cursize = roundup(ip->i_size, blksize); - dirsize = roundup(ip->i_size, blksize) + blksize; + dirsize = cursize + blksize; blknum = dirsize / blksize - 1; error = ext2_htree_append_block(dvp, newidxblock, Modified: stable/9/sys/fs/ext2fs/ext2_inode.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_inode.c Mon Feb 2 15:52:11 2015 (r278096) +++ stable/9/sys/fs/ext2fs/ext2_inode.c Mon Feb 2 15:53:01 2015 (r278097) @@ -114,16 +114,20 @@ ext2_truncate(struct vnode *vp, off_t le struct inode *oip; int32_t bn, lbn, lastiblock[NIADDR], indir_lbn[NIADDR]; uint32_t oldblks[NDADDR + NIADDR], newblks[NDADDR + NIADDR]; - struct bufobj *bo; struct m_ext2fs *fs; struct buf *bp; int offset, size, level; e4fs_daddr_t count, nblocks, blocksreleased = 0; int error, i, allerror; off_t osize; +#ifdef INVARIANTS + struct bufobj *bo; +#endif oip = VTOI(ovp); +#ifdef INVARIANTS bo = &ovp->v_bufobj; +#endif ASSERT_VOP_LOCKED(vp, "ext2_truncate"); Modified: stable/9/sys/fs/ext2fs/ext2_lookup.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_lookup.c Mon Feb 2 15:52:11 2015 (r278096) +++ stable/9/sys/fs/ext2fs/ext2_lookup.c Mon Feb 2 15:53:01 2015 (r278097) @@ -343,7 +343,6 @@ restart: * we watch for a place to put the new file in * case it doesn't already exist. */ - ino = 0; i_diroff = dp->i_diroff; ss.slotstatus = FOUND; ss.slotfreespace = ss.slotsize = ss.slotneeded = 0; Modified: stable/9/sys/fs/ext2fs/ext2_vfsops.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_vfsops.c Mon Feb 2 15:52:11 2015 (r278096) +++ stable/9/sys/fs/ext2fs/ext2_vfsops.c Mon Feb 2 15:53:01 2015 (r278097) @@ -903,7 +903,6 @@ ext2_vget(struct mount *mp, ino_t ino, i struct ext2mount *ump; struct buf *bp; struct vnode *vp; - struct cdev *dev; struct thread *td; int i, error; int used_blocks; @@ -914,7 +913,6 @@ ext2_vget(struct mount *mp, ino_t ino, i return (error); ump = VFSTOEXT2(mp); - dev = ump->um_dev; /* * If this malloc() is performed after the getnewvnode() Modified: stable/9/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_vnops.c Mon Feb 2 15:52:11 2015 (r278096) +++ stable/9/sys/fs/ext2fs/ext2_vnops.c Mon Feb 2 15:53:01 2015 (r278097) @@ -1227,7 +1227,6 @@ ext2_rmdir(struct vop_rmdir_args *ap) * the current directory and thus be * non-empty.) */ - error = 0; if (ip->i_nlink != 2 || !ext2_dirempty(ip, dp->i_number, cnp->cn_cred)) { error = ENOTEMPTY; goto out; @@ -1333,12 +1332,10 @@ ext2_strategy(struct vop_strategy_args * { struct buf *bp = ap->a_bp; struct vnode *vp = ap->a_vp; - struct inode *ip; struct bufobj *bo; daddr_t blkno; int error; - ip = VTOI(vp); if (vp->v_type == VBLK || vp->v_type == VCHR) panic("ext2_strategy: spec"); if (bp->b_blkno == bp->b_lblkno) { From owner-svn-src-stable@FreeBSD.ORG Mon Feb 2 18:48:50 2015 Return-Path: Delivered-To: svn-src-stable@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 DE775415; Mon, 2 Feb 2015 18:48:50 +0000 (UTC) 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 B0D599C; Mon, 2 Feb 2015 18:48:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t12Imo3h022071; Mon, 2 Feb 2015 18:48:50 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t12ImoO7022070; Mon, 2 Feb 2015 18:48:50 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201502021848.t12ImoO7022070@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 2 Feb 2015 18:48:50 +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: r278106 - in stable: 10/sys/dev/vt 9/sys/dev/vt 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2015 18:48:51 -0000 Author: delphij Date: Mon Feb 2 18:48:49 2015 New Revision: 278106 URL: https://svnweb.freebsd.org/changeset/base/278106 Log: MFC r277806: Use unsigned int for index value. Without this change a local attacker could trigger a panic by tricking the kernel into accessing undefined kernel memory. We would like to acknowledge Francisco Falcon from CORE Security Technologies who discovered the issue and reported to the FreeBSD Security Team. More information can be found at CORE Security's advisory at: http://www.coresecurity.com/content/freebsd-kernel-multiple-vulnerabilities This is an errata candidate for releng/10.1 and releng/9.3. Earlier releases are not affected. Reported by: Francisco Falcon from CORE Security Technologies Security: CVE-2014-0998 Reviewed by: dumbbell Modified: stable/9/sys/dev/vt/vt_core.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/vt/vt_core.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/dev/vt/vt_core.c ============================================================================== --- stable/9/sys/dev/vt/vt_core.c Mon Feb 2 18:20:10 2015 (r278105) +++ stable/9/sys/dev/vt/vt_core.c Mon Feb 2 18:48:49 2015 (r278106) @@ -1718,20 +1718,23 @@ skip_thunk: } VT_UNLOCK(vd); return (EINVAL); - case VT_WAITACTIVE: + case VT_WAITACTIVE: { + unsigned int idx; + error = 0; - i = *(unsigned int *)data; - if (i > VT_MAXWINDOWS) + idx = *(unsigned int *)data; + if (idx > VT_MAXWINDOWS) return (EINVAL); - if (i != 0) - vw = vd->vd_windows[i - 1]; + if (idx > 0) + vw = vd->vd_windows[idx - 1]; VT_LOCK(vd); while (vd->vd_curwindow != vw && error == 0) error = cv_wait_sig(&vd->vd_winswitch, &vd->vd_lock); VT_UNLOCK(vd); return (error); + } case VT_SETMODE: { /* set screen switcher mode */ struct vt_mode *mode; struct proc *p1; From owner-svn-src-stable@FreeBSD.ORG Mon Feb 2 18:48:51 2015 Return-Path: Delivered-To: svn-src-stable@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 80173416; Mon, 2 Feb 2015 18:48:51 +0000 (UTC) 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 515C69D; Mon, 2 Feb 2015 18:48:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t12ImpKp022078; Mon, 2 Feb 2015 18:48:51 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t12Impqj022077; Mon, 2 Feb 2015 18:48:51 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201502021848.t12Impqj022077@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 2 Feb 2015 18:48: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: r278106 - in stable: 10/sys/dev/vt 9/sys/dev/vt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2015 18:48:51 -0000 Author: delphij Date: Mon Feb 2 18:48:49 2015 New Revision: 278106 URL: https://svnweb.freebsd.org/changeset/base/278106 Log: MFC r277806: Use unsigned int for index value. Without this change a local attacker could trigger a panic by tricking the kernel into accessing undefined kernel memory. We would like to acknowledge Francisco Falcon from CORE Security Technologies who discovered the issue and reported to the FreeBSD Security Team. More information can be found at CORE Security's advisory at: http://www.coresecurity.com/content/freebsd-kernel-multiple-vulnerabilities This is an errata candidate for releng/10.1 and releng/9.3. Earlier releases are not affected. Reported by: Francisco Falcon from CORE Security Technologies Security: CVE-2014-0998 Reviewed by: dumbbell Modified: stable/10/sys/dev/vt/vt_core.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/dev/vt/vt_core.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/10/sys/dev/vt/vt_core.c ============================================================================== --- stable/10/sys/dev/vt/vt_core.c Mon Feb 2 18:20:10 2015 (r278105) +++ stable/10/sys/dev/vt/vt_core.c Mon Feb 2 18:48:49 2015 (r278106) @@ -2356,20 +2356,23 @@ skip_thunk: } VT_UNLOCK(vd); return (EINVAL); - case VT_WAITACTIVE: + case VT_WAITACTIVE: { + unsigned int idx; + error = 0; - i = *(unsigned int *)data; - if (i > VT_MAXWINDOWS) + idx = *(unsigned int *)data; + if (idx > VT_MAXWINDOWS) return (EINVAL); - if (i != 0) - vw = vd->vd_windows[i - 1]; + if (idx > 0) + vw = vd->vd_windows[idx - 1]; VT_LOCK(vd); while (vd->vd_curwindow != vw && error == 0) error = cv_wait_sig(&vd->vd_winswitch, &vd->vd_lock); VT_UNLOCK(vd); return (error); + } case VT_SETMODE: { /* set screen switcher mode */ struct vt_mode *mode; struct proc *p1; From owner-svn-src-stable@FreeBSD.ORG Tue Feb 3 00:29:59 2015 Return-Path: Delivered-To: svn-src-stable@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 655E4C19; Tue, 3 Feb 2015 00:29:59 +0000 (UTC) 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 50BEFCA3; Tue, 3 Feb 2015 00:29:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t130Txuo085349; Tue, 3 Feb 2015 00:29:59 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t130TxcS085348; Tue, 3 Feb 2015 00:29:59 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201502030029.t130TxcS085348@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Tue, 3 Feb 2015 00:29:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278122 - stable/10/sys/powerpc/pseries X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2015 00:29:59 -0000 Author: nwhitehorn Date: Tue Feb 3 00:29:58 2015 New Revision: 278122 URL: https://svnweb.freebsd.org/changeset/base/278122 Log: MFC r277792: Fix bug in mapppings of multiple pages exposed by updates to the VSCSI support in QEMU. Each page of a many page mapping was getting mapped to the same physical address, which is not the desired behavior. Modified: stable/10/sys/powerpc/pseries/plpar_iommu.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/powerpc/pseries/plpar_iommu.c ============================================================================== --- stable/10/sys/powerpc/pseries/plpar_iommu.c Tue Feb 3 00:19:50 2015 (r278121) +++ stable/10/sys/powerpc/pseries/plpar_iommu.c Tue Feb 3 00:29:58 2015 (r278122) @@ -191,13 +191,13 @@ phyp_iommu_map(device_t dev, bus_dma_seg tce = trunc_page(segs[i].ds_addr); tce |= 0x3; /* read/write */ - if (papr_supports_stuff_tce) { - error = phyp_hcall(H_STUFF_TCE, window->map->iobn, - alloced, tce, allocsize/PAGE_SIZE); - } else { - for (j = 0; j < allocsize; j += PAGE_SIZE) - error = phyp_hcall(H_PUT_TCE, window->map->iobn, - alloced + j, tce + j); + for (j = 0; j < allocsize; j += PAGE_SIZE) { + error = phyp_hcall(H_PUT_TCE, window->map->iobn, + alloced + j, tce + j); + if (error < 0) { + panic("IOMMU mapping error: %d\n", error); + return (ENOMEM); + } } segs[i].ds_addr = alloced + (segs[i].ds_addr & PAGE_MASK); From owner-svn-src-stable@FreeBSD.ORG Tue Feb 3 07:59:34 2015 Return-Path: Delivered-To: svn-src-stable@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 739BED5; Tue, 3 Feb 2015 07:59:34 +0000 (UTC) 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 5E7F81AD; Tue, 3 Feb 2015 07:59:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t137xYYt094972; Tue, 3 Feb 2015 07:59:34 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t137xYcl094971; Tue, 3 Feb 2015 07:59:34 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502030759.t137xYcl094971@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 3 Feb 2015 07:59:34 +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: r278140 - in stable: 10/sys/netgraph 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-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2015 07:59:34 -0000 Author: dim Date: Tue Feb 3 07:59:33 2015 New Revision: 278140 URL: https://svnweb.freebsd.org/changeset/base/278140 Log: MFC r277951: Fix a bunch of -Wcast-qual warnings in netgraph's ng_parse.c, by using __DECONST. No functional change. Modified: stable/9/sys/netgraph/ng_parse.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/netgraph/ng_parse.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/netgraph/ng_parse.c ============================================================================== --- stable/9/sys/netgraph/ng_parse.c Tue Feb 3 06:22:46 2015 (r278139) +++ stable/9/sys/netgraph/ng_parse.c Tue Feb 3 07:59:33 2015 (r278140) @@ -1122,7 +1122,7 @@ ng_bytearray_parse(const struct ng_parse struct ng_parse_type subtype; subtype = ng_parse_bytearray_subtype; - *(const void **)&subtype.private = type->info; + subtype.private = __DECONST(void *, type->info); return ng_array_parse(&subtype, s, off, start, buf, buflen); } } @@ -1134,7 +1134,7 @@ ng_bytearray_unparse(const struct ng_par struct ng_parse_type subtype; subtype = ng_parse_bytearray_subtype; - *(const void **)&subtype.private = type->info; + subtype.private = __DECONST(void *, type->info); return ng_array_unparse(&subtype, data, off, cbuf, cbuflen); } @@ -1145,7 +1145,7 @@ ng_bytearray_getDefault(const struct ng_ struct ng_parse_type subtype; subtype = ng_parse_bytearray_subtype; - *(const void **)&subtype.private = type->info; + subtype.private = __DECONST(void *, type->info); return ng_array_getDefault(&subtype, start, buf, buflen); } From owner-svn-src-stable@FreeBSD.ORG Tue Feb 3 07:59:35 2015 Return-Path: Delivered-To: svn-src-stable@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 15FD8D6; Tue, 3 Feb 2015 07:59:35 +0000 (UTC) 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 010CC1AE; Tue, 3 Feb 2015 07:59:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t137xYwE094978; Tue, 3 Feb 2015 07:59:34 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t137xYUv094977; Tue, 3 Feb 2015 07:59:34 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502030759.t137xYUv094977@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 3 Feb 2015 07:59: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: r278140 - in stable: 10/sys/netgraph 9/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-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2015 07:59:35 -0000 Author: dim Date: Tue Feb 3 07:59:33 2015 New Revision: 278140 URL: https://svnweb.freebsd.org/changeset/base/278140 Log: MFC r277951: Fix a bunch of -Wcast-qual warnings in netgraph's ng_parse.c, by using __DECONST. No functional change. Modified: stable/10/sys/netgraph/ng_parse.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/netgraph/ng_parse.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/netgraph/ng_parse.c ============================================================================== --- stable/10/sys/netgraph/ng_parse.c Tue Feb 3 06:22:46 2015 (r278139) +++ stable/10/sys/netgraph/ng_parse.c Tue Feb 3 07:59:33 2015 (r278140) @@ -1122,7 +1122,7 @@ ng_bytearray_parse(const struct ng_parse struct ng_parse_type subtype; subtype = ng_parse_bytearray_subtype; - *(const void **)&subtype.private = type->info; + subtype.private = __DECONST(void *, type->info); return ng_array_parse(&subtype, s, off, start, buf, buflen); } } @@ -1134,7 +1134,7 @@ ng_bytearray_unparse(const struct ng_par struct ng_parse_type subtype; subtype = ng_parse_bytearray_subtype; - *(const void **)&subtype.private = type->info; + subtype.private = __DECONST(void *, type->info); return ng_array_unparse(&subtype, data, off, cbuf, cbuflen); } @@ -1145,7 +1145,7 @@ ng_bytearray_getDefault(const struct ng_ struct ng_parse_type subtype; subtype = ng_parse_bytearray_subtype; - *(const void **)&subtype.private = type->info; + subtype.private = __DECONST(void *, type->info); return ng_array_getDefault(&subtype, start, buf, buflen); } From owner-svn-src-stable@FreeBSD.ORG Tue Feb 3 08:03:21 2015 Return-Path: Delivered-To: svn-src-stable@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 467293E6; Tue, 3 Feb 2015 08:03:21 +0000 (UTC) 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 31732279; Tue, 3 Feb 2015 08:03:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1383LvM099171; Tue, 3 Feb 2015 08:03:21 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1383LUm099170; Tue, 3 Feb 2015 08:03:21 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502030803.t1383LUm099170@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 3 Feb 2015 08:03: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: r278141 - in stable: 10/sys/fs/udf 9/sys/fs/udf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2015 08:03:21 -0000 Author: dim Date: Tue Feb 3 08:03:19 2015 New Revision: 278141 URL: https://svnweb.freebsd.org/changeset/base/278141 Log: MFC r277952: Fix a -Wcast-qual warning in udf_vnops.c, by using __DECONST. No functional change. Modified: stable/10/sys/fs/udf/udf_vnops.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/fs/udf/udf_vnops.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/fs/udf/udf_vnops.c ============================================================================== --- stable/10/sys/fs/udf/udf_vnops.c Tue Feb 3 07:59:33 2015 (r278140) +++ stable/10/sys/fs/udf/udf_vnops.c Tue Feb 3 08:03:19 2015 (r278141) @@ -526,8 +526,9 @@ udf_transname(char *cs0string, char *des } while (unilen > 0 && destleft > 0) { - udf_iconv->conv(udfmp->im_d2l, (const char **)&unibuf, - (size_t *)&unilen, (char **)&destname, &destleft); + udf_iconv->conv(udfmp->im_d2l, __DECONST(const char **, + &unibuf), (size_t *)&unilen, (char **)&destname, + &destleft); /* Unconverted character found */ if (unilen > 0 && destleft > 0) { *destname++ = '?'; From owner-svn-src-stable@FreeBSD.ORG Tue Feb 3 08:03:20 2015 Return-Path: Delivered-To: svn-src-stable@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 CBEA23E5; Tue, 3 Feb 2015 08:03:20 +0000 (UTC) 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 B72DD278; Tue, 3 Feb 2015 08:03:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1383KKG099165; Tue, 3 Feb 2015 08:03:20 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1383KsT099164; Tue, 3 Feb 2015 08:03:20 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502030803.t1383KsT099164@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 3 Feb 2015 08:03:20 +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: r278141 - in stable: 10/sys/fs/udf 9/sys/fs/udf 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2015 08:03:20 -0000 Author: dim Date: Tue Feb 3 08:03:19 2015 New Revision: 278141 URL: https://svnweb.freebsd.org/changeset/base/278141 Log: MFC r277952: Fix a -Wcast-qual warning in udf_vnops.c, by using __DECONST. No functional change. Modified: stable/9/sys/fs/udf/udf_vnops.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/fs/udf/udf_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/fs/udf/udf_vnops.c ============================================================================== --- stable/9/sys/fs/udf/udf_vnops.c Tue Feb 3 07:59:33 2015 (r278140) +++ stable/9/sys/fs/udf/udf_vnops.c Tue Feb 3 08:03:19 2015 (r278141) @@ -527,8 +527,9 @@ udf_transname(char *cs0string, char *des } while (unilen > 0 && destleft > 0) { - udf_iconv->conv(udfmp->im_d2l, (const char **)&unibuf, - (size_t *)&unilen, (char **)&destname, &destleft); + udf_iconv->conv(udfmp->im_d2l, __DECONST(const char **, + &unibuf), (size_t *)&unilen, (char **)&destname, + &destleft); /* Unconverted character found */ if (unilen > 0 && destleft > 0) { *destname++ = '?'; From owner-svn-src-stable@FreeBSD.ORG Tue Feb 3 08:06:15 2015 Return-Path: Delivered-To: svn-src-stable@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 28EA7665; Tue, 3 Feb 2015 08:06:15 +0000 (UTC) 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 137F62A2; Tue, 3 Feb 2015 08:06:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1386EtO099623; Tue, 3 Feb 2015 08:06:14 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1386ECb099621; Tue, 3 Feb 2015 08:06:14 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201502030806.t1386ECb099621@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 3 Feb 2015 08:06: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: r278142 - 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-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2015 08:06:15 -0000 Author: mav Date: Tue Feb 3 08:06:13 2015 New Revision: 278142 URL: https://svnweb.freebsd.org/changeset/base/278142 Log: MFC r277419: Allow skipping dmu_buf_will_dirty() call in dsl_dir_transfer_space(). dsl_dir_transfer_space() is mostly called after dsl_dir_diduse_space(), which already calls dmu_buf_will_dirty() for the same dbuf and tx, so its duplicate call in those cases will change nothing, only spend time. Skipping this call by four times reduces time spent in dbuf_write_done() and descendants, updating dataset statistics with several congested lock acquisitions. When rewriting 8K zvol blocks at 1GB/s rate, this reduces CPU time spent inside dbuf_write_done(), according to profiling, from 45% of 683K samples to 18% of 422K. 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_dir.c Directory Properties: stable/10/ (props changed) 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 Tue Feb 3 08:03:19 2015 (r278141) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Tue Feb 3 08:06:13 2015 (r278142) @@ -136,7 +136,7 @@ dsl_dataset_block_born(dsl_dataset_t *ds dsl_dir_diduse_space(ds->ds_dir, DD_USED_HEAD, delta, compressed, uncompressed, tx); dsl_dir_transfer_space(ds->ds_dir, used - delta, - DD_USED_REFRSRV, DD_USED_HEAD, tx); + DD_USED_REFRSRV, DD_USED_HEAD, NULL); } int @@ -179,7 +179,7 @@ dsl_dataset_block_kill(dsl_dataset_t *ds dsl_dir_diduse_space(ds->ds_dir, DD_USED_HEAD, delta, -compressed, -uncompressed, tx); dsl_dir_transfer_space(ds->ds_dir, -used - delta, - DD_USED_REFRSRV, DD_USED_HEAD, tx); + DD_USED_REFRSRV, DD_USED_HEAD, NULL); } else { dprintf_bp(bp, "putting on dead list: %s", ""); if (async) { @@ -2837,7 +2837,7 @@ dsl_dataset_clone_swap_sync_impl(dsl_dat origin_head->ds_dir->dd_origin_txg, UINT64_MAX, &odl_used, &odl_comp, &odl_uncomp); dsl_dir_transfer_space(origin_head->ds_dir, cdl_used - odl_used, - DD_USED_HEAD, DD_USED_SNAP, tx); + DD_USED_HEAD, DD_USED_SNAP, NULL); } /* swap ds_*_bytes */ 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 Tue Feb 3 08:03:19 2015 (r278141) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Tue Feb 3 08:06:13 2015 (r278142) @@ -1389,7 +1389,7 @@ dsl_dir_diduse_space(dsl_dir_t *dd, dd_u accounted_delta, compressed, uncompressed, tx); dsl_dir_transfer_space(dd->dd_parent, used - accounted_delta, - DD_USED_CHILD_RSRV, DD_USED_CHILD, tx); + DD_USED_CHILD_RSRV, DD_USED_CHILD, NULL); } } @@ -1397,7 +1397,7 @@ void dsl_dir_transfer_space(dsl_dir_t *dd, int64_t delta, dd_used_t oldtype, dd_used_t newtype, dmu_tx_t *tx) { - ASSERT(dmu_tx_is_syncing(tx)); + ASSERT(tx == NULL || dmu_tx_is_syncing(tx)); ASSERT(oldtype < DD_USED_NUM); ASSERT(newtype < DD_USED_NUM); @@ -1405,7 +1405,8 @@ dsl_dir_transfer_space(dsl_dir_t *dd, in !(dsl_dir_phys(dd)->dd_flags & DD_FLAG_USED_BREAKDOWN)) return; - dmu_buf_will_dirty(dd->dd_dbuf, tx); + if (tx != NULL) + dmu_buf_will_dirty(dd->dd_dbuf, tx); mutex_enter(&dd->dd_lock); ASSERT(delta > 0 ? dsl_dir_phys(dd)->dd_used_breakdown[oldtype] >= delta : From owner-svn-src-stable@FreeBSD.ORG Tue Feb 3 08:07:00 2015 Return-Path: Delivered-To: svn-src-stable@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 871D77AD; Tue, 3 Feb 2015 08:07:00 +0000 (UTC) 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 719A92C7; Tue, 3 Feb 2015 08:07:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t13870KG099773; Tue, 3 Feb 2015 08:07:00 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t13870Zc099764; Tue, 3 Feb 2015 08:07:00 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201502030807.t13870Zc099764@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 3 Feb 2015 08:07:00 +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: r278143 - 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2015 08:07:00 -0000 Author: mav Date: Tue Feb 3 08:06:59 2015 New Revision: 278143 URL: https://svnweb.freebsd.org/changeset/base/278143 Log: MFC r277419: Allow skipping dmu_buf_will_dirty() call in dsl_dir_transfer_space(). dsl_dir_transfer_space() is mostly called after dsl_dir_diduse_space(), which already calls dmu_buf_will_dirty() for the same dbuf and tx, so its duplicate call in those cases will change nothing, only spend time. Skipping this call by four times reduces time spent in dbuf_write_done() and descendants, updating dataset statistics with several congested lock acquisitions. When rewriting 8K zvol blocks at 1GB/s rate, this reduces CPU time spent inside dbuf_write_done(), according to profiling, from 45% of 683K samples to 18% of 422K. 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_dir.c Directory Properties: stable/9/ (props changed) 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 Tue Feb 3 08:06:13 2015 (r278142) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Tue Feb 3 08:06:59 2015 (r278143) @@ -115,7 +115,7 @@ dsl_dataset_block_born(dsl_dataset_t *ds dsl_dir_diduse_space(ds->ds_dir, DD_USED_HEAD, delta, compressed, uncompressed, tx); dsl_dir_transfer_space(ds->ds_dir, used - delta, - DD_USED_REFRSRV, DD_USED_HEAD, tx); + DD_USED_REFRSRV, DD_USED_HEAD, NULL); } int @@ -158,7 +158,7 @@ dsl_dataset_block_kill(dsl_dataset_t *ds dsl_dir_diduse_space(ds->ds_dir, DD_USED_HEAD, delta, -compressed, -uncompressed, tx); dsl_dir_transfer_space(ds->ds_dir, -used - delta, - DD_USED_REFRSRV, DD_USED_HEAD, tx); + DD_USED_REFRSRV, DD_USED_HEAD, NULL); } else { dprintf_bp(bp, "putting on dead list: %s", ""); if (async) { @@ -2724,7 +2724,7 @@ dsl_dataset_clone_swap_sync_impl(dsl_dat origin_head->ds_dir->dd_origin_txg, UINT64_MAX, &odl_used, &odl_comp, &odl_uncomp); dsl_dir_transfer_space(origin_head->ds_dir, cdl_used - odl_used, - DD_USED_HEAD, DD_USED_SNAP, tx); + DD_USED_HEAD, DD_USED_SNAP, NULL); } /* swap ds_*_bytes */ Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Tue Feb 3 08:06:13 2015 (r278142) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Tue Feb 3 08:06:59 2015 (r278143) @@ -1381,7 +1381,7 @@ dsl_dir_diduse_space(dsl_dir_t *dd, dd_u accounted_delta, compressed, uncompressed, tx); dsl_dir_transfer_space(dd->dd_parent, used - accounted_delta, - DD_USED_CHILD_RSRV, DD_USED_CHILD, tx); + DD_USED_CHILD_RSRV, DD_USED_CHILD, NULL); } } @@ -1389,14 +1389,15 @@ void dsl_dir_transfer_space(dsl_dir_t *dd, int64_t delta, dd_used_t oldtype, dd_used_t newtype, dmu_tx_t *tx) { - ASSERT(dmu_tx_is_syncing(tx)); + ASSERT(tx == NULL || dmu_tx_is_syncing(tx)); ASSERT(oldtype < DD_USED_NUM); ASSERT(newtype < DD_USED_NUM); if (delta == 0 || !(dd->dd_phys->dd_flags & DD_FLAG_USED_BREAKDOWN)) return; - dmu_buf_will_dirty(dd->dd_dbuf, tx); + if (tx != NULL) + dmu_buf_will_dirty(dd->dd_dbuf, tx); mutex_enter(&dd->dd_lock); ASSERT(delta > 0 ? dd->dd_phys->dd_used_breakdown[oldtype] >= delta : From owner-svn-src-stable@FreeBSD.ORG Tue Feb 3 11:45:02 2015 Return-Path: Delivered-To: svn-src-stable@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 4192B607; Tue, 3 Feb 2015 11:45:02 +0000 (UTC) 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 22288DC8; Tue, 3 Feb 2015 11:45:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t13Bj1r3002964; Tue, 3 Feb 2015 11:45:02 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t13Bj1b1002963; Tue, 3 Feb 2015 11:45:01 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201502031145.t13Bj1b1002963@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 3 Feb 2015 11:45: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: r278149 - 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-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2015 11:45:02 -0000 Author: kib Date: Tue Feb 3 11:45:01 2015 New Revision: 278149 URL: https://svnweb.freebsd.org/changeset/base/278149 Log: MFC r277793: Rewrite pmap_enter(9) man page. Modified: stable/10/share/man/man9/pmap_enter.9 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/pmap_enter.9 ============================================================================== --- stable/10/share/man/man9/pmap_enter.9 Tue Feb 3 11:34:18 2015 (r278148) +++ stable/10/share/man/man9/pmap_enter.9 Tue Feb 3 11:45:01 2015 (r278149) @@ -1,5 +1,6 @@ .\" .\" Copyright (c) 2003 Bruce M Simpson +.\" Copyright (c) 2014 The FreeBSD Foundation .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 21, 2003 +.Dd January 27, 2015 .Dt PMAP_ENTER 9 .Os .Sh NAME @@ -35,34 +36,129 @@ .In sys/param.h .In vm/vm.h .In vm/pmap.h -.Ft void +.Ft int .Fo pmap_enter -.Fa "pmap_t pmap" "vm_offset_t va" "vm_page_t p" "vm_prot_t prot" -.Fa "boolean_t wired" +.Fa "pmap_t pmap" "vm_offset_t va" "vm_page_t m" "vm_prot_t prot" +.Fa "u_int flags" "int8_t psind" .Fc .Sh DESCRIPTION The .Fn pmap_enter -function inserts the given physical page -.Fa p , -into the physical map -.Fa pmap , -at the virtual address -.Fa va , +function creates a mapping in the physical map +.Fa pmap +from the virtual address +.Fa va +to the physical page +.Fa m with the protection .Fa prot . -If -.Fa wired -is -.Dv TRUE , -then increment the wired count for the page as soon as the mapping -is inserted into -.Fa pmap . -.Sh IMPLEMENTATION NOTES -This routine MAY NOT lazy-evaluate the entry; it is required by -specification to make the requested entry at the time it is called. +Any previous mapping at the virtual address +.Fa va +is destroyed. +.Pp +The +.Fa flags +argument may have the following values: +.Bl -tag -width ".Dv PMAP_ENTER_NOSLEEP" +.It Dv VM_PROT_READ +A read access to the given virtual address triggered the call. +.It Dv VM_PROT_WRITE +A write access to the given virtual address triggered the call. +.It Dv VM_PROT_EXECUTE +An execute access to the given virtual address triggered the call. +.It Dv PMAP_ENTER_WIRED +The mapping should be marked as wired. +.It Dv PMAP_ENTER_NOSLEEP +This function may not sleep during creation of the mapping. +If the mapping cannot be created without sleeping, an appropriate +Mach VM error is returned. +.El +If the +.Dv PMAP_ENTER_NOSLEEP +flag is not specified, this function must create the requested mapping +before returning. +It may not fail. +In order to create the requested mapping, this function may destroy +any non-wired mapping in any pmap. +.Pp +The +.Fa psind +parameter specifies the page size that should be used by the mapping. +The supported page sizes are described by the global array +.Dv pagesizes[] . +The desired page size is specified by passing the index of the array +element that equals the desired page size. +.Pp +When the +.Fn pmap_enter +function destroys or updates a managed mapping, including an existing +mapping at virtual address +.Fa va , +it updates the +.Ft vm_page +structure corresponding to the previously mapped physical page. +If the physical page was accessed through the managed mapping, +then the +.Ft vm_page +structure's +.Dv PGA_REFERENCED +aflag is set. +If the physical page was modified through the managed mapping, then the +.Fn vm_page_dirty +function is called on the +.Ft vm_page +structure. +.Pp +The +.Dv PGA_WRITEABLE +aflag must be set for the page +.Fa m +if the new mapping is managed and writeable. +It is advised to clear +.Dv PGA_WRITEABLE +for destroyed mappings if the implementation can ensure +that no other writeable managed mappings for the previously +mapped pages exist. +.Pp +If the page +.Fa m +is managed, the page must be busied by the caller +or the owning object must be locked. +In the later case, the +.Dv PMAP_ENTER_NOSLEEP +must be specified by the caller. +.Pp +The +.Fn pmap_enter +function must handle the multiprocessor TLB consistency for the +given address. +.Sh NOTES +On amd64, arm and i386 architectures the existing implementation +of the +.Nm +function is incomplete, only value 0 for +.Fa psind +is supported. +Other supported architectures have +.Dv pagesizes[] +array of size 1. +.Sh RETURN VALUES +If successful, the +.Fn pmap_enter +function returns +.Er KERN_SUCCESS . +If the +.Dv PMAP_ENTER_NOSLEEP +flag was specified and the resources required for the mapping cannot +be acquired without sleeping, +.Dv KERN_RESOURCE_SHORTAGE +is returned. .Sh SEE ALSO .Xr pmap 9 .Sh AUTHORS -This manual page was written by -.An Bruce M Simpson Aq bms@spc.org . +This manual page was first written by +.An Bruce M Simpson Aq Mt bms@spc.org +and then rewritten by +.An Alan Cox Aq Mt alc@FreeBSD.org +and +.An Konstantin Belousov Aq Mt kib@FreeBSD.org . From owner-svn-src-stable@FreeBSD.ORG Tue Feb 3 11:54:34 2015 Return-Path: Delivered-To: svn-src-stable@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 357C08C8; Tue, 3 Feb 2015 11:54:34 +0000 (UTC) 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 2141DEDE; Tue, 3 Feb 2015 11:54:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t13BsXr6007564; Tue, 3 Feb 2015 11:54:34 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t13BsXeX007562; Tue, 3 Feb 2015 11:54:33 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201502031154.t13BsXeX007562@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 3 Feb 2015 11:54: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: r278150 - stable/10/sys/ufs/ufs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2015 11:54:34 -0000 Author: kib Date: Tue Feb 3 11:54:33 2015 New Revision: 278150 URL: https://svnweb.freebsd.org/changeset/base/278150 Log: MFC r277794: The sys_quotactl() contract demands that the mount point is vfs_unbusy()ed when the cmd is Q_QUOTAON, regardless of other input parameters or error return. Modified: stable/10/sys/ufs/ufs/ufs_quota.c stable/10/sys/ufs/ufs/ufs_vfsops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ufs/ufs_quota.c ============================================================================== --- stable/10/sys/ufs/ufs/ufs_quota.c Tue Feb 3 11:45:01 2015 (r278149) +++ stable/10/sys/ufs/ufs/ufs_quota.c Tue Feb 3 11:54:33 2015 (r278150) @@ -495,11 +495,15 @@ quotaon(struct thread *td, struct mount struct nameidata nd; error = priv_check(td, PRIV_UFS_QUOTAON); - if (error) + if (error != 0) { + vfs_unbusy(mp); return (error); + } - if (mp->mnt_flag & MNT_RDONLY) + if ((mp->mnt_flag & MNT_RDONLY) != 0) { + vfs_unbusy(mp); return (EROFS); + } ump = VFSTOUFS(mp); dq = NODQUOT; Modified: stable/10/sys/ufs/ufs/ufs_vfsops.c ============================================================================== --- stable/10/sys/ufs/ufs/ufs_vfsops.c Tue Feb 3 11:45:01 2015 (r278149) +++ stable/10/sys/ufs/ufs/ufs_vfsops.c Tue Feb 3 11:54:33 2015 (r278150) @@ -92,6 +92,9 @@ ufs_quotactl(mp, cmds, id, arg) void *arg; { #ifndef QUOTA + if ((cmds >> SUBCMDSHIFT) == Q_QUOTAON) + vfs_unbusy(mp); + return (EOPNOTSUPP); #else struct thread *td; @@ -112,11 +115,16 @@ ufs_quotactl(mp, cmds, id, arg) break; default: + if (cmd == Q_QUOTAON) + vfs_unbusy(mp); return (EINVAL); } } - if ((u_int)type >= MAXQUOTAS) + if ((u_int)type >= MAXQUOTAS) { + if (cmd == Q_QUOTAON) + vfs_unbusy(mp); return (EINVAL); + } switch (cmd) { case Q_QUOTAON: From owner-svn-src-stable@FreeBSD.ORG Tue Feb 3 14:36:49 2015 Return-Path: Delivered-To: svn-src-stable@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 65927356; Tue, 3 Feb 2015 14:36:49 +0000 (UTC) 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 5106B7E5; Tue, 3 Feb 2015 14:36:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t13EanNa084116; Tue, 3 Feb 2015 14:36:49 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t13Eamnv084114; Tue, 3 Feb 2015 14:36:48 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201502031436.t13Eamnv084114@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 3 Feb 2015 14:36: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: r278155 - in stable/10/contrib/amd: amd hlfsd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2015 14:36:49 -0000 Author: pfg Date: Tue Feb 3 14:36:48 2015 New Revision: 278155 URL: https://svnweb.freebsd.org/changeset/base/278155 Log: MFV r277814, r277868, r277869: amd: Add extra check for NULL before deref. MFV r277841: Fix a clang 3.6.0 warning (from dim) CID: 274421 Obtained from: NetBSD MFC after: 4 days Modified: stable/10/contrib/amd/amd/amfs_generic.c stable/10/contrib/amd/hlfsd/homedir.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/amd/amd/amfs_generic.c ============================================================================== --- stable/10/contrib/amd/amd/amfs_generic.c Tue Feb 3 14:17:29 2015 (r278154) +++ stable/10/contrib/amd/amd/amfs_generic.c Tue Feb 3 14:36:48 2015 (r278155) @@ -1113,7 +1113,7 @@ amfs_generic_mount_child(am_node *new_mp new_mp->am_transp = (SVCXPRT *) xmalloc(sizeof(SVCXPRT)); *(new_mp->am_transp) = *current_transp; } - if (error && (new_mp->am_mnt->mf_ops == &amfs_error_ops)) + if (error && new_mp->am_mnt && (new_mp->am_mnt->mf_ops == &amfs_error_ops)) new_mp->am_error = error; if (new_mp->am_error > 0) Modified: stable/10/contrib/amd/hlfsd/homedir.c ============================================================================== --- stable/10/contrib/amd/hlfsd/homedir.c Tue Feb 3 14:17:29 2015 (r278154) +++ stable/10/contrib/amd/hlfsd/homedir.c Tue Feb 3 14:36:48 2015 (r278155) @@ -494,7 +494,7 @@ readent: buf[0] = '\0'; fgets(buf, 256, passwd_fp); passwd_line++; - if (!buf || buf[0] == '\0') + if (buf[0] == '\0') goto readent; /* read user name */ From owner-svn-src-stable@FreeBSD.ORG Tue Feb 3 14:37:39 2015 Return-Path: Delivered-To: svn-src-stable@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 58781499; Tue, 3 Feb 2015 14:37:39 +0000 (UTC) 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 444C27F9; Tue, 3 Feb 2015 14:37:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t13EbdDh084281; Tue, 3 Feb 2015 14:37:39 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t13EbcXL084279; Tue, 3 Feb 2015 14:37:38 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201502031437.t13EbcXL084279@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 3 Feb 2015 14:37:38 +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: r278156 - in stable/9/contrib/amd: amd hlfsd 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2015 14:37:39 -0000 Author: pfg Date: Tue Feb 3 14:37:38 2015 New Revision: 278156 URL: https://svnweb.freebsd.org/changeset/base/278156 Log: MFV r277814, r277868, r277869: amd: Add extra check for NULL before deref. MFV r277841: Fix a clang 3.6.0 warning (from dim) CID: 274421 Obtained from: NetBSD MFC after: 4 days Modified: stable/9/contrib/amd/amd/amfs_generic.c stable/9/contrib/amd/hlfsd/homedir.c Directory Properties: stable/9/contrib/amd/ (props changed) Modified: stable/9/contrib/amd/amd/amfs_generic.c ============================================================================== --- stable/9/contrib/amd/amd/amfs_generic.c Tue Feb 3 14:36:48 2015 (r278155) +++ stable/9/contrib/amd/amd/amfs_generic.c Tue Feb 3 14:37:38 2015 (r278156) @@ -1113,7 +1113,7 @@ amfs_generic_mount_child(am_node *new_mp new_mp->am_transp = (SVCXPRT *) xmalloc(sizeof(SVCXPRT)); *(new_mp->am_transp) = *current_transp; } - if (error && (new_mp->am_mnt->mf_ops == &amfs_error_ops)) + if (error && new_mp->am_mnt && (new_mp->am_mnt->mf_ops == &amfs_error_ops)) new_mp->am_error = error; if (new_mp->am_error > 0) Modified: stable/9/contrib/amd/hlfsd/homedir.c ============================================================================== --- stable/9/contrib/amd/hlfsd/homedir.c Tue Feb 3 14:36:48 2015 (r278155) +++ stable/9/contrib/amd/hlfsd/homedir.c Tue Feb 3 14:37:38 2015 (r278156) @@ -494,7 +494,7 @@ readent: buf[0] = '\0'; fgets(buf, 256, passwd_fp); passwd_line++; - if (!buf || buf[0] == '\0') + if (buf[0] == '\0') goto readent; /* read user name */ From owner-svn-src-stable@FreeBSD.ORG Tue Feb 3 15:31:07 2015 Return-Path: Delivered-To: svn-src-stable@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 B48C5437; Tue, 3 Feb 2015 15:31:07 +0000 (UTC) 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 86CBAD98; Tue, 3 Feb 2015 15:31:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t13FV74G010424; Tue, 3 Feb 2015 15:31:07 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t13FV7Nc010423; Tue, 3 Feb 2015 15:31:07 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201502031531.t13FV7Nc010423@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 3 Feb 2015 15:31: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: r278157 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2015 15:31:07 -0000 Author: emaste Date: Tue Feb 3 15:31:06 2015 New Revision: 278157 URL: https://svnweb.freebsd.org/changeset/base/278157 Log: Define SHT_GNU_LIBLIST and R_MIPS_64 MFC of r260793 Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Tue Feb 3 15:35:59 2015 Return-Path: Delivered-To: svn-src-stable@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 0878B5AC; Tue, 3 Feb 2015 15:35:59 +0000 (UTC) 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 E8AA2E52; Tue, 3 Feb 2015 15:35:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t13FZwQL013791; Tue, 3 Feb 2015 15:35:58 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t13FZw7l013790; Tue, 3 Feb 2015 15:35:58 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201502031535.t13FZw7l013790@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 3 Feb 2015 15:35: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: r278158 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2015 15:35:59 -0000 Author: emaste Date: Tue Feb 3 15:35:58 2015 New Revision: 278158 URL: https://svnweb.freebsd.org/changeset/base/278158 Log: Define SHT_GNU_LIBLIST and R_MIPS_64 MFC of r260793 Modified: stable/10/sys/sys/elf_common.h Modified: stable/10/sys/sys/elf_common.h ============================================================================== --- stable/10/sys/sys/elf_common.h Tue Feb 3 15:31:06 2015 (r278157) +++ stable/10/sys/sys/elf_common.h Tue Feb 3 15:35:58 2015 (r278158) @@ -281,6 +281,7 @@ typedef struct { #define SHT_SUNW_cap 0x6ffffff5 #define SHT_SUNW_SIGNATURE 0x6ffffff6 #define SHT_GNU_HASH 0x6ffffff6 +#define SHT_GNU_LIBLIST 0x6ffffff7 #define SHT_SUNW_ANNOTATE 0x6ffffff7 #define SHT_SUNW_DEBUGSTR 0x6ffffff8 #define SHT_SUNW_DEBUG 0x6ffffff9 @@ -772,6 +773,7 @@ typedef struct { #define R_MIPS_PC16 10 /* PC relative 16 bit */ #define R_MIPS_CALL16 11 /* 16 bit GOT entry for function */ #define R_MIPS_GPREL32 12 /* GP relative 32 bit */ +#define R_MIPS_64 18 /* Direct 64 bit */ #define R_MIPS_GOTHI16 21 /* GOT HI 16 bit */ #define R_MIPS_GOTLO16 22 /* GOT LO 16 bit */ #define R_MIPS_CALLHI16 30 /* upper 16 bit GOT entry for function */ From owner-svn-src-stable@FreeBSD.ORG Tue Feb 3 15:37:25 2015 Return-Path: Delivered-To: svn-src-stable@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 264F86FA; Tue, 3 Feb 2015 15:37:25 +0000 (UTC) Received: from mail-qa0-x236.google.com (mail-qa0-x236.google.com [IPv6:2607:f8b0:400d:c00::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D4353E6C; Tue, 3 Feb 2015 15:37:24 +0000 (UTC) Received: by mail-qa0-f54.google.com with SMTP id w8so34312060qac.13; Tue, 03 Feb 2015 07:37:24 -0800 (PST) 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:content-type; bh=B81YYcQAOg/13CEHUw6yLUv/hY/Y2n3rQuvSdi0MUWI=; b=h8EfbkmOSSx4rCDRt0GYvfy+hw5JsayS+wyvOcqpZfqbO42nV0b/S81RI47c+k6m5C KLfNXkzlpItV4PMkgRJyF6LVTa1vemTViIOBndnEZDZl0H1TOUA9Y0uxp0QK7EWVSRnZ y/EvWXhRaeMcXf9/oFCBBErxigTGQHKdlwI0CQvaXlqA2PKTTlTgK6zkzV/BEGWPMK/s MZcOMjMkHPxTV4t49UkEvf6G/O25+Anwbk5w3jHIXNEIe+S/enrq41Gl7QDGpsW1iSd7 XSkMYqFV+93EBVvofCfWpLOekkopqPQlEHsvuQ1TV6M9OOOO9b5SnklrkgSIa8FNzvIj 2ICA== X-Received: by 10.140.37.39 with SMTP id q36mr48957026qgq.89.1422977843889; Tue, 03 Feb 2015 07:37:23 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.140.39.209 with HTTP; Tue, 3 Feb 2015 07:37:03 -0800 (PST) In-Reply-To: <201502031531.t13FV7Nc010423@svn.freebsd.org> References: <201502031531.t13FV7Nc010423@svn.freebsd.org> From: Ed Maste Date: Tue, 3 Feb 2015 10:37:03 -0500 X-Google-Sender-Auth: OCOV5cMlUOrTmoY9M0TFGjk6VJ8 Message-ID: Subject: Re: svn commit: r278157 - stable/10 To: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2015 15:37:25 -0000 On 3 February 2015 at 10:31, Ed Maste wrote: > Author: emaste > Date: Tue Feb 3 15:31:06 2015 > New Revision: 278157 > URL: https://svnweb.freebsd.org/changeset/base/278157 Sorry, I accidentally managed to commit only the mergeinfo here. Contents committed in r278158. From owner-svn-src-stable@FreeBSD.ORG Tue Feb 3 20:08:06 2015 Return-Path: Delivered-To: svn-src-stable@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 E80537B; Tue, 3 Feb 2015 20:08:06 +0000 (UTC) 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 B90E1794; Tue, 3 Feb 2015 20:08:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t13K860q045944; Tue, 3 Feb 2015 20:08:06 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t13K862Y045943; Tue, 3 Feb 2015 20:08:06 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201502032008.t13K862Y045943@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Tue, 3 Feb 2015 20:08: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: r278168 - stable/10/contrib/ntp/ntpd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2015 20:08:07 -0000 Author: hiren Date: Tue Feb 3 20:08:05 2015 New Revision: 278168 URL: https://svnweb.freebsd.org/changeset/base/278168 Log: MFC r277202 ntpd tries to bind to IPv6 interfaces in 'tentative' state and fails as IPv6 is actually disabled. Fix it by making ntpd ignore such interfaces. Modified: stable/10/contrib/ntp/ntpd/ntp_io.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/ntp/ntpd/ntp_io.c ============================================================================== --- stable/10/contrib/ntp/ntpd/ntp_io.c Tue Feb 3 20:06:30 2015 (r278167) +++ stable/10/contrib/ntp/ntpd/ntp_io.c Tue Feb 3 20:08:05 2015 (r278168) @@ -1176,12 +1176,13 @@ set_wildcard_reuse(int family, int on) #ifdef INCLUDE_IPV6_SUPPORT static isc_boolean_t -is_anycast(struct sockaddr *sa, char *name) +is_not_bindable(struct sockaddr *sa, char *name) { -#if defined(SIOCGIFAFLAG_IN6) && defined(IN6_IFF_ANYCAST) +#if defined(SIOCGIFAFLAG_IN6) && \ + (defined(IN6_IFF_ANYCAST) || defined(IN6_IFF_NOTREADY)) struct in6_ifreq ifr6; int fd; - u_int32_t flags6; + u_int32_t flags6, exclude = 0; if (sa->sa_family != AF_INET6) return ISC_FALSE; @@ -1197,9 +1198,15 @@ is_anycast(struct sockaddr *sa, char *na } close(fd); flags6 = ifr6.ifr_ifru.ifru_flags6; - if ((flags6 & IN6_IFF_ANYCAST) != 0) +#if defined(IN6_IFF_ANYCAST) + exclude |= IN6_IFF_ANYCAST; +#endif /* !IN6_IFF_ANYCAST */ +#if defined(IN6_IFF_NOTREADY) + exclude |= IN6_IFF_NOTREADY; +#endif /* !IN6_IFF_NOTREADY */ + if ((flags6 & exclude) != 0) return ISC_TRUE; -#endif /* !SIOCGIFAFLAG_IN6 || !IN6_IFF_ANYCAST */ +#endif /* !SIOCGIFAFLAG_IN6 || !(IN6_IFF_ANYCAST && IN6_IFF_NOTREADY) */ return ISC_FALSE; } #endif /* !INCLUDE_IPV6_SUPPORT */ @@ -1344,7 +1351,7 @@ update_interfaces( continue; #ifdef INCLUDE_IPV6_SUPPORT - if (is_anycast((struct sockaddr *)&interface.sin, isc_if.name)) + if (is_not_bindable((struct sockaddr *)&interface.sin, isc_if.name)) continue; #endif /* !INCLUDE_IPV6_SUPPORT */ From owner-svn-src-stable@FreeBSD.ORG Tue Feb 3 21:55:00 2015 Return-Path: Delivered-To: svn-src-stable@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 660DBED6; Tue, 3 Feb 2015 21:55:00 +0000 (UTC) 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 372233B4; Tue, 3 Feb 2015 21:55:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t13Lt0Oq097584; Tue, 3 Feb 2015 21:55:00 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t13Lt0hB097582; Tue, 3 Feb 2015 21:55:00 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201502032155.t13Lt0hB097582@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Tue, 3 Feb 2015 21:55: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: r278169 - stable/10/sys/cam/scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2015 21:55:00 -0000 Author: ken Date: Tue Feb 3 21:54:59 2015 New Revision: 278169 URL: https://svnweb.freebsd.org/changeset/base/278169 Log: MFC 276831: r276831 | ken | 2015-01-08 09:27:56 -0700 (Thu, 08 Jan 2015) | 30 lines Fix a bug in the CAM SCSI probe code that caused changes in inquiry data to go undetected. The probe code does an MD5 checksum of the inquiry data (and page 0x80 serial number if available) before doing a reprobe of an existing device, and then compares a checksum after the probe to see whether the device has changed. This check was broken in January, 2000 by change 56146 when the extended inquiry probe code was added. In the extended inquiry probe case, it was calculating the checksum a second time. The second time it included the updated inquiry data from the short inquiry probe (first 36 bytes). So it wouldn't catch cases where the vendor, product, revision, etc. changed. This change will have the effect that when a device's inquiry data is updated and a rescan is issued, it will disappear and then reappear. This is the appropriate action, because if the inquiry data or serial number changes, it is either a different device or the device configuration may have changed significantly. (e.g. with updated firmware.) scsi_xpt.c: Don't calculate the initial MD5 checksum on standard inquiry data and the page 0x80 serial number if we have already calculated it. Sponsored by: Spectra Logic Modified: stable/10/sys/cam/scsi/scsi_xpt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_xpt.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_xpt.c Tue Feb 3 20:08:05 2015 (r278168) +++ stable/10/sys/cam/scsi/scsi_xpt.c Tue Feb 3 21:54:59 2015 (r278169) @@ -758,7 +758,8 @@ again: * serial number check finish, we attempt to figure out * whether we still have the same device. */ - if ((periph->path->device->flags & CAM_DEV_UNCONFIGURED) == 0) { + if (((periph->path->device->flags & CAM_DEV_UNCONFIGURED) == 0) + && ((softc->flags & PROBE_INQUIRY_CKSUM) == 0)) { MD5Init(&softc->context); MD5Update(&softc->context, (unsigned char *)inq_buf, From owner-svn-src-stable@FreeBSD.ORG Tue Feb 3 22:18:49 2015 Return-Path: Delivered-To: svn-src-stable@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 C646A57E; Tue, 3 Feb 2015 22:18:49 +0000 (UTC) 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 AEF2F810; Tue, 3 Feb 2015 22:18:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t13MInwk007754; Tue, 3 Feb 2015 22:18:49 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t13MImmT007749; Tue, 3 Feb 2015 22:18:48 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201502032218.t13MImmT007749@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Tue, 3 Feb 2015 22:18: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: r278170 - in stable/10: sbin/camcontrol sys/cam/scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2015 22:18:49 -0000 Author: ken Date: Tue Feb 3 22:18:48 2015 New Revision: 278170 URL: https://svnweb.freebsd.org/changeset/base/278170 Log: MFC r276835: r276835 | ken | 2015-01-08 09:58:40 -0700 (Thu, 08 Jan 2015) | 91 lines Improve camcontrol(8) handling of drive defect data. This includes a new summary mode (-s) for camcontrol defects that quickly tells the user the most important thing: how many defects are in the requested list. The actual location of the defects is less important. Modern drives frequently have more than the 8191 defects that can be reported by the READ DEFECT DATA (10) command. If they don't have that many grown defects, they certainly have more than 8191 defects in the primary (i.e. factory) defect list. The READ DEFECT DATA (12) command allows for longer parameter lists, as well as indexing into the list of defects, and so allows reporting many more defects. This has been tested with HGST drives and Seagate drives, but does not fully work with Seagate drives. Once I have a Seagate spec I may be able to determine whether it is possible to make it work with Seagate drives. scsi_da.h: Add a definition for the new long block defect format. Add bit and mask definitions for the new extended physical sector and bytes from index defect formats. Add a prototype for the new scsi_read_defects() CDB building function. scsi_da.c: Add a new scsi_read_defects() CDB building function. camcontrol(8) was previously composing CDBs manually. This is long overdue. camcontrol.c: Revamp the camcontrol defects subcommand. We now go through multiple stages in trying to get defect data off the drive while avoiding various drive firmware quirks. We start off by requesting the defect header with the 10 byte command. If we're in summary mode (-s) and the drive reports fewer defects than can be represented in the 10 byte header, we're done. Otherwise, we know that we need to issue the 12 byte command if the drive reports the maximum number of defects. If we're in summary mode, we're done if we get a good response back when asking for the 12 byte header. If the user has asked for the full list, then we use the address descriptor index field in the 12 byte CDB to step through the list in 64K chunks. 64K is small enough to work with most any ancient or modern SCSI controller. Add support for printing the new long block defect format, as well as the extended physical sector and bytes from index formats. I don't have any drives that support the new formats. Add a hexadecimal output format that can be turned on with -X. Add a quiet mode (-q) that can be turned on with the summary mode (-s) to just print out a number. Revamp the error detection and recovery code for the defects command to work with HGST drives. Call the new scsi_read_defects() CDB building function instead of rolling the CDB ourselves. Pay attention to the residual from the defect list request when printing it out, so we don't run off the end of the list. Use the new scsi_nv library routines to convert from strings to numbers and back. camcontrol.8: Document the new defect formats (longblock, extbfi, extphys) and command line options (-q, -s, -S and -X) for the defects subcommand. Explain a little more about what drives generally do and don't support. Sponsored by: Spectra Logic Modified: stable/10/sbin/camcontrol/camcontrol.8 stable/10/sbin/camcontrol/camcontrol.c stable/10/sys/cam/scsi/scsi_da.c stable/10/sys/cam/scsi/scsi_da.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/camcontrol/camcontrol.8 ============================================================================== --- stable/10/sbin/camcontrol/camcontrol.8 Tue Feb 3 21:54:59 2015 (r278169) +++ stable/10/sbin/camcontrol/camcontrol.8 Tue Feb 3 22:18:48 2015 (r278170) @@ -110,6 +110,10 @@ .Aq Fl f Ar format .Op Fl P .Op Fl G +.Op Fl q +.Op Fl s +.Op Fl S Ar offset +.Op Fl X .Nm .Ic modepage .Op device id @@ -513,18 +517,16 @@ connecting to that device. Note that this can have a destructive impact on the system. .It Ic defects -Send the SCSI READ DEFECT DATA (10) command (0x37) to the given device, and +Send the +.Tn SCSI +READ DEFECT DATA (10) command (0x37) or the +.Tn SCSI +READ DEFECT DATA (12) command (0xB7) to the given device, and print out any combination of: the total number of defects, the primary defect list (PLIST), and the grown defect list (GLIST). .Bl -tag -width 11n .It Fl f Ar format -The three format options are: -.Em block , -to print out the list as logical blocks, -.Em bfi , -to print out the list in bytes from index format, and -.Em phys , -to print out the list in physical sector format. +Specify the requested format of the defect list. The format argument is required. Most drives support the physical sector format. @@ -541,12 +543,52 @@ If the drive uses a non-standard sense c support the requested format, .Nm will probably see the error as a failure to complete the request. +.Pp +The format options are: +.Bl -tag -width 9n +.It block +Print out the list as logical blocks. +This is limited to 32-bit block sizes, and isn't supported by many modern +drives. +.It longblock +Print out the list as logical blocks. +This option uses a 64-bit block size. +.It bfi +Print out the list in bytes from index format. +.It extbfi +Print out the list in extended bytes from index format. +The extended format allows for ranges of blocks to be printed. +.It phys +Print out the list in physical sector format. +Most drives support this format. +.It extphys +Print out the list in extended physical sector format. +The extended format allows for ranges of blocks to be printed. +.El +.Pp .It Fl G Print out the grown defect list. This is a list of bad blocks that have been remapped since the disk left the factory. .It Fl P Print out the primary defect list. +This is the list of defects that were present in the factory. +.It Fl q +When printing status information with +.Fl s , +only print the number of defects. +.It Fl s +Just print the number of defects, not the list of defects. +.It Fl S Ar offset +Specify the starting offset into the defect list. +This implies using the +.Tn SCSI +READ DEFECT DATA (12) command, as the 10 byte version of the command +doesn't support the address descriptor index field. +Not all drives support the 12 byte command, and some drives that support +the 12 byte command don't support the address descriptor index field. +.It Fl X +Print out defects in hexadecimal (base 16) form instead of base 10 form. .El .Pp If neither Modified: stable/10/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/10/sbin/camcontrol/camcontrol.c Tue Feb 3 21:54:59 2015 (r278169) +++ stable/10/sbin/camcontrol/camcontrol.c Tue Feb 3 22:18:48 2015 (r278170) @@ -167,7 +167,7 @@ struct ata_set_max_pwd }; static const char scsicmd_opts[] = "a:c:dfi:o:r"; -static const char readdefect_opts[] = "f:GP"; +static const char readdefect_opts[] = "f:GPqsS:X"; static const char negotiate_opts[] = "acD:M:O:qR:T:UW:"; static const char smprg_opts[] = "l"; static const char smppc_opts[] = "a:A:d:lm:M:o:p:s:S:T:"; @@ -3369,39 +3369,64 @@ scanlun_or_reset_dev(path_id_t bus, targ } #ifndef MINIMALISTIC + +static struct scsi_nv defect_list_type_map[] = { + { "block", SRDD10_BLOCK_FORMAT }, + { "extbfi", SRDD10_EXT_BFI_FORMAT }, + { "extphys", SRDD10_EXT_PHYS_FORMAT }, + { "longblock", SRDD10_LONG_BLOCK_FORMAT }, + { "bfi", SRDD10_BYTES_FROM_INDEX_FORMAT }, + { "phys", SRDD10_PHYSICAL_SECTOR_FORMAT } +}; + static int readdefects(struct cam_device *device, int argc, char **argv, char *combinedopt, int retry_count, int timeout) { union ccb *ccb = NULL; - struct scsi_read_defect_data_10 *rdd_cdb; + struct scsi_read_defect_data_hdr_10 *hdr10 = NULL; + struct scsi_read_defect_data_hdr_12 *hdr12 = NULL; + size_t hdr_size = 0, entry_size = 0; + int use_12byte = 0; + int hex_format = 0; u_int8_t *defect_list = NULL; - u_int32_t max_dlist_length = SRDD10_MAX_LENGTH, dlist_length = 0; - u_int32_t returned_length = 0; - u_int32_t num_returned = 0; - u_int8_t returned_format; + u_int8_t list_format = 0; + int list_type_set = 0; + u_int32_t dlist_length = 0; + u_int32_t returned_length = 0, valid_len = 0; + u_int32_t num_returned = 0, num_valid = 0; + u_int32_t max_possible_size = 0, hdr_max = 0; + u_int32_t starting_offset = 0; + u_int8_t returned_format, returned_type; unsigned int i; + int summary = 0, quiet = 0; int c, error = 0; - int lists_specified; - int get_length = 1; + int lists_specified = 0; + int get_length = 1, first_pass = 1; + int mads = 0; while ((c = getopt(argc, argv, combinedopt)) != -1) { switch(c){ case 'f': { - char *tstr; - tstr = optarg; - while (isspace(*tstr) && (*tstr != '\0')) - tstr++; - if (strcmp(tstr, "block") == 0) - arglist |= CAM_ARG_FORMAT_BLOCK; - else if (strcmp(tstr, "bfi") == 0) - arglist |= CAM_ARG_FORMAT_BFI; - else if (strcmp(tstr, "phys") == 0) - arglist |= CAM_ARG_FORMAT_PHYS; - else { + scsi_nv_status status; + int entry_num = 0; + + status = scsi_get_nv(defect_list_type_map, + sizeof(defect_list_type_map) / + sizeof(defect_list_type_map[0]), optarg, + &entry_num, SCSI_NV_FLAG_IG_CASE); + + if (status == SCSI_NV_FOUND) { + list_format = defect_list_type_map[ + entry_num].value; + list_type_set = 1; + } else { + warnx("%s: %s %s option %s", __func__, + (status == SCSI_NV_AMBIGUOUS) ? + "ambiguous" : "invalid", "defect list type", + optarg); error = 1; - warnx("invalid defect format %s", tstr); goto defect_bailout; } break; @@ -3412,40 +3437,82 @@ readdefects(struct cam_device *device, i case 'P': arglist |= CAM_ARG_PLIST; break; + case 'q': + quiet = 1; + break; + case 's': + summary = 1; + break; + case 'S': { + char *endptr; + + starting_offset = strtoul(optarg, &endptr, 0); + if (*endptr != '\0') { + error = 1; + warnx("invalid starting offset %s", optarg); + goto defect_bailout; + } + break; + } + case 'X': + hex_format = 1; + break; default: break; } } - ccb = cam_getccb(device); - - /* - * Eventually we should probably support the 12 byte READ DEFECT - * DATA command. It supports a longer parameter list, which may be - * necessary on newer drives with lots of defects. According to - * the SBC-3 spec, drives are supposed to return an illegal request - * if they have more defect data than will fit in 64K. - */ - defect_list = malloc(max_dlist_length); - if (defect_list == NULL) { - warnx("can't malloc memory for defect list"); + if (list_type_set == 0) { error = 1; + warnx("no defect list format specified"); goto defect_bailout; } + if (arglist & CAM_ARG_PLIST) { + list_format |= SRDD10_PLIST; + lists_specified++; + } + + if (arglist & CAM_ARG_GLIST) { + list_format |= SRDD10_GLIST; + lists_specified++; + } + + /* + * This implies a summary, and was the previous behavior. + */ + if (lists_specified == 0) + summary = 1; + + ccb = cam_getccb(device); + +retry_12byte: + /* * We start off asking for just the header to determine how much * defect data is available. Some Hitachi drives return an error * if you ask for more data than the drive has. Once we know the * length, we retry the command with the returned length. */ - dlist_length = sizeof(struct scsi_read_defect_data_hdr_10); - - rdd_cdb =(struct scsi_read_defect_data_10 *)&ccb->csio.cdb_io.cdb_bytes; + if (use_12byte == 0) + dlist_length = sizeof(*hdr10); + else + dlist_length = sizeof(*hdr12); retry: + if (defect_list != NULL) { + free(defect_list); + defect_list = NULL; + } + defect_list = malloc(dlist_length); + if (defect_list == NULL) { + warnx("can't malloc memory for defect list"); + error = 1; + goto defect_bailout; + } - lists_specified = 0; +next_batch: + bzero(defect_list, dlist_length); /* * cam_getccb() zeros the CCB header only. So we need to zero the @@ -3454,41 +3521,17 @@ retry: bzero(&(&ccb->ccb_h)[1], sizeof(struct ccb_scsiio) - sizeof(struct ccb_hdr)); - cam_fill_csio(&ccb->csio, - /*retries*/ retry_count, - /*cbfcnp*/ NULL, - /*flags*/ CAM_DIR_IN | ((arglist & CAM_ARG_ERR_RECOVER) ? - CAM_PASS_ERR_RECOVER : 0), - /*tag_action*/ MSG_SIMPLE_Q_TAG, - /*data_ptr*/ defect_list, - /*dxfer_len*/ dlist_length, - /*sense_len*/ SSD_FULL_SIZE, - /*cdb_len*/ sizeof(struct scsi_read_defect_data_10), - /*timeout*/ timeout ? timeout : 5000); - - rdd_cdb->opcode = READ_DEFECT_DATA_10; - if (arglist & CAM_ARG_FORMAT_BLOCK) - rdd_cdb->format = SRDD10_BLOCK_FORMAT; - else if (arglist & CAM_ARG_FORMAT_BFI) - rdd_cdb->format = SRDD10_BYTES_FROM_INDEX_FORMAT; - else if (arglist & CAM_ARG_FORMAT_PHYS) - rdd_cdb->format = SRDD10_PHYSICAL_SECTOR_FORMAT; - else { - error = 1; - warnx("no defect list format specified"); - goto defect_bailout; - } - if (arglist & CAM_ARG_PLIST) { - rdd_cdb->format |= SRDD10_PLIST; - lists_specified++; - } - - if (arglist & CAM_ARG_GLIST) { - rdd_cdb->format |= SRDD10_GLIST; - lists_specified++; - } - - scsi_ulto2b(dlist_length, rdd_cdb->alloc_length); + scsi_read_defects(&ccb->csio, + /*retries*/ retry_count, + /*cbfcnp*/ NULL, + /*tag_action*/ MSG_SIMPLE_Q_TAG, + /*list_format*/ list_format, + /*addr_desc_index*/ starting_offset, + /*data_ptr*/ defect_list, + /*dxfer_len*/ dlist_length, + /*minimum_cmd_size*/ use_12byte ? 12 : 0, + /*sense_len*/ SSD_FULL_SIZE, + /*timeout*/ timeout ? timeout : 5000); /* Disable freezing the device queue */ ccb->ccb_h.flags |= CAM_DEV_QFRZDIS; @@ -3505,8 +3548,61 @@ retry: goto defect_bailout; } - returned_length = scsi_2btoul(((struct - scsi_read_defect_data_hdr_10 *)defect_list)->length); + valid_len = ccb->csio.dxfer_len - ccb->csio.resid; + + if (use_12byte == 0) { + hdr10 = (struct scsi_read_defect_data_hdr_10 *)defect_list; + hdr_size = sizeof(*hdr10); + hdr_max = SRDDH10_MAX_LENGTH; + + if (valid_len >= hdr_size) { + returned_length = scsi_2btoul(hdr10->length); + returned_format = hdr10->format; + } else { + returned_length = 0; + returned_format = 0; + } + } else { + hdr12 = (struct scsi_read_defect_data_hdr_12 *)defect_list; + hdr_size = sizeof(*hdr12); + hdr_max = SRDDH12_MAX_LENGTH; + + if (valid_len >= hdr_size) { + returned_length = scsi_4btoul(hdr12->length); + returned_format = hdr12->format; + } else { + returned_length = 0; + returned_format = 0; + } + } + + returned_type = returned_format & SRDDH10_DLIST_FORMAT_MASK; + switch (returned_type) { + case SRDD10_BLOCK_FORMAT: + entry_size = sizeof(struct scsi_defect_desc_block); + break; + case SRDD10_LONG_BLOCK_FORMAT: + entry_size = sizeof(struct scsi_defect_desc_long_block); + break; + case SRDD10_EXT_PHYS_FORMAT: + case SRDD10_PHYSICAL_SECTOR_FORMAT: + entry_size = sizeof(struct scsi_defect_desc_phys_sector); + break; + case SRDD10_EXT_BFI_FORMAT: + case SRDD10_BYTES_FROM_INDEX_FORMAT: + entry_size = sizeof(struct scsi_defect_desc_bytes_from_index); + break; + default: + warnx("Unknown defect format 0x%x\n", returned_type); + error = 1; + goto defect_bailout; + break; + } + + max_possible_size = (hdr_max / entry_size) * entry_size; + num_returned = returned_length / entry_size; + num_valid = min(returned_length, valid_len - hdr_size); + num_valid /= entry_size; if (get_length != 0) { get_length = 0; @@ -3530,12 +3626,66 @@ retry: if ((sense_key == SSD_KEY_RECOVERED_ERROR) && (asc == 0x1c) && (ascq == 0x00) && (returned_length > 0)) { - dlist_length = returned_length + - sizeof(struct scsi_read_defect_data_hdr_10); - dlist_length = min(dlist_length, - SRDD10_MAX_LENGTH); - } else - dlist_length = max_dlist_length; + if ((use_12byte == 0) + && (returned_length >= max_possible_size)) { + get_length = 1; + use_12byte = 1; + goto retry_12byte; + } + dlist_length = returned_length + hdr_size; + } else if ((sense_key == SSD_KEY_RECOVERED_ERROR) + && (asc == 0x1f) && (ascq == 0x00) + && (returned_length > 0)) { + /* Partial defect list transfer */ + /* + * Hitachi drives return this error + * along with a partial defect list if they + * have more defects than the 10 byte + * command can support. Retry with the 12 + * byte command. + */ + if (use_12byte == 0) { + get_length = 1; + use_12byte = 1; + goto retry_12byte; + } + dlist_length = returned_length + hdr_size; + } else if ((sense_key == SSD_KEY_ILLEGAL_REQUEST) + && (asc == 0x24) && (ascq == 0x00)) { + /* Invalid field in CDB */ + /* + * SBC-3 says that if the drive has more + * defects than can be reported with the + * 10 byte command, it should return this + * error and no data. Retry with the 12 + * byte command. + */ + if (use_12byte == 0) { + get_length = 1; + use_12byte = 1; + goto retry_12byte; + } + dlist_length = returned_length + hdr_size; + } else { + /* + * If we got a SCSI error and no valid length, + * just use the 10 byte maximum. The 12 + * byte maximum is too large. + */ + if (returned_length == 0) + dlist_length = SRDD10_MAX_LENGTH; + else { + if ((use_12byte == 0) + && (returned_length >= + max_possible_size)) { + get_length = 1; + use_12byte = 1; + goto retry_12byte; + } + dlist_length = returned_length + + hdr_size; + } + } } else if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP){ error = 1; @@ -3545,16 +3695,40 @@ retry: CAM_EPF_ALL, stderr); goto defect_bailout; } else { - dlist_length = returned_length + - sizeof(struct scsi_read_defect_data_hdr_10); - dlist_length = min(dlist_length, SRDD10_MAX_LENGTH); + if ((use_12byte == 0) + && (returned_length >= max_possible_size)) { + get_length = 1; + use_12byte = 1; + goto retry_12byte; + } + dlist_length = returned_length + hdr_size; + } + if (summary != 0) { + fprintf(stdout, "%u", num_returned); + if (quiet == 0) { + fprintf(stdout, " defect%s", + (num_returned != 1) ? "s" : ""); + } + fprintf(stdout, "\n"); + + goto defect_bailout; } + /* + * We always limit the list length to the 10-byte maximum + * length (0xffff). The reason is that some controllers + * can't handle larger I/Os, and we can transfer the entire + * 10 byte list in one shot. For drives that support the 12 + * byte read defects command, we'll step through the list + * by specifying a starting offset. For drives that don't + * support the 12 byte command's starting offset, we'll + * just display the first 64K. + */ + dlist_length = min(dlist_length, SRDD10_MAX_LENGTH); + goto retry; } - returned_format = ((struct scsi_read_defect_data_hdr_10 *) - defect_list)->format; if (((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_SCSI_STATUS_ERROR) && (ccb->csio.scsi_status == SCSI_STATUS_CHECK_COND) @@ -3571,32 +3745,32 @@ retry: * According to the SCSI spec, if the disk doesn't support * the requested format, it will generally return a sense * key of RECOVERED ERROR, and an additional sense code - * of "DEFECT LIST NOT FOUND". So, we check for that, and - * also check to make sure that the returned length is - * greater than 0, and then print out whatever format the - * disk gave us. + * of "DEFECT LIST NOT FOUND". HGST drives also return + * Primary/Grown defect list not found errors. So just + * check for an ASC of 0x1c. */ if ((sense_key == SSD_KEY_RECOVERED_ERROR) - && (asc == 0x1c) && (ascq == 0x00) - && (returned_length > 0)) { - warnx("requested defect format not available"); - switch(returned_format & SRDDH10_DLIST_FORMAT_MASK) { - case SRDD10_BLOCK_FORMAT: - warnx("Device returned block format"); - break; - case SRDD10_BYTES_FROM_INDEX_FORMAT: - warnx("Device returned bytes from index" - " format"); - break; - case SRDD10_PHYSICAL_SECTOR_FORMAT: - warnx("Device returned physical sector format"); - break; - default: + && (asc == 0x1c)) { + const char *format_str; + + format_str = scsi_nv_to_str(defect_list_type_map, + sizeof(defect_list_type_map) / + sizeof(defect_list_type_map[0]), + list_format & SRDD10_DLIST_FORMAT_MASK); + warnx("requested defect format %s not available", + format_str ? format_str : "unknown"); + + format_str = scsi_nv_to_str(defect_list_type_map, + sizeof(defect_list_type_map) / + sizeof(defect_list_type_map[0]), returned_type); + if (format_str != NULL) { + warnx("Device returned %s format", + format_str); + } else { error = 1; warnx("Device returned unknown defect" - " data format %#x", returned_format); + " data format %#x", returned_type); goto defect_bailout; - break; /* NOTREACHED */ } } else { error = 1; @@ -3615,99 +3789,151 @@ retry: goto defect_bailout; } + if (first_pass != 0) { + fprintf(stderr, "Got %d defect", num_returned); + + if ((lists_specified == 0) || (num_returned == 0)) { + fprintf(stderr, "s.\n"); + goto defect_bailout; + } else if (num_returned == 1) + fprintf(stderr, ":\n"); + else + fprintf(stderr, "s:\n"); + + first_pass = 0; + } + /* * XXX KDM I should probably clean up the printout format for the * disk defects. */ - switch (returned_format & SRDDH10_DLIST_FORMAT_MASK){ - case SRDDH10_PHYSICAL_SECTOR_FORMAT: - { - struct scsi_defect_desc_phys_sector *dlist; - - dlist = (struct scsi_defect_desc_phys_sector *) - (defect_list + - sizeof(struct scsi_read_defect_data_hdr_10)); - - num_returned = returned_length / - sizeof(struct scsi_defect_desc_phys_sector); - - fprintf(stderr, "Got %d defect", num_returned); - - if ((lists_specified == 0) || (num_returned == 0)) { - fprintf(stderr, "s.\n"); - break; - } else if (num_returned == 1) - fprintf(stderr, ":\n"); + switch (returned_type) { + case SRDD10_PHYSICAL_SECTOR_FORMAT: + case SRDD10_EXT_PHYS_FORMAT: + { + struct scsi_defect_desc_phys_sector *dlist; + + dlist = (struct scsi_defect_desc_phys_sector *) + (defect_list + hdr_size); + + for (i = 0; i < num_valid; i++) { + uint32_t sector; + + sector = scsi_4btoul(dlist[i].sector); + if (returned_type == SRDD10_EXT_PHYS_FORMAT) { + mads = (sector & SDD_EXT_PHYS_MADS) ? + 0 : 1; + sector &= ~SDD_EXT_PHYS_FLAG_MASK; + } + if (hex_format == 0) + fprintf(stdout, "%d:%d:%d%s", + scsi_3btoul(dlist[i].cylinder), + dlist[i].head, + scsi_4btoul(dlist[i].sector), + mads ? " - " : "\n"); else - fprintf(stderr, "s:\n"); - - for (i = 0; i < num_returned; i++) { - fprintf(stdout, "%d:%d:%d\n", + fprintf(stdout, "0x%x:0x%x:0x%x%s", scsi_3btoul(dlist[i].cylinder), dlist[i].head, - scsi_4btoul(dlist[i].sector)); - } - break; + scsi_4btoul(dlist[i].sector), + mads ? " - " : "\n"); + mads = 0; + } + if (num_valid < num_returned) { + starting_offset += num_valid; + goto next_batch; } - case SRDDH10_BYTES_FROM_INDEX_FORMAT: - { - struct scsi_defect_desc_bytes_from_index *dlist; - - dlist = (struct scsi_defect_desc_bytes_from_index *) - (defect_list + - sizeof(struct scsi_read_defect_data_hdr_10)); - - num_returned = returned_length / - sizeof(struct scsi_defect_desc_bytes_from_index); - - fprintf(stderr, "Got %d defect", num_returned); - - if ((lists_specified == 0) || (num_returned == 0)) { - fprintf(stderr, "s.\n"); - break; - } else if (num_returned == 1) - fprintf(stderr, ":\n"); + break; + } + case SRDD10_BYTES_FROM_INDEX_FORMAT: + case SRDD10_EXT_BFI_FORMAT: + { + struct scsi_defect_desc_bytes_from_index *dlist; + + dlist = (struct scsi_defect_desc_bytes_from_index *) + (defect_list + hdr_size); + + for (i = 0; i < num_valid; i++) { + uint32_t bfi; + + bfi = scsi_4btoul(dlist[i].bytes_from_index); + if (returned_type == SRDD10_EXT_BFI_FORMAT) { + mads = (bfi & SDD_EXT_BFI_MADS) ? 1 : 0; + bfi &= ~SDD_EXT_BFI_FLAG_MASK; + } + if (hex_format == 0) + fprintf(stdout, "%d:%d:%d%s", + scsi_3btoul(dlist[i].cylinder), + dlist[i].head, + scsi_4btoul(dlist[i].bytes_from_index), + mads ? " - " : "\n"); else - fprintf(stderr, "s:\n"); - - for (i = 0; i < num_returned; i++) { - fprintf(stdout, "%d:%d:%d\n", + fprintf(stdout, "0x%x:0x%x:0x%x%s", scsi_3btoul(dlist[i].cylinder), dlist[i].head, - scsi_4btoul(dlist[i].bytes_from_index)); - } - break; + scsi_4btoul(dlist[i].bytes_from_index), + mads ? " - " : "\n"); + + mads = 0; } - case SRDDH10_BLOCK_FORMAT: - { - struct scsi_defect_desc_block *dlist; + if (num_valid < num_returned) { + starting_offset += num_valid; + goto next_batch; + } + break; + } + case SRDDH10_BLOCK_FORMAT: + { + struct scsi_defect_desc_block *dlist; - dlist = (struct scsi_defect_desc_block *)(defect_list + - sizeof(struct scsi_read_defect_data_hdr_10)); + dlist = (struct scsi_defect_desc_block *) + (defect_list + hdr_size); - num_returned = returned_length / - sizeof(struct scsi_defect_desc_block); + for (i = 0; i < num_valid; i++) { + if (hex_format == 0) + fprintf(stdout, "%u\n", + scsi_4btoul(dlist[i].address)); + else + fprintf(stdout, "0x%x\n", + scsi_4btoul(dlist[i].address)); + } - fprintf(stderr, "Got %d defect", num_returned); + if (num_valid < num_returned) { + starting_offset += num_valid; + goto next_batch; + } - if ((lists_specified == 0) || (num_returned == 0)) { - fprintf(stderr, "s.\n"); - break; - } else if (num_returned == 1) - fprintf(stderr, ":\n"); + break; + } + case SRDD10_LONG_BLOCK_FORMAT: + { + struct scsi_defect_desc_long_block *dlist; + + dlist = (struct scsi_defect_desc_long_block *) + (defect_list + hdr_size); + + for (i = 0; i < num_valid; i++) { + if (hex_format == 0) + fprintf(stdout, "%ju\n", + (uintmax_t)scsi_8btou64( + dlist[i].address)); else - fprintf(stderr, "s:\n"); + fprintf(stdout, "0x%jx\n", + (uintmax_t)scsi_8btou64( + dlist[i].address)); + } - for (i = 0; i < num_returned; i++) - fprintf(stdout, "%u\n", - scsi_4btoul(dlist[i].address)); - break; + if (num_valid < num_returned) { + starting_offset += num_valid; + goto next_batch; } - default: - fprintf(stderr, "Unknown defect format %d\n", - returned_format & SRDDH10_DLIST_FORMAT_MASK); - error = 1; - break; + break; + } + default: + fprintf(stderr, "Unknown defect format 0x%x\n", + returned_type); + error = 1; + break; } defect_bailout: @@ -7801,6 +8027,7 @@ usage(int printlong) " camcontrol reset \n" #ifndef MINIMALISTIC " camcontrol defects [dev_id][generic args] <-f format> [-P][-G]\n" +" [-q][-s][-S offset][-X]\n" " camcontrol modepage [dev_id][generic args] <-m page | -l>\n" " [-P pagectl][-e | -b][-d]\n" " camcontrol cmd [dev_id][generic args]\n" Modified: stable/10/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_da.c Tue Feb 3 21:54:59 2015 (r278169) +++ stable/10/sys/cam/scsi/scsi_da.c Tue Feb 3 22:18:48 2015 (r278170) @@ -3878,9 +3878,9 @@ dashutdown(void * arg, int howto) #else /* !_KERNEL */ /* - * XXX This is only left out of the kernel build to silence warnings. If, - * for some reason this function is used in the kernel, the ifdefs should - * be moved so it is included both in the kernel and userland. + * XXX These are only left out of the kernel build to silence warnings. If, + * for some reason these functions are used in the kernel, the ifdefs should + * be moved so they are included both in the kernel and userland. */ void scsi_format_unit(struct ccb_scsiio *csio, u_int32_t retries, @@ -3909,6 +3909,59 @@ scsi_format_unit(struct ccb_scsiio *csio } void +scsi_read_defects(struct ccb_scsiio *csio, uint32_t retries, + void (*cbfcnp)(struct cam_periph *, union ccb *), + uint8_t tag_action, uint8_t list_format, + uint32_t addr_desc_index, uint8_t *data_ptr, + uint32_t dxfer_len, int minimum_cmd_size, + uint8_t sense_len, uint32_t timeout) +{ + uint8_t cdb_len; + + /* + * These conditions allow using the 10 byte command. Otherwise we + * need to use the 12 byte command. + */ + if ((minimum_cmd_size <= 10) + && (addr_desc_index == 0) + && (dxfer_len <= SRDD10_MAX_LENGTH)) { + struct scsi_read_defect_data_10 *cdb10; + + cdb10 = (struct scsi_read_defect_data_10 *) + &csio->cdb_io.cdb_bytes; + + cdb_len = sizeof(*cdb10); + bzero(cdb10, cdb_len); + cdb10->opcode = READ_DEFECT_DATA_10; + cdb10->format = list_format; + scsi_ulto2b(dxfer_len, cdb10->alloc_length); + } else { + struct scsi_read_defect_data_12 *cdb12; + + cdb12 = (struct scsi_read_defect_data_12 *) + &csio->cdb_io.cdb_bytes; + + cdb_len = sizeof(*cdb12); + bzero(cdb12, cdb_len); + cdb12->opcode = READ_DEFECT_DATA_12; + cdb12->format = list_format; + scsi_ulto4b(dxfer_len, cdb12->alloc_length); + scsi_ulto4b(addr_desc_index, cdb12->address_descriptor_index); + } + + cam_fill_csio(csio, + retries, + cbfcnp, + /*flags*/ CAM_DIR_IN, + tag_action, + data_ptr, + dxfer_len, + sense_len, + cdb_len, + timeout); +} + +void scsi_sanitize(struct ccb_scsiio *csio, u_int32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), u_int8_t tag_action, u_int8_t byte2, u_int16_t control, Modified: stable/10/sys/cam/scsi/scsi_da.h ============================================================================== --- stable/10/sys/cam/scsi/scsi_da.h Tue Feb 3 21:54:59 2015 (r278169) +++ stable/10/sys/cam/scsi/scsi_da.h Tue Feb 3 22:18:48 2015 (r278170) @@ -98,8 +98,12 @@ struct scsi_read_defect_data_10 #define SRDD10_PLIST 0x10 #define SRDD10_DLIST_FORMAT_MASK 0x07 #define SRDD10_BLOCK_FORMAT 0x00 +#define SRDD10_EXT_BFI_FORMAT 0x01 +#define SRDD10_EXT_PHYS_FORMAT 0x02 +#define SRDD10_LONG_BLOCK_FORMAT 0x03 #define SRDD10_BYTES_FROM_INDEX_FORMAT 0x04 #define SRDD10_PHYSICAL_SECTOR_FORMAT 0x05 +#define SRDD10_VENDOR_FORMAT 0x06 uint8_t format; uint8_t reserved[4]; uint8_t alloc_length[2]; @@ -138,12 +142,13 @@ struct scsi_read_defect_data_12 #define SRDD12_GLIST 0x08 #define SRDD12_PLIST 0x10 #define SRDD12_DLIST_FORMAT_MASK 0x07 -#define SRDD12_BLOCK_FORMAT 0x00 -#define SRDD12_BYTES_FROM_INDEX_FORMAT 0x04 -#define SRDD12_PHYSICAL_SECTOR_FORMAT 0x05 +#define SRDD12_BLOCK_FORMAT SRDD10_BLOCK_FORMAT +#define SRDD12_BYTES_FROM_INDEX_FORMAT SRDD10_BYTES_FROM_INDEX_FORMAT +#define SRDD12_PHYSICAL_SECTOR_FORMAT SRDD10_PHYSICAL_SECTOR_FORMAT uint8_t format; uint8_t address_descriptor_index[4]; uint8_t alloc_length[4]; +#define SRDD12_MAX_LENGTH 0xffffffff uint8_t reserved; uint8_t control; }; @@ -325,6 +330,8 @@ struct scsi_read_defect_data_hdr_10 #define SRDDH10_PHYSICAL_SECTOR_FORMAT 0x05 u_int8_t format; u_int8_t length[2]; +#define SRDDH10_MAX_LENGTH SRDD10_MAX_LENGTH - \ + sizeof(struct scsi_read_defect_data_hdr_10) }; struct scsi_defect_desc_block @@ -332,10 +339,18 @@ struct scsi_defect_desc_block u_int8_t address[4]; }; +struct scsi_defect_desc_long_block +{ + u_int8_t address[8]; +}; + struct scsi_defect_desc_bytes_from_index { u_int8_t cylinder[3]; u_int8_t head; +#define SDD_EXT_BFI_MADS 0x80000000 +#define SDD_EXT_BFI_FLAG_MASK 0xf0000000 +#define SDD_EXT_BFI_ENTIRE_TRACK 0x0fffffff u_int8_t bytes_from_index[4]; }; @@ -343,6 +358,9 @@ struct scsi_defect_desc_phys_sector { u_int8_t cylinder[3]; u_int8_t head; +#define SDD_EXT_PHYS_MADS 0x80000000 +#define SDD_EXT_PHYS_FLAG_MASK 0xf0000000 +#define SDD_EXT_PHYS_ENTIRE_TRACK 0x0fffffff u_int8_t sector[4]; }; @@ -358,6 +376,8 @@ struct scsi_read_defect_data_hdr_12 u_int8_t format; u_int8_t generation[2]; u_int8_t length[4]; +#define SRDDH12_MAX_LENGTH SRDD12_MAX_LENGTH - \ + sizeof(struct scsi_read_defect_data_hdr_12) }; union disk_pages /* this is the structure copied from osf */ @@ -536,9 +556,9 @@ struct scsi_da_rw_recovery_page { __BEGIN_DECLS /* - * XXX This is only left out of the kernel build to silence warnings. If, - * for some reason this function is used in the kernel, the ifdefs should - * be moved so it is included both in the kernel and userland. + * XXX These are only left out of the kernel build to silence warnings. If, + * for some reason these functions are used in the kernel, the ifdefs should + * be moved so they are included both in the kernel and userland. */ #ifndef _KERNEL void scsi_format_unit(struct ccb_scsiio *csio, u_int32_t retries, @@ -547,6 +567,13 @@ void scsi_format_unit(struct ccb_scsiio u_int8_t *data_ptr, u_int32_t dxfer_len, u_int8_t sense_len, u_int32_t timeout); +void scsi_read_defects(struct ccb_scsiio *csio, uint32_t retries, + void (*cbfcnp)(struct cam_periph *, union ccb *), + uint8_t tag_action, uint8_t list_format, + uint32_t addr_desc_index, uint8_t *data_ptr, + uint32_t dxfer_len, int minimum_cmd_size, + uint8_t sense_len, uint32_t timeout); + void scsi_sanitize(struct ccb_scsiio *csio, u_int32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), u_int8_t tag_action, u_int8_t byte2, u_int16_t control, From owner-svn-src-stable@FreeBSD.ORG Tue Feb 3 22:49:13 2015 Return-Path: Delivered-To: svn-src-stable@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 B7104C97; Tue, 3 Feb 2015 22:49:13 +0000 (UTC) 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 A0777AC8; Tue, 3 Feb 2015 22:49:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t13MnD8m022639; Tue, 3 Feb 2015 22:49:13 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t13MnCQV022632; Tue, 3 Feb 2015 22:49:12 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201502032249.t13MnCQV022632@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Tue, 3 Feb 2015 22:49: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: r278171 - 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-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2015 22:49:13 -0000 Author: ken Date: Tue Feb 3 22:49:12 2015 New Revision: 278171 URL: https://svnweb.freebsd.org/changeset/base/278171 Log: MFC isp(4) driver changes: r276839, r276842, r277513, r277514, r277515 ------------------------------------------------------------------------ r276839 | ken | 2015-01-08 10:41:28 -0700 (Thu, 08 Jan 2015) | 49 lines Fix Fibre Channel Command Reference Number handling in the isp(4) driver. The Command Reference Number is used for precise delivery of commands, and is part of the FC-Tape functionality set. (This is only enabled for devices that support precise delivery of commands.) It is an 8-bit unsigned number that increments from 1 to 255. The commands sent by the initiator must be processed by the target in CRN order if the CRN is non-zero. There are certain scenarios where the Command Reference Number sequence needs to be reset. When the target is power cycled, for instance, the initiator needs to reset the CRN to 1. The initiator will know this because it will see a LIP (when directly connected) or get a logout/login event (when connected to a switch). The isp(4) driver was not resetting the CRN when a target went away and came back. When it saw the target again after a power cycle, it would continue the CRN sequence where it left off. The target would ignore the command because the CRN sequence is supposed to be reset to 1 after a power cycle or other similar event. The symptom that the user would see is that there would be lots of aborted INQUIRY commands after a tape library was power cycled, and the library would fail to probe. The INQUIRY commands were being ignored by the tape drive due to the CRN issue mentioned above. isp_freebsd.c: Add a new function, isp_fcp_reset_crn(). This will reset all of the CRNs for a given port, or the CRNs for all LUNs on a target. Reset the CRNs for all targets on a port when we get a LIP, loop reset, or loop down event. Reset the CRN for a particular target when it arrives, is changed or departs. This is less precise behavior than the clearing behavior specified in the FCP-4 spec (which says that it should be reset for PRLI, PRLO, PLOGI and LOGO), but this is the level of information we have here. If this is insufficient, then we will need to add more precise notification from the lower level isp(4) code. isp_freebsd.h: Add a prototype for isp_fcp_reset_crn(). Sponsored by: Spectra Logic MFC after: 1 week ------------------------------------------------------------------------ r276842 | ken | 2015-01-08 10:51:12 -0700 (Thu, 08 Jan 2015) | 44 lines Close a race in the isp(4) driver that caused devices to disappear and not automatically come back if they were gone for a short period of time. The isp(4) driver has a 30 second gone device timer that gets activated whenever a device goes away. If the device comes back before the timer expires, we don't send a notification to CAM that it has gone away. If, however, there is a command sent to the device while it is gone and before it comes back, the isp(4) driver sends the command back with CAM_SEL_TIMEOUT status. CAM responds to the CAM_SEL_TIMEOUT status by removing the device. In the case where a device comes back within the 30 second gone device timer window, though, we weren't telling CAM the device came back. So, fix this by tracking whether we have told CAM the device is gone, and if we have, send a rescan if it comes back within the 30 second window. ispvar.h: In the fcportdb_t structure, add a new bitfield, reported_gone. This gets set whenever we return a command with CAM_SEL_TIMEOUT status on a Fibre Channel device. isp_freebsd.c: In isp_done(), if we're sending CAM_SEL_TIMEOUT for for a command sent to a FC device, set the reported_gone bit. In isp_async(), in the ISPASYNC_DEV_STAYED case, rescan the device in question if it is mapped to a target ID and has been reported gone. In isp_make_here(), take a port database entry argument, and clear the reported_gone bit when we send a rescan to CAM. In isp_make_gone(), take a port database entry as an argument, and set the reported_gone bit when we send an async event telling CAM consumers that the device is gone. Sponsored by: Spectra Logic MFC after: 1 week ------------------------------------------------------------------------ r277514 | will | 2015-01-21 13:27:11 -0700 (Wed, 21 Jan 2015) | 18 lines Force commit to record the correct log for r277513. If the user sends an XPT_RESET_DEV CCB, make sure to reset the Fibre Channel Command Reference Number if we're running on a FC controller. We send a SCSI Target Reset when we get this CCB, and as a result need to reset the CRN to 1 on the next command. isp_freebsd.c: In the XPT_RESET_DEV implementation in isp_action(), reset the CRN if we're on a FC controller. Submitted by: ken MFC after: 1 week Sponsored by: Spectra Logic MFSpectraBSD: 1112787 on 2015/01/15 ------------------------------------------------------------------------ r277515 | will | 2015-01-21 13:32:36 -0700 (Wed, 21 Jan 2015) | 25 lines Fix SCSI status byte reporting on 4Gb and 8Gb Qlogic boards. The newer boards don't have the response field that indicates whether the SCSI status byte is present. You have to just look to see whether it is non-zero. The code was looking to see whether the sense length was valid before propagating the SCSI status byte (and sense information) up the stack. With a status like Reservation Conflict, there is no sense information, only the SCSI status byte. So it wasn't getting correctly returned. isp.c: In isp_intr(), if we are on a 2400 or 2500 type board and get a response, look at the actual contents of the SCSI status value and set the RQSF_GOT_STATUS flag accordingly so that return any SCSI status value we get. The RQSF_GOT_SENSE flag will get set later on if there is actual sense information returned. Submitted by: ken MFC after: 1 week Sponsored by: Spectra Logic MFSpectraBSD: 1112791 on 2015/01/15 ------------------------------------------------------------------------ Sponsored by: Spectra Logic Modified: stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/isp_freebsd.c stable/10/sys/dev/isp/isp_freebsd.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 Tue Feb 3 22:18:48 2015 (r278170) +++ stable/10/sys/dev/isp/isp.c Tue Feb 3 22:49:12 2015 (r278171) @@ -5224,7 +5224,10 @@ again: } scsi_status = sp2->req_scsi_status; completion_status = sp2->req_completion_status; - req_state_flags = 0; + if ((scsi_status & 0xff) != 0) + req_state_flags = RQSF_GOT_STATUS; + else + req_state_flags = 0; resid = sp2->req_resid; } else if (etype == RQSTYPE_RESPONSE) { isp_get_response(isp, (ispstatusreq_t *) hp, sp); Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Tue Feb 3 22:18:48 2015 (r278170) +++ stable/10/sys/dev/isp/isp_freebsd.c Tue Feb 3 22:49:12 2015 (r278171) @@ -29,6 +29,7 @@ */ #include __FBSDID("$FreeBSD$"); + #include #include #include @@ -4538,7 +4539,7 @@ isp_watchdog(void *arg) } static void -isp_make_here(ispsoftc_t *isp, int chan, int tgt) +isp_make_here(ispsoftc_t *isp, fcportdb_t *fcp, int chan, int tgt) { union ccb *ccb; struct isp_fc *fc = ISP_FC_PC(isp, chan); @@ -4561,11 +4562,18 @@ isp_make_here(ispsoftc_t *isp, int chan, 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); } static void -isp_make_gone(ispsoftc_t *isp, int chan, int tgt) +isp_make_gone(ispsoftc_t *isp, fcportdb_t *fcp, int chan, int tgt) { struct cam_path *tp; struct isp_fc *fc = ISP_FC_PC(isp, chan); @@ -4574,6 +4582,11 @@ isp_make_gone(ispsoftc_t *isp, int chan, 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); } @@ -4627,7 +4640,7 @@ isp_gdt_task(void *arg, int pending) 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, chan, tgt); + isp_make_gone(isp, lp, chan, tgt); } if (fc->ready) { if (more_to_do) { @@ -4720,7 +4733,7 @@ isp_ldt_task(void *arg, int pending) 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, chan, tgt); + isp_make_gone(isp, lp, chan, tgt); } if (FCPARAM(isp, chan)->role & ISP_ROLE_INITIATOR) { @@ -5082,19 +5095,34 @@ isp_action(struct cam_sim *sim, union cc break; #endif case XPT_RESET_DEV: /* BDR the specified SCSI device */ + { + struct isp_fc *fc; bus = cam_sim_bus(xpt_path_sim(ccb->ccb_h.path)); tgt = ccb->ccb_h.target_id; tgt |= (bus << 16); + if (IS_FC(isp)) + fc = ISP_FC_PC(isp, bus); + else + fc = NULL; error = isp_control(isp, ISPCTL_RESET_DEV, bus, tgt); if (error) { ccb->ccb_h.status = CAM_REQ_CMP_ERR; } else { + /* + * If we have a FC device, reset the Command + * Reference Number, because the target will expect + * that we re-start the CRN at 1 after a reset. + */ + if (fc != NULL) + isp_fcp_reset_crn(fc, tgt, /*tgt_set*/ 1); + ccb->ccb_h.status = CAM_REQ_CMP; } xpt_done(ccb); break; + } case XPT_ABORT: /* Abort the specified CCB */ { union ccb *accb = ccb->cab.abort_ccb; @@ -5532,6 +5560,21 @@ isp_done(XS_T *sccb) if (status != CAM_REQ_CMP) { if (status != CAM_SEL_TIMEOUT) isp_prt(isp, ISP_LOGDEBUG0, "target %d lun %d CAM status 0x%x SCSI status 0x%x", XS_TGT(sccb), XS_LUN(sccb), sccb->ccb_h.status, sccb->scsi_status); + 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; + } if ((sccb->ccb_h.status & CAM_DEV_QFRZN) == 0) { sccb->ccb_h.status |= CAM_DEV_QFRZN; xpt_freeze_devq(sccb->ccb_h.path, 1); @@ -5667,6 +5710,8 @@ isp_async(ispsoftc_t *isp, ispasync_t cm } } } + isp_fcp_reset_crn(fc, /*tgt*/0, /*tgt_set*/ 0); + isp_prt(isp, ISP_LOGINFO, "Chan %d: %s", bus, msg); break; } @@ -5718,7 +5763,8 @@ isp_async(ispsoftc_t *isp, ispasync_t cm 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_make_here(isp, bus, tgt); + 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); } @@ -5738,7 +5784,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm 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, bus, tgt); + 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", @@ -5754,6 +5800,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm 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); + isp_fcp_reset_crn(fc, tgt, /*tgt_set*/ 1); } 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); } @@ -5766,9 +5813,19 @@ isp_async(ispsoftc_t *isp, ispasync_t cm va_end(ap); 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); @@ -5800,6 +5857,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm } 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); } @@ -6346,6 +6404,33 @@ isp_common_dmateardown(ispsoftc_t *isp, bus_dmamap_unload(isp->isp_osinfo.dmat, PISP_PCMD(csio)->dmap); } +/* + * Reset the command reference number for all LUNs on a specific target + * (needed when a target arrives again) or for all targets on a port + * (needed for events like a LIP). + */ +void +isp_fcp_reset_crn(struct isp_fc *fc, uint32_t tgt, int tgt_set) +{ + int i; + struct isp_nexus *nxp; + + if (tgt_set == 0) + isp_prt(fc->isp, ISP_LOG_SANCFG, "resetting CRN on all targets"); + else + isp_prt(fc->isp, ISP_LOG_SANCFG, "resetting CRN target %u", tgt); + + for (i = 0; i < NEXUS_HASH_WIDTH; i++) { + nxp = fc->nexus_hash[i]; + while (nxp) { + if ((tgt_set != 0) && (tgt == nxp->tgt)) + nxp->crnseed = 0; + + nxp = nxp->next; + } + } +} + int isp_fcp_next_crn(ispsoftc_t *isp, uint8_t *crnp, XS_T *cmd) { Modified: stable/10/sys/dev/isp/isp_freebsd.h ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.h Tue Feb 3 22:18:48 2015 (r278170) +++ stable/10/sys/dev/isp/isp_freebsd.h Tue Feb 3 22:49:12 2015 (r278171) @@ -748,6 +748,7 @@ int isp_fc_scratch_acquire(ispsoftc_t *, int isp_mstohz(int); void isp_platform_intr(void *); void isp_common_dmateardown(ispsoftc_t *, struct ccb_scsiio *, uint32_t); +void isp_fcp_reset_crn(struct isp_fc *, uint32_t, int); int isp_fcp_next_crn(ispsoftc_t *, uint8_t *, XS_T *); /* Modified: stable/10/sys/dev/isp/ispvar.h ============================================================================== --- stable/10/sys/dev/isp/ispvar.h Tue Feb 3 22:18:48 2015 (r278170) +++ stable/10/sys/dev/isp/ispvar.h Tue Feb 3 22:49:12 2015 (r278171) @@ -421,7 +421,8 @@ typedef struct { target_mode : 1, portid : 24; uint32_t - : 6, + : 5, + reported_gone : 1, announced : 1, dirty : 1, /* commands have been run */ new_portid : 24; From owner-svn-src-stable@FreeBSD.ORG Wed Feb 4 00:34:13 2015 Return-Path: Delivered-To: svn-src-stable@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 25C5D70B; Wed, 4 Feb 2015 00:34:13 +0000 (UTC) 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 10FE08C0; Wed, 4 Feb 2015 00:34:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t140YCHb074903; Wed, 4 Feb 2015 00:34:12 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t140YC77074902; Wed, 4 Feb 2015 00:34:12 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201502040034.t140YC77074902@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 4 Feb 2015 00: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: r278174 - stable/10/release/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2015 00:34:13 -0000 Author: gjb Date: Wed Feb 4 00:34:12 2015 New Revision: 278174 URL: https://svnweb.freebsd.org/changeset/base/278174 Log: MFC r277837, r277838: r277837: Provide a description for the 'tests.txz' distribution in the MANIFEST file. Turn off the test suite installation by default. r277838: Fix a typo in a comment. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/scripts/make-manifest.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/release/scripts/make-manifest.sh ============================================================================== --- stable/10/release/scripts/make-manifest.sh Wed Feb 4 00:18:06 2015 (r278173) +++ stable/10/release/scripts/make-manifest.sh Wed Feb 4 00:34:12 2015 (r278174) @@ -5,7 +5,7 @@ # Usage: make-manifest.sh foo1.txz foo2.txz ... # # The output file looks like this (tab-delimited): -# foo1.txz SHA256-checksu Number-of-files foo1 Description Install-by-default +# foo1.txz SHA256-checksum Number-of-files foo1 Description Install-by-default # # $FreeBSD$ @@ -17,7 +17,9 @@ desc_games="Games (fortune, etc.)" desc_lib32="32-bit compatibility libraries" desc_ports="Ports tree" desc_src="System source code" +desc_tests="Test suite" src_default=off +tests_default=off for i in $*; do echo "`basename $i` `sha256 -q $i` `tar tvf $i | wc -l | tr -d ' '` `basename $i .txz` \"`eval echo \\\$desc_$(basename $i .txz)`\" `eval echo \\\${$(basename $i .txz)_default:-on}`" From owner-svn-src-stable@FreeBSD.ORG Wed Feb 4 00:45:03 2015 Return-Path: Delivered-To: svn-src-stable@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 835269A8; Wed, 4 Feb 2015 00:45:03 +0000 (UTC) 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 641729B5; Wed, 4 Feb 2015 00:45:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t140j3g9079779; Wed, 4 Feb 2015 00:45:03 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t140j388079778; Wed, 4 Feb 2015 00:45:03 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201502040045.t140j388079778@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 4 Feb 2015 00:45: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: r278175 - stable/10/usr.bin/grep X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2015 00:45:03 -0000 Author: delphij Date: Wed Feb 4 00:45:02 2015 New Revision: 278175 URL: https://svnweb.freebsd.org/changeset/base/278175 Log: MFC r277463: Fix xz handling for files larger than 32K. Submitted by: Stefan Ehmann PR: bin/186861 Modified: stable/10/usr.bin/grep/file.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/grep/file.c ============================================================================== --- stable/10/usr.bin/grep/file.c Wed Feb 4 00:34:12 2015 (r278174) +++ stable/10/usr.bin/grep/file.c Wed Feb 4 00:45:02 2015 (r278175) @@ -65,6 +65,8 @@ __FBSDID("$FreeBSD$"); static gzFile gzbufdesc; #ifndef WITHOUT_LZMA static lzma_stream lstrm = LZMA_STREAM_INIT; +static lzma_action laction; +static uint8_t lin_buf[MAXBUFSIZ]; #endif #ifndef WITHOUT_BZIP2 static BZFILE* bzbufdesc; @@ -123,34 +125,34 @@ grep_refill(struct file *f) #endif #ifndef WITHOUT_LZMA } else if ((filebehave == FILE_XZ) || (filebehave == FILE_LZMA)) { - lzma_action action = LZMA_RUN; - uint8_t in_buf[MAXBUFSIZ]; lzma_ret ret; + lstrm.next_out = buffer; - ret = (filebehave == FILE_XZ) ? - lzma_stream_decoder(&lstrm, UINT64_MAX, - LZMA_CONCATENATED) : - lzma_alone_decoder(&lstrm, UINT64_MAX); + do { + if (lstrm.avail_in == 0) { + lstrm.next_in = lin_buf; + nr = read(f->fd, lin_buf, MAXBUFSIZ); + + if (nr < 0) + return (-1); + else if (nr == 0) + laction = LZMA_FINISH; - if (ret != LZMA_OK) - return (-1); + lstrm.avail_in = nr; + } - lstrm.next_out = buffer; - lstrm.avail_out = MAXBUFSIZ; - lstrm.next_in = in_buf; - nr = read(f->fd, in_buf, MAXBUFSIZ); + ret = lzma_code(&lstrm, laction); + + if (ret != LZMA_OK && ret != LZMA_STREAM_END) + return (-1); + + if (lstrm.avail_out == 0 || ret == LZMA_STREAM_END) { + bufrem = MAXBUFSIZ - lstrm.avail_out; + lstrm.next_out = buffer; + lstrm.avail_out = MAXBUFSIZ; + } + } while (bufrem == 0 && ret != LZMA_STREAM_END); - if (nr < 0) - return (-1); - else if (nr == 0) - action = LZMA_FINISH; - - lstrm.avail_in = nr; - ret = lzma_code(&lstrm, action); - - if (ret != LZMA_OK && ret != LZMA_STREAM_END) - return (-1); - bufrem = MAXBUFSIZ - lstrm.avail_out; return (0); #endif /* WIHTOUT_LZMA */ } else @@ -291,6 +293,23 @@ grep_open(const char *path) (bzbufdesc = BZ2_bzdopen(f->fd, "r")) == NULL) goto error2; #endif +#ifndef WITHOUT_LZMA + else if ((filebehave == FILE_XZ) || (filebehave == FILE_LZMA)) { + lzma_ret ret; + + ret = (filebehave == FILE_XZ) ? + lzma_stream_decoder(&lstrm, UINT64_MAX, + LZMA_CONCATENATED) : + lzma_alone_decoder(&lstrm, UINT64_MAX); + + if (ret != LZMA_OK) + goto error2; + + lstrm.avail_in = 0; + lstrm.avail_out = MAXBUFSIZ; + laction = LZMA_RUN; + } +#endif /* Fill read buffer, also catches errors early */ if (bufrem == 0 && grep_refill(f) != 0) From owner-svn-src-stable@FreeBSD.ORG Wed Feb 4 00:45:29 2015 Return-Path: Delivered-To: svn-src-stable@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 CB874AD3; Wed, 4 Feb 2015 00:45:29 +0000 (UTC) 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 ACEC19BA; Wed, 4 Feb 2015 00:45:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t140jTu1079899; Wed, 4 Feb 2015 00:45:29 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t140jTP0079898; Wed, 4 Feb 2015 00:45:29 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201502040045.t140jTP0079898@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 4 Feb 2015 00:45:29 +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: r278176 - stable/9/usr.bin/grep 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2015 00:45:30 -0000 Author: delphij Date: Wed Feb 4 00:45:28 2015 New Revision: 278176 URL: https://svnweb.freebsd.org/changeset/base/278176 Log: MFC r277463: Fix xz handling for files larger than 32K. Submitted by: Stefan Ehmann PR: bin/186861 Modified: stable/9/usr.bin/grep/file.c Directory Properties: stable/9/usr.bin/grep/ (props changed) Modified: stable/9/usr.bin/grep/file.c ============================================================================== --- stable/9/usr.bin/grep/file.c Wed Feb 4 00:45:02 2015 (r278175) +++ stable/9/usr.bin/grep/file.c Wed Feb 4 00:45:28 2015 (r278176) @@ -65,6 +65,8 @@ __FBSDID("$FreeBSD$"); static gzFile gzbufdesc; #ifndef WITHOUT_LZMA static lzma_stream lstrm = LZMA_STREAM_INIT; +static lzma_action laction; +static uint8_t lin_buf[MAXBUFSIZ]; #endif #ifndef WITHOUT_BZIP2 static BZFILE* bzbufdesc; @@ -123,34 +125,34 @@ grep_refill(struct file *f) #endif #ifndef WITHOUT_LZMA } else if ((filebehave == FILE_XZ) || (filebehave == FILE_LZMA)) { - lzma_action action = LZMA_RUN; - uint8_t in_buf[MAXBUFSIZ]; lzma_ret ret; + lstrm.next_out = buffer; - ret = (filebehave == FILE_XZ) ? - lzma_stream_decoder(&lstrm, UINT64_MAX, - LZMA_CONCATENATED) : - lzma_alone_decoder(&lstrm, UINT64_MAX); + do { + if (lstrm.avail_in == 0) { + lstrm.next_in = lin_buf; + nr = read(f->fd, lin_buf, MAXBUFSIZ); + + if (nr < 0) + return (-1); + else if (nr == 0) + laction = LZMA_FINISH; - if (ret != LZMA_OK) - return (-1); + lstrm.avail_in = nr; + } - lstrm.next_out = buffer; - lstrm.avail_out = MAXBUFSIZ; - lstrm.next_in = in_buf; - nr = read(f->fd, in_buf, MAXBUFSIZ); + ret = lzma_code(&lstrm, laction); + + if (ret != LZMA_OK && ret != LZMA_STREAM_END) + return (-1); + + if (lstrm.avail_out == 0 || ret == LZMA_STREAM_END) { + bufrem = MAXBUFSIZ - lstrm.avail_out; + lstrm.next_out = buffer; + lstrm.avail_out = MAXBUFSIZ; + } + } while (bufrem == 0 && ret != LZMA_STREAM_END); - if (nr < 0) - return (-1); - else if (nr == 0) - action = LZMA_FINISH; - - lstrm.avail_in = nr; - ret = lzma_code(&lstrm, action); - - if (ret != LZMA_OK && ret != LZMA_STREAM_END) - return (-1); - bufrem = MAXBUFSIZ - lstrm.avail_out; return (0); #endif /* WIHTOUT_LZMA */ } else @@ -291,6 +293,23 @@ grep_open(const char *path) (bzbufdesc = BZ2_bzdopen(f->fd, "r")) == NULL) goto error2; #endif +#ifndef WITHOUT_LZMA + else if ((filebehave == FILE_XZ) || (filebehave == FILE_LZMA)) { + lzma_ret ret; + + ret = (filebehave == FILE_XZ) ? + lzma_stream_decoder(&lstrm, UINT64_MAX, + LZMA_CONCATENATED) : + lzma_alone_decoder(&lstrm, UINT64_MAX); + + if (ret != LZMA_OK) + goto error2; + + lstrm.avail_in = 0; + lstrm.avail_out = MAXBUFSIZ; + laction = LZMA_RUN; + } +#endif /* Fill read buffer, also catches errors early */ if (bufrem == 0 && grep_refill(f) != 0) From owner-svn-src-stable@FreeBSD.ORG Wed Feb 4 00:51:51 2015 Return-Path: Delivered-To: svn-src-stable@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 61C73CE3; Wed, 4 Feb 2015 00:51:51 +0000 (UTC) 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 42A5BA94; Wed, 4 Feb 2015 00:51:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t140ppoB084180; Wed, 4 Feb 2015 00:51:51 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t140poOj084178; Wed, 4 Feb 2015 00:51:50 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201502040051.t140poOj084178@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 4 Feb 2015 00:51: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: r278177 - stable/10/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2015 00:51:51 -0000 Author: delphij Date: Wed Feb 4 00:51:50 2015 New Revision: 278177 URL: https://svnweb.freebsd.org/changeset/base/278177 Log: MFC r277433: MFV r277432: Plug various memory leaks in libzfs import implementation. Illumos issue: 5518 Memory leaks in libzfs import implementation Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Wed Feb 4 00:45:28 2015 (r278176) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Wed Feb 4 00:51:50 2015 (r278177) @@ -18,10 +18,11 @@ * * CDDL HEADER END */ + /* + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. - * Copyright 2014 Nexenta Systems, Inc. All rights reserved. */ /* @@ -198,8 +199,10 @@ fix_paths(nvlist_t *nv, name_entry_t *na if ((devid = get_devid(best->ne_name)) == NULL) { (void) nvlist_remove_all(nv, ZPOOL_CONFIG_DEVID); } else { - if (nvlist_add_string(nv, ZPOOL_CONFIG_DEVID, devid) != 0) + if (nvlist_add_string(nv, ZPOOL_CONFIG_DEVID, devid) != 0) { + devid_str_free(devid); return (-1); + } devid_str_free(devid); } @@ -665,8 +668,10 @@ get_configs(libzfs_handle_t *hdl, pool_l nvlist_add_uint64(holey, ZPOOL_CONFIG_ID, c) != 0 || nvlist_add_uint64(holey, - ZPOOL_CONFIG_GUID, 0ULL) != 0) + ZPOOL_CONFIG_GUID, 0ULL) != 0) { + nvlist_free(holey); goto nomem; + } child[c] = holey; } } @@ -1118,8 +1123,10 @@ zpool_clear_label(int fd) for (l = 0; l < VDEV_LABELS; l++) { if (pwrite64(fd, label, sizeof (vdev_label_t), - label_offset(size, l)) != sizeof (vdev_label_t)) + label_offset(size, l)) != sizeof (vdev_label_t)) { + free(label); return (-1); + } } free(label); @@ -1137,7 +1144,6 @@ static nvlist_t * zpool_find_import_impl(libzfs_handle_t *hdl, importargs_t *iarg) { int i, dirs = iarg->paths; - DIR *dirp = NULL; struct dirent64 *dp; char path[MAXPATHLEN]; char *end, **dir = iarg->path; @@ -1167,6 +1173,8 @@ zpool_find_import_impl(libzfs_handle_t * tpool_t *t; char *rdsk; int dfd; + boolean_t config_failed = B_FALSE; + DIR *dirp; /* use realpath to normalize the path */ if (realpath(dir[i], path) == 0) { @@ -1191,6 +1199,8 @@ zpool_find_import_impl(libzfs_handle_t * if ((dfd = open64(rdsk, O_RDONLY)) < 0 || (dirp = fdopendir(dfd)) == NULL) { + if (dfd >= 0) + (void) close(dfd); zfs_error_aux(hdl, strerror(errno)); (void) zfs_error_fmt(hdl, EZFS_BADPATH, dgettext(TEXT_DOMAIN, "cannot open '%s'"), @@ -1272,7 +1282,7 @@ skipdir: cookie = NULL; while ((slice = avl_destroy_nodes(&slice_cache, &cookie)) != NULL) { - if (slice->rn_config != NULL) { + if (slice->rn_config != NULL && !config_failed) { nvlist_t *config = slice->rn_config; boolean_t matched = B_TRUE; @@ -1293,13 +1303,16 @@ skipdir: } if (!matched) { nvlist_free(config); - config = NULL; - continue; + } else { + /* + * use the non-raw path for the config + */ + (void) strlcpy(end, slice->rn_name, + pathleft); + if (add_config(hdl, &pools, path, + config) != 0) + config_failed = B_TRUE; } - /* use the non-raw path for the config */ - (void) strlcpy(end, slice->rn_name, pathleft); - if (add_config(hdl, &pools, path, config) != 0) - goto error; } free(slice->rn_name); free(slice); @@ -1307,7 +1320,9 @@ skipdir: avl_destroy(&slice_cache); (void) closedir(dirp); - dirp = NULL; + + if (config_failed) + goto error; } ret = get_configs(hdl, &pools, iarg->can_be_active); @@ -1330,14 +1345,10 @@ error: for (ne = pools.names; ne != NULL; ne = nenext) { nenext = ne->ne_next; - if (ne->ne_name) - free(ne->ne_name); + free(ne->ne_name); free(ne); } - if (dirp) - (void) closedir(dirp); - return (ret); } @@ -1695,9 +1706,9 @@ zpool_in_use(libzfs_handle_t *hdl, int f cb.cb_type = ZPOOL_CONFIG_SPARES; if (zpool_iter(hdl, find_aux, &cb) == 1) { name = (char *)zpool_get_name(cb.cb_zhp); - ret = TRUE; + ret = B_TRUE; } else { - ret = FALSE; + ret = B_FALSE; } break; @@ -1711,9 +1722,9 @@ zpool_in_use(libzfs_handle_t *hdl, int f cb.cb_type = ZPOOL_CONFIG_L2CACHE; if (zpool_iter(hdl, find_aux, &cb) == 1) { name = (char *)zpool_get_name(cb.cb_zhp); - ret = TRUE; + ret = B_TRUE; } else { - ret = FALSE; + ret = B_FALSE; } break; Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Wed Feb 4 00:45:28 2015 (r278176) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Wed Feb 4 00:51:50 2015 (r278177) @@ -20,8 +20,8 @@ */ /* + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ @@ -1715,7 +1715,7 @@ zpool_import_props(libzfs_handle_t *hdl, thename = origname; } - if (props) { + if (props != NULL) { uint64_t version; prop_flags_t flags = { .create = B_FALSE, .import = B_TRUE }; @@ -1723,12 +1723,13 @@ zpool_import_props(libzfs_handle_t *hdl, &version) == 0); if ((props = zpool_valid_proplist(hdl, origname, - props, version, flags, errbuf)) == NULL) { + props, version, flags, errbuf)) == NULL) return (-1); - } else if (zcmd_write_src_nvlist(hdl, &zc, props) != 0) { + if (zcmd_write_src_nvlist(hdl, &zc, props) != 0) { nvlist_free(props); return (-1); } + nvlist_free(props); } (void) strlcpy(zc.zc_name, thename, sizeof (zc.zc_name)); @@ -1737,11 +1738,11 @@ zpool_import_props(libzfs_handle_t *hdl, &zc.zc_guid) == 0); if (zcmd_write_conf_nvlist(hdl, &zc, config) != 0) { - nvlist_free(props); + zcmd_free_nvlists(&zc); return (-1); } if (zcmd_alloc_dst_nvlist(hdl, &zc, zc.zc_nvlist_conf_size * 2) != 0) { - nvlist_free(props); + zcmd_free_nvlists(&zc); return (-1); } @@ -1757,6 +1758,9 @@ zpool_import_props(libzfs_handle_t *hdl, error = errno; (void) zcmd_read_dst_nvlist(hdl, &zc, &nv); + + zcmd_free_nvlists(&zc); + zpool_get_rewind_policy(config, &policy); if (error) { @@ -1862,9 +1866,6 @@ zpool_import_props(libzfs_handle_t *hdl, return (0); } - zcmd_free_nvlists(&zc); - nvlist_free(props); - return (ret); } @@ -3332,8 +3333,10 @@ devid_to_path(char *devid_str) if (ret != 0) return (NULL); - if ((path = strdup(list[0].devname)) == NULL) - return (NULL); + /* + * In a case the strdup() fails, we will just return NULL below. + */ + path = strdup(list[0].devname); devid_free_nmlist(list); From owner-svn-src-stable@FreeBSD.ORG Wed Feb 4 00:52:27 2015 Return-Path: Delivered-To: svn-src-stable@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 BCE76E1A; Wed, 4 Feb 2015 00:52:27 +0000 (UTC) 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 9D85CAA2; Wed, 4 Feb 2015 00:52:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t140qRQh084324; Wed, 4 Feb 2015 00:52:27 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t140qRFC084321; Wed, 4 Feb 2015 00:52:27 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201502040052.t140qRFC084321@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 4 Feb 2015 00:52: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: r278178 - stable/9/cddl/contrib/opensolaris/lib/libzfs/common 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2015 00:52:27 -0000 Author: delphij Date: Wed Feb 4 00:52:26 2015 New Revision: 278178 URL: https://svnweb.freebsd.org/changeset/base/278178 Log: MFC r277433: MFV r277432: Plug various memory leaks in libzfs import implementation. Illumos issue: 5518 Memory leaks in libzfs import implementation Modified: stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Wed Feb 4 00:51:50 2015 (r278177) +++ stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Wed Feb 4 00:52:26 2015 (r278178) @@ -18,10 +18,11 @@ * * CDDL HEADER END */ + /* + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012 by Delphix. All rights reserved. - * Copyright 2014 Nexenta Systems, Inc. All rights reserved. */ /* @@ -194,8 +195,10 @@ fix_paths(nvlist_t *nv, name_entry_t *na if ((devid = get_devid(best->ne_name)) == NULL) { (void) nvlist_remove_all(nv, ZPOOL_CONFIG_DEVID); } else { - if (nvlist_add_string(nv, ZPOOL_CONFIG_DEVID, devid) != 0) + if (nvlist_add_string(nv, ZPOOL_CONFIG_DEVID, devid) != 0) { + devid_str_free(devid); return (-1); + } devid_str_free(devid); } @@ -661,8 +664,10 @@ get_configs(libzfs_handle_t *hdl, pool_l nvlist_add_uint64(holey, ZPOOL_CONFIG_ID, c) != 0 || nvlist_add_uint64(holey, - ZPOOL_CONFIG_GUID, 0ULL) != 0) + ZPOOL_CONFIG_GUID, 0ULL) != 0) { + nvlist_free(holey); goto nomem; + } child[c] = holey; } } @@ -1114,8 +1119,10 @@ zpool_clear_label(int fd) for (l = 0; l < VDEV_LABELS; l++) { if (pwrite64(fd, label, sizeof (vdev_label_t), - label_offset(size, l)) != sizeof (vdev_label_t)) + label_offset(size, l)) != sizeof (vdev_label_t)) { + free(label); return (-1); + } } free(label); @@ -1133,7 +1140,6 @@ static nvlist_t * zpool_find_import_impl(libzfs_handle_t *hdl, importargs_t *iarg) { int i, dirs = iarg->paths; - DIR *dirp = NULL; struct dirent64 *dp; char path[MAXPATHLEN]; char *end, **dir = iarg->path; @@ -1163,6 +1169,8 @@ zpool_find_import_impl(libzfs_handle_t * tpool_t *t; char *rdsk; int dfd; + boolean_t config_failed = B_FALSE; + DIR *dirp; /* use realpath to normalize the path */ if (realpath(dir[i], path) == 0) { @@ -1187,6 +1195,8 @@ zpool_find_import_impl(libzfs_handle_t * if ((dfd = open64(rdsk, O_RDONLY)) < 0 || (dirp = fdopendir(dfd)) == NULL) { + if (dfd >= 0) + (void) close(dfd); zfs_error_aux(hdl, strerror(errno)); (void) zfs_error_fmt(hdl, EZFS_BADPATH, dgettext(TEXT_DOMAIN, "cannot open '%s'"), @@ -1268,7 +1278,7 @@ skipdir: cookie = NULL; while ((slice = avl_destroy_nodes(&slice_cache, &cookie)) != NULL) { - if (slice->rn_config != NULL) { + if (slice->rn_config != NULL && !config_failed) { nvlist_t *config = slice->rn_config; boolean_t matched = B_TRUE; @@ -1289,13 +1299,16 @@ skipdir: } if (!matched) { nvlist_free(config); - config = NULL; - continue; + } else { + /* + * use the non-raw path for the config + */ + (void) strlcpy(end, slice->rn_name, + pathleft); + if (add_config(hdl, &pools, path, + config) != 0) + config_failed = B_TRUE; } - /* use the non-raw path for the config */ - (void) strlcpy(end, slice->rn_name, pathleft); - if (add_config(hdl, &pools, path, config) != 0) - goto error; } free(slice->rn_name); free(slice); @@ -1303,7 +1316,9 @@ skipdir: avl_destroy(&slice_cache); (void) closedir(dirp); - dirp = NULL; + + if (config_failed) + goto error; } ret = get_configs(hdl, &pools, iarg->can_be_active); @@ -1326,14 +1341,10 @@ error: for (ne = pools.names; ne != NULL; ne = nenext) { nenext = ne->ne_next; - if (ne->ne_name) - free(ne->ne_name); + free(ne->ne_name); free(ne); } - if (dirp) - (void) closedir(dirp); - return (ret); } @@ -1697,9 +1708,9 @@ zpool_in_use(libzfs_handle_t *hdl, int f cb.cb_type = ZPOOL_CONFIG_SPARES; if (zpool_iter(hdl, find_aux, &cb) == 1) { name = (char *)zpool_get_name(cb.cb_zhp); - ret = TRUE; + ret = B_TRUE; } else { - ret = FALSE; + ret = B_FALSE; } break; @@ -1713,9 +1724,9 @@ zpool_in_use(libzfs_handle_t *hdl, int f cb.cb_type = ZPOOL_CONFIG_L2CACHE; if (zpool_iter(hdl, find_aux, &cb) == 1) { name = (char *)zpool_get_name(cb.cb_zhp); - ret = TRUE; + ret = B_TRUE; } else { - ret = FALSE; + ret = B_FALSE; } break; Modified: stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Wed Feb 4 00:51:50 2015 (r278177) +++ stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Wed Feb 4 00:52:26 2015 (r278178) @@ -20,8 +20,8 @@ */ /* + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ @@ -1699,7 +1699,7 @@ zpool_import_props(libzfs_handle_t *hdl, thename = origname; } - if (props) { + if (props != NULL) { uint64_t version; prop_flags_t flags = { .create = B_FALSE, .import = B_TRUE }; @@ -1707,12 +1707,13 @@ zpool_import_props(libzfs_handle_t *hdl, &version) == 0); if ((props = zpool_valid_proplist(hdl, origname, - props, version, flags, errbuf)) == NULL) { + props, version, flags, errbuf)) == NULL) return (-1); - } else if (zcmd_write_src_nvlist(hdl, &zc, props) != 0) { + if (zcmd_write_src_nvlist(hdl, &zc, props) != 0) { nvlist_free(props); return (-1); } + nvlist_free(props); } (void) strlcpy(zc.zc_name, thename, sizeof (zc.zc_name)); @@ -1721,11 +1722,11 @@ zpool_import_props(libzfs_handle_t *hdl, &zc.zc_guid) == 0); if (zcmd_write_conf_nvlist(hdl, &zc, config) != 0) { - nvlist_free(props); + zcmd_free_nvlists(&zc); return (-1); } if (zcmd_alloc_dst_nvlist(hdl, &zc, zc.zc_nvlist_conf_size * 2) != 0) { - nvlist_free(props); + zcmd_free_nvlists(&zc); return (-1); } @@ -1741,6 +1742,9 @@ zpool_import_props(libzfs_handle_t *hdl, error = errno; (void) zcmd_read_dst_nvlist(hdl, &zc, &nv); + + zcmd_free_nvlists(&zc); + zpool_get_rewind_policy(config, &policy); if (error) { @@ -1846,9 +1850,6 @@ zpool_import_props(libzfs_handle_t *hdl, return (0); } - zcmd_free_nvlists(&zc); - nvlist_free(props); - return (ret); } @@ -3310,8 +3311,10 @@ devid_to_path(char *devid_str) if (ret != 0) return (NULL); - if ((path = strdup(list[0].devname)) == NULL) - return (NULL); + /* + * In a case the strdup() fails, we will just return NULL below. + */ + path = strdup(list[0].devname); devid_free_nmlist(list); From owner-svn-src-stable@FreeBSD.ORG Wed Feb 4 00:52:59 2015 Return-Path: Delivered-To: svn-src-stable@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 7CC01F4D; Wed, 4 Feb 2015 00:52:59 +0000 (UTC) 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 5E212AAB; Wed, 4 Feb 2015 00:52:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t140qxYQ084436; Wed, 4 Feb 2015 00:52:59 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t140qw8j084434; Wed, 4 Feb 2015 00:52:58 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201502040052.t140qw8j084434@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 4 Feb 2015 00:52:58 +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: r278179 - stable/8/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2015 00:52:59 -0000 Author: delphij Date: Wed Feb 4 00:52:58 2015 New Revision: 278179 URL: https://svnweb.freebsd.org/changeset/base/278179 Log: MFC r277433: MFV r277432: Plug various memory leaks in libzfs import implementation. Illumos issue: 5518 Memory leaks in libzfs import implementation Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Wed Feb 4 00:52:26 2015 (r278178) +++ stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Wed Feb 4 00:52:58 2015 (r278179) @@ -18,10 +18,11 @@ * * CDDL HEADER END */ + /* + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012 by Delphix. All rights reserved. - * Copyright 2014 Nexenta Systems, Inc. All rights reserved. */ /* @@ -194,8 +195,10 @@ fix_paths(nvlist_t *nv, name_entry_t *na if ((devid = get_devid(best->ne_name)) == NULL) { (void) nvlist_remove_all(nv, ZPOOL_CONFIG_DEVID); } else { - if (nvlist_add_string(nv, ZPOOL_CONFIG_DEVID, devid) != 0) + if (nvlist_add_string(nv, ZPOOL_CONFIG_DEVID, devid) != 0) { + devid_str_free(devid); return (-1); + } devid_str_free(devid); } @@ -661,8 +664,10 @@ get_configs(libzfs_handle_t *hdl, pool_l nvlist_add_uint64(holey, ZPOOL_CONFIG_ID, c) != 0 || nvlist_add_uint64(holey, - ZPOOL_CONFIG_GUID, 0ULL) != 0) + ZPOOL_CONFIG_GUID, 0ULL) != 0) { + nvlist_free(holey); goto nomem; + } child[c] = holey; } } @@ -1107,8 +1112,10 @@ zpool_clear_label(int fd) for (l = 0; l < VDEV_LABELS; l++) { if (pwrite64(fd, label, sizeof (vdev_label_t), - label_offset(size, l)) != sizeof (vdev_label_t)) + label_offset(size, l)) != sizeof (vdev_label_t)) { + free(label); return (-1); + } } free(label); @@ -1126,7 +1133,6 @@ static nvlist_t * zpool_find_import_impl(libzfs_handle_t *hdl, importargs_t *iarg) { int i, dirs = iarg->paths; - DIR *dirp = NULL; struct dirent64 *dp; char path[MAXPATHLEN]; char *end, **dir = iarg->path; @@ -1156,6 +1162,8 @@ zpool_find_import_impl(libzfs_handle_t * tpool_t *t; char *rdsk; int dfd; + boolean_t config_failed = B_FALSE; + DIR *dirp; /* use realpath to normalize the path */ if (realpath(dir[i], path) == 0) { @@ -1180,6 +1188,8 @@ zpool_find_import_impl(libzfs_handle_t * if ((dfd = open64(rdsk, O_RDONLY)) < 0 || (dirp = fdopendir(dfd)) == NULL) { + if (dfd >= 0) + (void) close(dfd); zfs_error_aux(hdl, strerror(errno)); (void) zfs_error_fmt(hdl, EZFS_BADPATH, dgettext(TEXT_DOMAIN, "cannot open '%s'"), @@ -1261,7 +1271,7 @@ skipdir: cookie = NULL; while ((slice = avl_destroy_nodes(&slice_cache, &cookie)) != NULL) { - if (slice->rn_config != NULL) { + if (slice->rn_config != NULL && !config_failed) { nvlist_t *config = slice->rn_config; boolean_t matched = B_TRUE; @@ -1282,13 +1292,16 @@ skipdir: } if (!matched) { nvlist_free(config); - config = NULL; - continue; + } else { + /* + * use the non-raw path for the config + */ + (void) strlcpy(end, slice->rn_name, + pathleft); + if (add_config(hdl, &pools, path, + config) != 0) + config_failed = B_TRUE; } - /* use the non-raw path for the config */ - (void) strlcpy(end, slice->rn_name, pathleft); - if (add_config(hdl, &pools, path, config) != 0) - goto error; } free(slice->rn_name); free(slice); @@ -1296,7 +1309,9 @@ skipdir: avl_destroy(&slice_cache); (void) closedir(dirp); - dirp = NULL; + + if (config_failed) + goto error; } ret = get_configs(hdl, &pools, iarg->can_be_active); @@ -1319,14 +1334,10 @@ error: for (ne = pools.names; ne != NULL; ne = nenext) { nenext = ne->ne_next; - if (ne->ne_name) - free(ne->ne_name); + free(ne->ne_name); free(ne); } - if (dirp) - (void) closedir(dirp); - return (ret); } @@ -1690,9 +1701,9 @@ zpool_in_use(libzfs_handle_t *hdl, int f cb.cb_type = ZPOOL_CONFIG_SPARES; if (zpool_iter(hdl, find_aux, &cb) == 1) { name = (char *)zpool_get_name(cb.cb_zhp); - ret = TRUE; + ret = B_TRUE; } else { - ret = FALSE; + ret = B_FALSE; } break; @@ -1706,9 +1717,9 @@ zpool_in_use(libzfs_handle_t *hdl, int f cb.cb_type = ZPOOL_CONFIG_L2CACHE; if (zpool_iter(hdl, find_aux, &cb) == 1) { name = (char *)zpool_get_name(cb.cb_zhp); - ret = TRUE; + ret = B_TRUE; } else { - ret = FALSE; + ret = B_FALSE; } break; Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Wed Feb 4 00:52:26 2015 (r278178) +++ stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Wed Feb 4 00:52:58 2015 (r278179) @@ -20,8 +20,8 @@ */ /* + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ @@ -1691,7 +1691,7 @@ zpool_import_props(libzfs_handle_t *hdl, thename = origname; } - if (props) { + if (props != NULL) { uint64_t version; prop_flags_t flags = { .create = B_FALSE, .import = B_TRUE }; @@ -1699,12 +1699,13 @@ zpool_import_props(libzfs_handle_t *hdl, &version) == 0); if ((props = zpool_valid_proplist(hdl, origname, - props, version, flags, errbuf)) == NULL) { + props, version, flags, errbuf)) == NULL) return (-1); - } else if (zcmd_write_src_nvlist(hdl, &zc, props) != 0) { + if (zcmd_write_src_nvlist(hdl, &zc, props) != 0) { nvlist_free(props); return (-1); } + nvlist_free(props); } (void) strlcpy(zc.zc_name, thename, sizeof (zc.zc_name)); @@ -1713,11 +1714,11 @@ zpool_import_props(libzfs_handle_t *hdl, &zc.zc_guid) == 0); if (zcmd_write_conf_nvlist(hdl, &zc, config) != 0) { - nvlist_free(props); + zcmd_free_nvlists(&zc); return (-1); } if (zcmd_alloc_dst_nvlist(hdl, &zc, zc.zc_nvlist_conf_size * 2) != 0) { - nvlist_free(props); + zcmd_free_nvlists(&zc); return (-1); } @@ -1733,6 +1734,9 @@ zpool_import_props(libzfs_handle_t *hdl, error = errno; (void) zcmd_read_dst_nvlist(hdl, &zc, &nv); + + zcmd_free_nvlists(&zc); + zpool_get_rewind_policy(config, &policy); if (error) { @@ -1838,9 +1842,6 @@ zpool_import_props(libzfs_handle_t *hdl, return (0); } - zcmd_free_nvlists(&zc); - nvlist_free(props); - return (ret); } @@ -3302,8 +3303,10 @@ devid_to_path(char *devid_str) if (ret != 0) return (NULL); - if ((path = strdup(list[0].devname)) == NULL) - return (NULL); + /* + * In a case the strdup() fails, we will just return NULL below. + */ + path = strdup(list[0].devname); devid_free_nmlist(list); From owner-svn-src-stable@FreeBSD.ORG Wed Feb 4 00:56:57 2015 Return-Path: Delivered-To: svn-src-stable@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 0490611F; Wed, 4 Feb 2015 00:56:57 +0000 (UTC) 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 E3370ACD; Wed, 4 Feb 2015 00:56:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t140uuw2085005; Wed, 4 Feb 2015 00:56:56 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t140uuiu085003; Wed, 4 Feb 2015 00:56:56 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201502040056.t140uuiu085003@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 4 Feb 2015 00:56: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: r278180 - stable/10/usr.sbin/portsnap/phttpget X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2015 00:56:57 -0000 Author: delphij Date: Wed Feb 4 00:56:55 2015 New Revision: 278180 URL: https://svnweb.freebsd.org/changeset/base/278180 Log: MFC r276571: Add a manual page for phttpget(8). Added: stable/10/usr.sbin/portsnap/phttpget/phttpget.8 - copied unchanged from r276571, head/usr.sbin/portsnap/phttpget/phttpget.8 Modified: stable/10/usr.sbin/portsnap/phttpget/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/portsnap/phttpget/Makefile ============================================================================== --- stable/10/usr.sbin/portsnap/phttpget/Makefile Wed Feb 4 00:52:58 2015 (r278179) +++ stable/10/usr.sbin/portsnap/phttpget/Makefile Wed Feb 4 00:56:55 2015 (r278180) @@ -1,7 +1,7 @@ # $FreeBSD$ PROG= phttpget -MAN= +MAN= phttpget.8 BINDIR= ${LIBEXECDIR} Copied: stable/10/usr.sbin/portsnap/phttpget/phttpget.8 (from r276571, head/usr.sbin/portsnap/phttpget/phttpget.8) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.sbin/portsnap/phttpget/phttpget.8 Wed Feb 4 00:56:55 2015 (r278180, copy of r276571, head/usr.sbin/portsnap/phttpget/phttpget.8) @@ -0,0 +1,88 @@ +.\"- +.\" Copyright (c) 2015 Xin Li +.\" 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. +.\" +.\" $FreeBSD$ +.\" +.Dd January 3, 2015 +.Dt PHTTPGET 8 +.Os +.Sh NAME +.Nm phttpget +.Nd retrieve multiple files via pipelined HTTP +.Sh SYNOPSIS +.Nm +.Ar server +.Ar file ... +.Sh DESCRIPTION +The +.Nm +utility is a minimalist pipelined HTTP client, +which is used to retrieve multiple +.Ar file Ns s +from one +.Ar server , +and saves the downloaded files in the current working directory, +using the last portion of their download path as file names. +.Pp +By making several "in flight" HTTP requests, +it can dramatically increase performance when a large number of +small files need to be downloaded. +.Pp +The +.Xr freebsd-update 8 +and +.Xr portnap 8 +tools use +.Nm +to download binary patch files. +.Sh ENVIRONMENT +.Bl -tag -width HTTP_PROXY_AUTH +.It Ev HTTP_PROXY +URL of the proxy to use for HTTP requests. +.It Ev HTTP_PROXY_AUTH +Authorization parameters for the HTTP proxy. +.It Ev HTTP_USER_AGENT +The User-Agent string to use for HTTP requests. +The default is +.Dq phttpget/0.1 . +.It Ev HTTP_TIMEOUT +Timeout for HTTP request in seconds. +.El +.Sh SEE ALSO +.Xr fetch 1 , +.Xr freebsd-update 8 , +.Xr portsnap 8 +.Sh AUTHORS +.An -nosplit +The +.Nm +utility was written by +.An Colin Percival Aq Mt cperciva@FreeBSD.org +for use with +.Xr portsnap 8 +and later with +.Xr freebsd-update 8 . +This manual page was written by +.An Xin LI Aq Mt delphij@FreeBSD.org . From owner-svn-src-stable@FreeBSD.ORG Wed Feb 4 09:10:48 2015 Return-Path: Delivered-To: svn-src-stable@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 348F6EA1; Wed, 4 Feb 2015 09:10:48 +0000 (UTC) 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 1F8D91DE; Wed, 4 Feb 2015 09:10:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t149AlFQ016836; Wed, 4 Feb 2015 09:10:47 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t149AlVg016834; Wed, 4 Feb 2015 09:10:47 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502040910.t149AlVg016834@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 4 Feb 2015 09:10: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: r278185 - in stable/10: etc/rc.d tools/build/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-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2015 09:10:48 -0000 Author: ngie Date: Wed Feb 4 09:10:46 2015 New Revision: 278185 URL: https://svnweb.freebsd.org/changeset/base/278185 Log: MFC r277739: r277739: Honor MK_JAIL with etc/rc.d/jail Sponsored by: EMC / Isilon Storage Division Modified: stable/10/etc/rc.d/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/Makefile ============================================================================== --- stable/10/etc/rc.d/Makefile Wed Feb 4 08:33:04 2015 (r278184) +++ stable/10/etc/rc.d/Makefile Wed Feb 4 09:10:46 2015 (r278185) @@ -69,7 +69,6 @@ FILES= DAEMON \ ${_ipxrouted} \ iscsictl \ iscsid \ - jail \ ${_kadmind} \ ${_kdc} \ keyserv \ @@ -183,6 +182,10 @@ FILES+= bsnmpd _ipxrouted= ipxrouted .endif +.if ${MK_JAIL} != "no" +FILES+= jail +.endif + .if ${MK_KERBEROS} != "no" _kadmind= kadmind _kdc= kdc Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 4 08:33:04 2015 (r278184) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 4 09:10:46 2015 (r278185) @@ -2143,6 +2143,7 @@ OLD_FILES+=usr/share/man/man8/IPXrouted. .endif .if ${MK_JAIL} == no +OLD_FILES+=etc/rc.d/jail OLD_FILES+=usr/sbin/jail OLD_FILES+=usr/sbin/jexec OLD_FILES+=usr/sbin/jls From owner-svn-src-stable@FreeBSD.ORG Wed Feb 4 09:14:09 2015 Return-Path: Delivered-To: svn-src-stable@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 39BD776; Wed, 4 Feb 2015 09:14:09 +0000 (UTC) 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 24BC52B6; Wed, 4 Feb 2015 09:14:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t149E9QN019790; Wed, 4 Feb 2015 09:14:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t149E8n9019788; Wed, 4 Feb 2015 09:14:08 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502040914.t149E8n9019788@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 4 Feb 2015 09:14: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: r278186 - in stable/10: etc/defaults tools/build/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-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2015 09:14:09 -0000 Author: ngie Date: Wed Feb 4 09:14:07 2015 New Revision: 278186 URL: https://svnweb.freebsd.org/changeset/base/278186 Log: MFC r277738: r277738: Honor MK_BLUETOOTH with etc/defaults/bluetooth.device.conf Sponsored by: EMC / Isilon Storage Division Modified: stable/10/etc/defaults/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/defaults/Makefile ============================================================================== --- stable/10/etc/defaults/Makefile Wed Feb 4 09:10:46 2015 (r278185) +++ stable/10/etc/defaults/Makefile Wed Feb 4 09:14:07 2015 (r278186) @@ -1,7 +1,13 @@ # $FreeBSD$ -FILES= bluetooth.device.conf devfs.rules periodic.conf rc.conf +.include + +FILES= devfs.rules periodic.conf rc.conf NO_OBJ= FILESDIR= /etc/defaults +.if ${MK_BLUETOOTH} != "no" +FILES+= bluetooth.device.conf +.endif + .include Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 4 09:10:46 2015 (r278185) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 4 09:14:07 2015 (r278186) @@ -143,6 +143,8 @@ OLD_FILES+=usr/share/man/man8/authpf-noi OLD_FILES+=etc/bluetooth/hcsecd.conf OLD_FILES+=etc/bluetooth/hosts OLD_FILES+=etc/bluetooth/protocols +OLD_DIRS+=etc/bluetooth +OLD_FILES+=etc/defaults/bluetooth.device.conf OLD_FILES+=usr/bin/bthost OLD_FILES+=usr/bin/btsockstat OLD_FILES+=usr/bin/rfcomm_sppd From owner-svn-src-stable@FreeBSD.ORG Wed Feb 4 09:21:08 2015 Return-Path: Delivered-To: svn-src-stable@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 C8D38333; Wed, 4 Feb 2015 09:21:08 +0000 (UTC) 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 B39A4328; Wed, 4 Feb 2015 09:21:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t149L8cR023080; Wed, 4 Feb 2015 09:21:08 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t149L804023070; Wed, 4 Feb 2015 09:21:08 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502040921.t149L804023070@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 4 Feb 2015 09:21: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: r278188 - in stable/10: etc/rc.d tools/build/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-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2015 09:21:08 -0000 Author: ngie Date: Wed Feb 4 09:21:07 2015 New Revision: 278188 URL: https://svnweb.freebsd.org/changeset/base/278188 Log: MFC r277731,r277734: r277731: Honor MK_LPR with etc/rc.d/lpd Sponsored by: EMC / Isilon Storage Division r277734: Remove explicit inclusion of lpd from FILES Sponsored by: EMC / Isilon Storage Division Modified: stable/10/etc/rc.d/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/Makefile ============================================================================== --- stable/10/etc/rc.d/Makefile Wed Feb 4 09:16:14 2015 (r278187) +++ stable/10/etc/rc.d/Makefile Wed Feb 4 09:21:07 2015 (r278188) @@ -80,7 +80,6 @@ FILES= DAEMON \ local \ localpkg \ lockd \ - lpd \ mixer \ motd \ mountcritlocal \ @@ -193,6 +192,10 @@ _kfd= kfd _kpasswdd= kpasswdd .endif +.if ${MK_LPR} != "no" +FILES+= lpd +.endif + .if ${MK_NS_CACHING} != "no" _nscd= nscd .endif Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 4 09:16:14 2015 (r278187) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 4 09:21:07 2015 (r278188) @@ -3317,6 +3317,7 @@ OLD_FILES+=usr/share/man/man8/updatedb.8 .if ${MK_LPR} == no OLD_FILES+=etc/hosts.lpd OLD_FILES+=etc/printcap +OLD_FILES+=etc/rc.d/lpd OLD_FILES+=usr/bin/lp OLD_FILES+=usr/bin/lpq OLD_FILES+=usr/bin/lpr From owner-svn-src-stable@FreeBSD.ORG Wed Feb 4 09:23:41 2015 Return-Path: Delivered-To: svn-src-stable@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 CA3434BB; Wed, 4 Feb 2015 09:23:41 +0000 (UTC) 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 B57103E3; Wed, 4 Feb 2015 09:23:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t149Nfug024508; Wed, 4 Feb 2015 09:23:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t149Nf5q024504; Wed, 4 Feb 2015 09:23:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502040923.t149Nf5q024504@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 4 Feb 2015 09:23:41 +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: r278189 - in stable/9: etc/rc.d tools/build/mk 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2015 09:23:41 -0000 Author: ngie Date: Wed Feb 4 09:23:40 2015 New Revision: 278189 URL: https://svnweb.freebsd.org/changeset/base/278189 Log: MFC r277739: r277739: Honor MK_JAIL with etc/rc.d/jail Sponsored by: EMC / Isilon Storage Division Modified: stable/9/etc/rc.d/Makefile stable/9/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/9/ (props changed) stable/9/etc/ (props changed) stable/9/etc/rc.d/ (props changed) stable/9/tools/ (props changed) stable/9/tools/build/ (props changed) Modified: stable/9/etc/rc.d/Makefile ============================================================================== --- stable/9/etc/rc.d/Makefile Wed Feb 4 09:21:07 2015 (r278188) +++ stable/9/etc/rc.d/Makefile Wed Feb 4 09:23:40 2015 (r278189) @@ -63,7 +63,6 @@ FILES= DAEMON \ ipnat \ ipsec \ ${_ipxrouted} \ - jail \ kadmind \ kerberos \ keyserv \ @@ -162,6 +161,10 @@ FILES= DAEMON \ _ipxrouted= ipxrouted .endif +.if ${MK_JAIL} != "no" +FILES+= jail +.endif + .if ${MK_OFED} != "no" _opensm= opensm .endif Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 4 09:21:07 2015 (r278188) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 4 09:23:40 2015 (r278189) @@ -2236,6 +2236,7 @@ OLD_FILES+=usr/share/man/man8/IPXrouted. .endif .if ${MK_JAIL} == no +OLD_FILES+=etc/rc.d/jail OLD_FILES+=usr/sbin/jail OLD_FILES+=usr/sbin/jexec OLD_FILES+=usr/sbin/jls From owner-svn-src-stable@FreeBSD.ORG Wed Feb 4 09:31:11 2015 Return-Path: Delivered-To: svn-src-stable@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 D9C8E75F; Wed, 4 Feb 2015 09:31:11 +0000 (UTC) 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 C49116BC; Wed, 4 Feb 2015 09:31:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t149VBgk028510; Wed, 4 Feb 2015 09:31:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t149VBBL028507; Wed, 4 Feb 2015 09:31:11 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502040931.t149VBBL028507@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 4 Feb 2015 09:31: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: r278190 - in stable/10: etc/rc.d tools/build/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-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2015 09:31:12 -0000 Author: ngie Date: Wed Feb 4 09:31:10 2015 New Revision: 278190 URL: https://svnweb.freebsd.org/changeset/base/278190 Log: MFC r277732: r277732: Honor MK_API in etc/rc.d Sponsored by: EMC / Isilon Storage Division Modified: stable/10/etc/rc.d/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/Makefile ============================================================================== --- stable/10/etc/rc.d/Makefile Wed Feb 4 09:23:40 2015 (r278189) +++ stable/10/etc/rc.d/Makefile Wed Feb 4 09:31:10 2015 (r278190) @@ -12,8 +12,6 @@ FILES= DAEMON \ addswap \ adjkerntz \ amd \ - apm \ - apmd \ archdep \ atm1 \ atm2 \ @@ -166,6 +164,11 @@ FILES= DAEMON \ zfs \ zvol +.if ${MK_APM} != "no" +FILES+= apm +FILES+= apmd +.endif + .if ${MK_BLUETOOTH} != "no" _bluetooth= bluetooth _bthidd= bthidd Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 4 09:23:40 2015 (r278189) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 4 09:31:10 2015 (r278190) @@ -48,6 +48,8 @@ OLD_FILES+=usr/share/man/man8/wire-test. .endif .if ${MK_APM} == no +OLD_FILES+=etc/rc.d/apm +OLD_FILES+=etc/rc.d/apmd OLD_FILES+=etc/apmd.conf OLD_FILES+=usr/sbin/apm OLD_FILES+=usr/share/examples/etc/apmd.conf From owner-svn-src-stable@FreeBSD.ORG Wed Feb 4 09:33:44 2015 Return-Path: Delivered-To: svn-src-stable@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 10E30952; Wed, 4 Feb 2015 09:33:44 +0000 (UTC) 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 EFECD6E1; Wed, 4 Feb 2015 09:33:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t149XhGr029330; Wed, 4 Feb 2015 09:33:43 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t149XhUJ029328; Wed, 4 Feb 2015 09:33:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502040933.t149XhUJ029328@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 4 Feb 2015 09:33: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: r278191 - in stable/10: etc/rc.d tools/build/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-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2015 09:33:44 -0000 Author: ngie Date: Wed Feb 4 09:33:42 2015 New Revision: 278191 URL: https://svnweb.freebsd.org/changeset/base/278191 Log: MFC r277733: r277733: Honor MK_AMD with etc/rc.d/amd Sponsored by: EMC / Isilon Storage Division Modified: stable/10/etc/rc.d/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/Makefile ============================================================================== --- stable/10/etc/rc.d/Makefile Wed Feb 4 09:31:10 2015 (r278190) +++ stable/10/etc/rc.d/Makefile Wed Feb 4 09:33:42 2015 (r278191) @@ -11,7 +11,6 @@ FILES= DAEMON \ accounting \ addswap \ adjkerntz \ - amd \ archdep \ atm1 \ atm2 \ @@ -164,6 +163,10 @@ FILES= DAEMON \ zfs \ zvol +.if ${MK_AMD} != "no" +FILES+= amd +.endif + .if ${MK_APM} != "no" FILES+= apm FILES+= apmd Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 4 09:31:10 2015 (r278190) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 4 09:33:42 2015 (r278191) @@ -26,6 +26,7 @@ OLD_FILES+=usr/share/man/man8/iasl.8.gz .if ${MK_AMD} == no OLD_FILES+=etc/amd.map +OLD_FILES+=etc/rc.d/amd OLD_FILES+=usr/bin/pawd OLD_FILES+=usr/sbin/amd OLD_FILES+=usr/sbin/amq From owner-svn-src-stable@FreeBSD.ORG Wed Feb 4 10:36:12 2015 Return-Path: Delivered-To: svn-src-stable@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 2FC57756; Wed, 4 Feb 2015 10:36:12 +0000 (UTC) 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 0FADBD2D; Wed, 4 Feb 2015 10:36:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t14AaBuk057426; Wed, 4 Feb 2015 10:36:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t14AaBBq057424; Wed, 4 Feb 2015 10:36:11 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502041036.t14AaBBq057424@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 4 Feb 2015 10:36:11 +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: r278195 - in stable/9: etc/rc.d tools/build/mk 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2015 10:36:12 -0000 Author: ngie Date: Wed Feb 4 10:36:10 2015 New Revision: 278195 URL: https://svnweb.freebsd.org/changeset/base/278195 Log: MFC r277686,r277687: r277686: Install bsnmp rc.d script if MK_BSNMP != no Sponsored by: EMC / Isilon Storage Division r277687: Fill in entries for MK_BSNMP == no Sponsored by: EMC / Isilon Storage Division Modified: stable/9/etc/rc.d/Makefile stable/9/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/9/ (props changed) stable/9/etc/ (props changed) stable/9/etc/rc.d/ (props changed) stable/9/tools/ (props changed) stable/9/tools/build/ (props changed) Modified: stable/9/etc/rc.d/Makefile ============================================================================== --- stable/9/etc/rc.d/Makefile Wed Feb 4 10:29:53 2015 (r278194) +++ stable/9/etc/rc.d/Makefile Wed Feb 4 10:36:10 2015 (r278195) @@ -24,7 +24,6 @@ FILES= DAEMON \ ${_bluetooth} \ bootparams \ bridge \ - bsnmpd \ ${_bthidd} \ ccd \ cleanvar \ @@ -157,6 +156,10 @@ FILES= DAEMON \ zfs \ zvol +.if ${MK_BSNMP} != "no" +FILES+= bsnmpd +.endif + .if ${MK_IPX} != "no" _ipxrouted= ipxrouted .endif Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 4 10:29:53 2015 (r278194) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 4 10:36:10 2015 (r278195) @@ -466,6 +466,99 @@ OLD_FILES+=usr/share/man/man8/sdpd.8.gz # to be filled in #.endif +.if ${MK_BSNMP} == no +OLD_FILES+=etc/snmpd.config +OLD_FILES+=etc/rc.d/bsnmpd +OLD_FILES+=usr/bin/bsnmpget +OLD_FILES+=usr/bin/bsnmpset +OLD_FILES+=usr/bin/bsnmpwalk +OLD_FILES+=usr/include/bsnmp/asn1.h +OLD_FILES+=usr/include/bsnmp/bridge_snmp.h +OLD_FILES+=usr/include/bsnmp/snmp.h +OLD_FILES+=usr/include/bsnmp/snmp_atm.h +OLD_FILES+=usr/include/bsnmp/snmp_mibII.h +OLD_FILES+=usr/include/bsnmp/snmp_netgraph.h +OLD_FILES+=usr/include/bsnmp/snmpagent.h +OLD_FILES+=usr/include/bsnmp/snmpclient.h +OLD_FILES+=usr/include/bsnmp/snmpmod.h +OLD_FILES+=usr/lib/libbsnmp.a +OLD_LIBS+=usr/lib/libbsnmp.so.6 +OLD_FILES+=usr/lib/libbsnmp_p.a +OLD_FILES+=usr/lib/libbsnmptools.a +OLD_LIBS+=usr/lib/libbsnmptools.so.0 +OLD_FILES+=usr/lib/libbsnmptools_p.a +OLD_LIBS+=usr/lib/snmp_atm.so.6 +OLD_LIBS+=usr/lib/snmp_bridge.so.6 +OLD_LIBS+=usr/lib/snmp_hast.so.6 +OLD_LIBS+=usr/lib/snmp_hostres.so.6 +OLD_LIBS+=usr/lib/snmp_lm75.so.6 +OLD_LIBS+=usr/lib/snmp_mibII.so.6 +OLD_LIBS+=usr/lib/snmp_netgraph.so.6 +OLD_LIBS+=usr/lib/snmp_pf.so.6 +OLD_LIBS+=usr/lib/snmp_target.so.6 +OLD_LIBS+=usr/lib/snmp_usm.so.6 +OLD_LIBS+=usr/lib/snmp_vacm.so.6 +OLD_LIBS+=usr/lib/snmp_wlan.so.6 +OLD_FILES+=usr/sbin/bsnmpd +OLD_FILES+=usr/sbin/gensnmptree +OLD_FILES+=usr/share/man/man1/bsnmpd.1.gz +OLD_FILES+=usr/share/man/man1/bsnmpget.1.gz +OLD_FILES+=usr/share/man/man1/bsnmpset.1.gz +OLD_FILES+=usr/share/man/man1/bsnmpwalk.1.gz +OLD_FILES+=usr/share/man/man1/gensnmptree.1.gz +OLD_FILES+=usr/share/man/man3/asn1.3.gz +OLD_FILES+=usr/share/man/man3/bsnmpagent.3.gz +OLD_FILES+=usr/share/man/man3/bsnmpclient.3.gz +OLD_FILES+=usr/share/man/man3/bsnmplib.3.gz +OLD_FILES+=usr/share/man/man3/snmp_atm.3.gz +OLD_FILES+=usr/share/man/man3/snmp_bridge.3.gz +OLD_FILES+=usr/share/man/man3/snmp_hast.3.gz +OLD_FILES+=usr/share/man/man3/snmp_hostres.3.gz +OLD_FILES+=usr/share/man/man3/snmp_lm75.3.gz +OLD_FILES+=usr/share/man/man3/snmp_mibII.3.gz +OLD_FILES+=usr/share/man/man3/snmp_netgraph.3.gz +OLD_FILES+=usr/share/man/man3/snmp_target.3.gz +OLD_FILES+=usr/share/man/man3/snmp_usm.3.gz +OLD_FILES+=usr/share/man/man3/snmp_vacm.3.gz +OLD_FILES+=usr/share/man/man3/snmp_wlan.3.gz +OLD_FILES+=usr/share/man/man3/snmpmod.3.gz +OLD_FILES+=usr/share/snmp/defs/atm_freebsd.def +OLD_FILES+=usr/share/snmp/defs/atm_tree.def +OLD_FILES+=usr/share/snmp/defs/bridge_tree.def +OLD_FILES+=usr/share/snmp/defs/hast_tree.def +OLD_FILES+=usr/share/snmp/defs/hostres_tree.def +OLD_FILES+=usr/share/snmp/defs/lm75_tree.def +OLD_FILES+=usr/share/snmp/defs/mibII_tree.def +OLD_FILES+=usr/share/snmp/defs/netgraph_tree.def +OLD_FILES+=usr/share/snmp/defs/pf_tree.def +OLD_FILES+=usr/share/snmp/defs/target_tree.def +OLD_FILES+=usr/share/snmp/defs/tree.def +OLD_FILES+=usr/share/snmp/defs/usm_tree.def +OLD_FILES+=usr/share/snmp/defs/vacm_tree.def +OLD_FILES+=usr/share/snmp/defs/wlan_tree.def +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-ATM-FREEBSD-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-ATM.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-BRIDGE-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-HAST-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-HOSTRES-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-IP-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-LM75-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-MIB2-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-NETGRAPH.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-PF-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-SNMPD.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-WIRELESS-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/BRIDGE-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/FOKUS-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/FREEBSD-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/RSTP-MIB.txt +OLD_DIRS+=usr/include/bsnmp +OLD_DIRS+=usr/share/snmp +OLD_DIRS+=usr/share/snmp/defs +OLD_DIRS+=usr/share/snmp/mibs +.endif + .if ${MK_CALENDAR} == no OLD_FILES+=etc/periodic/daily/300.calendar OLD_FILES+=usr/bin/calendar From owner-svn-src-stable@FreeBSD.ORG Wed Feb 4 11:51:47 2015 Return-Path: Delivered-To: svn-src-stable@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 C94051D0; Wed, 4 Feb 2015 11:51:47 +0000 (UTC) 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 B4BD38F2; Wed, 4 Feb 2015 11:51:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t14BplfN091936; Wed, 4 Feb 2015 11:51:47 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t14Bpl9E091934; Wed, 4 Feb 2015 11:51:47 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502041151.t14Bpl9E091934@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 4 Feb 2015 11:51:47 +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: r278205 - in stable/9: etc/rc.d tools/build/mk 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2015 11:51:47 -0000 Author: ngie Date: Wed Feb 4 11:51:46 2015 New Revision: 278205 URL: https://svnweb.freebsd.org/changeset/base/278205 Log: MFC r277731,r277734: r277731: Honor MK_LPR with etc/rc.d/lpd Sponsored by: EMC / Isilon Storage Division r277734: Remove explicit inclusion of lpd from FILES Sponsored by: EMC / Isilon Storage Division Modified: stable/9/etc/rc.d/Makefile stable/9/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/9/ (props changed) stable/9/etc/ (props changed) stable/9/etc/rc.d/ (props changed) stable/9/tools/ (props changed) stable/9/tools/build/ (props changed) Modified: stable/9/etc/rc.d/Makefile ============================================================================== --- stable/9/etc/rc.d/Makefile Wed Feb 4 11:48:33 2015 (r278204) +++ stable/9/etc/rc.d/Makefile Wed Feb 4 11:51:46 2015 (r278205) @@ -72,7 +72,6 @@ FILES= DAEMON \ local \ localpkg \ lockd \ - lpd \ mixer \ motd \ mountcritlocal \ @@ -168,6 +167,10 @@ _ipxrouted= ipxrouted FILES+= jail .endif +.if ${MK_LPR} != "no" +FILES+= lpd +.endif + .if ${MK_OFED} != "no" _opensm= opensm .endif Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 4 11:48:33 2015 (r278204) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 4 11:51:46 2015 (r278205) @@ -2931,6 +2931,7 @@ OLD_FILES+=usr/share/man/man8/updatedb.8 .if ${MK_LPR} == no OLD_FILES+=etc/hosts.lpd OLD_FILES+=etc/printcap +OLD_FILES+=etc/rc.d/lpd OLD_FILES+=usr/bin/lp OLD_FILES+=usr/bin/lpq OLD_FILES+=usr/bin/lpr From owner-svn-src-stable@FreeBSD.ORG Wed Feb 4 19:40:32 2015 Return-Path: Delivered-To: svn-src-stable@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 31B6C50C; Wed, 4 Feb 2015 19:40:32 +0000 (UTC) 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 03C95A7B; Wed, 4 Feb 2015 19:40:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t14JeVNn018231; Wed, 4 Feb 2015 19:40:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t14JeVAP018229; Wed, 4 Feb 2015 19:40:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502041940.t14JeVAP018229@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 4 Feb 2015 19:40:31 +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: r278219 - in stable/9: etc/rc.d tools/build/mk 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2015 19:40:32 -0000 Author: ngie Date: Wed Feb 4 19:40:30 2015 New Revision: 278219 URL: https://svnweb.freebsd.org/changeset/base/278219 Log: MFC r277732,r277733: r277732: Honor MK_API in etc/rc.d Sponsored by: EMC / Isilon Storage Division r277733: Honor MK_AMD with etc/rc.d/amd Sponsored by: EMC / Isilon Storage Division Modified: stable/9/etc/rc.d/Makefile stable/9/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/9/ (props changed) stable/9/etc/ (props changed) stable/9/etc/rc.d/ (props changed) stable/9/tools/ (props changed) stable/9/tools/build/ (props changed) Modified: stable/9/etc/rc.d/Makefile ============================================================================== --- stable/9/etc/rc.d/Makefile Wed Feb 4 18:58:09 2015 (r278218) +++ stable/9/etc/rc.d/Makefile Wed Feb 4 19:40:30 2015 (r278219) @@ -11,9 +11,6 @@ FILES= DAEMON \ accounting \ addswap \ adjkerntz \ - amd \ - apm \ - apmd \ archdep \ atm1 \ atm2 \ @@ -155,6 +152,15 @@ FILES= DAEMON \ zfs \ zvol +.if ${MK_AMD} != "no" +FILES+= amd +.endif + +.if ${MK_APM} != "no" +FILES+= apm +FILES+= apmd +.endif + .if ${MK_BSNMP} != "no" FILES+= bsnmpd .endif Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 4 18:58:09 2015 (r278218) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 4 19:40:30 2015 (r278219) @@ -26,6 +26,7 @@ OLD_FILES+=usr/share/man/man8/iasl.8.gz .if ${MK_AMD} == no OLD_FILES+=etc/amd.map +OLD_FILES+=etc/rc.d/amd OLD_FILES+=usr/bin/pawd OLD_FILES+=usr/sbin/amd OLD_FILES+=usr/sbin/amq @@ -48,6 +49,8 @@ OLD_FILES+=usr/share/man/man8/wire-test. .endif .if ${MK_APM} == no +OLD_FILES+=etc/rc.d/apm +OLD_FILES+=etc/rc.d/apmd OLD_FILES+=etc/apmd.conf OLD_FILES+=usr/sbin/apm OLD_FILES+=usr/share/examples/etc/apmd.conf From owner-svn-src-stable@FreeBSD.ORG Thu Feb 5 09:29:58 2015 Return-Path: Delivered-To: svn-src-stable@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 74A0C2B2; Thu, 5 Feb 2015 09:29:58 +0000 (UTC) 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 4604BC32; Thu, 5 Feb 2015 09:29:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t159Twbw009320; Thu, 5 Feb 2015 09:29:58 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t159Tviq009318; Thu, 5 Feb 2015 09:29:57 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201502050929.t159Tviq009318@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Thu, 5 Feb 2015 09:29: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: r278240 - stable/10/sys/dev/mps X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2015 09:29:58 -0000 Author: scottl Date: Thu Feb 5 09:29:57 2015 New Revision: 278240 URL: https://svnweb.freebsd.org/changeset/base/278240 Log: MFC 277717: Fix the ioctl interface to properly support fetching the header of regular and extended config pages. Obtained from: Netflix, Inc. Modified: stable/10/sys/dev/mps/mps.c stable/10/sys/dev/mps/mps_user.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mps/mps.c ============================================================================== --- stable/10/sys/dev/mps/mps.c Thu Feb 5 08:52:20 2015 (r278239) +++ stable/10/sys/dev/mps/mps.c Thu Feb 5 09:29:57 2015 (r278240) @@ -2621,9 +2621,12 @@ mps_read_config_page(struct mps_softc *s cm->cm_data = params->buffer; cm->cm_length = params->length; - cm->cm_sge = &req->PageBufferSGE; - cm->cm_sglsize = sizeof(MPI2_SGE_IO_UNION); - cm->cm_flags = MPS_CM_FLAGS_SGE_SIMPLE | MPS_CM_FLAGS_DATAIN; + if (cm->cm_data != NULL) { + cm->cm_sge = &req->PageBufferSGE; + cm->cm_sglsize = sizeof(MPI2_SGE_IO_UNION); + cm->cm_flags = MPS_CM_FLAGS_SGE_SIMPLE | MPS_CM_FLAGS_DATAIN; + } else + cm->cm_sge = NULL; cm->cm_desc.Default.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE; cm->cm_complete_data = params; @@ -2680,9 +2683,12 @@ mps_config_complete(struct mps_softc *sc goto done; } params->status = reply->IOCStatus; - if (params->hdr.Ext.ExtPageType != 0) { + if (params->hdr.Struct.PageType == MPI2_CONFIG_PAGETYPE_EXTENDED) { params->hdr.Ext.ExtPageType = reply->ExtPageType; params->hdr.Ext.ExtPageLength = reply->ExtPageLength; + params->hdr.Ext.PageType = reply->Header.PageType; + params->hdr.Ext.PageNumber = reply->Header.PageNumber; + params->hdr.Ext.PageVersion = reply->Header.PageVersion; } else { params->hdr.Struct.PageType = reply->Header.PageType; params->hdr.Struct.PageNumber = reply->Header.PageNumber; Modified: stable/10/sys/dev/mps/mps_user.c ============================================================================== --- stable/10/sys/dev/mps/mps_user.c Thu Feb 5 08:52:20 2015 (r278239) +++ stable/10/sys/dev/mps/mps_user.c Thu Feb 5 09:29:57 2015 (r278240) @@ -309,6 +309,10 @@ mps_user_read_extcfg_header(struct mps_s hdr->PageNumber = ext_page_req->header.PageNumber; hdr->ExtPageType = ext_page_req->header.ExtPageType; params.page_address = le32toh(ext_page_req->page_address); + params.buffer = NULL; + params.length = 0; + params.callback = NULL; + if ((error = mps_read_config_page(sc, ¶ms)) != 0) { /* * Leave the request. Without resetting the chip, it's From owner-svn-src-stable@FreeBSD.ORG Thu Feb 5 09:55:01 2015 Return-Path: Delivered-To: svn-src-stable@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 C37B87F6; Thu, 5 Feb 2015 09:55:01 +0000 (UTC) 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 94988EEF; Thu, 5 Feb 2015 09:55:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t159t11d022958; Thu, 5 Feb 2015 09:55:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t159t17D022933; Thu, 5 Feb 2015 09:55:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502050955.t159t17D022933@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 5 Feb 2015 09:55:01 +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: r278241 - in stable/9: etc/rc.d tools/build/mk 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2015 09:55:01 -0000 Author: ngie Date: Thu Feb 5 09:55:00 2015 New Revision: 278241 URL: https://svnweb.freebsd.org/changeset/base/278241 Log: MFC r277740,r278053: r277740: Honor MK_WIRELESS with etc/rc.d/hostapd and etc/rc.d/wpa_supplicant Sponsored by: EMC / Isilon Storage Division r278053: Remove hostapd and wpa_supplicant from FILES so they're installed conditionally if MK_WIRELESS != no Modified: stable/9/etc/rc.d/Makefile stable/9/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/9/ (props changed) stable/9/etc/ (props changed) stable/9/etc/rc.d/ (props changed) stable/9/tools/ (props changed) stable/9/tools/build/ (props changed) Modified: stable/9/etc/rc.d/Makefile ============================================================================== --- stable/9/etc/rc.d/Makefile Thu Feb 5 09:29:57 2015 (r278240) +++ stable/9/etc/rc.d/Makefile Thu Feb 5 09:55:00 2015 (r278241) @@ -45,7 +45,6 @@ FILES= DAEMON \ gssd \ hastd \ ${_hcsecd} \ - hostapd \ hostid \ hostid_save \ hostname \ @@ -142,7 +141,6 @@ FILES= DAEMON \ var \ virecover \ watchdogd \ - wpa_supplicant \ ypbind \ yppasswdd \ ypserv \ @@ -196,6 +194,11 @@ _hcsecd= hcsecd _ubthidhci= ubthidhci .endif +.if ${MK_WIRELESS} != "no" +FILES+= hostapd +FILES+= wpa_supplicant +.endif + FILESDIR= /etc/rc.d FILESMODE= ${BINMODE} Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Thu Feb 5 09:29:57 2015 (r278240) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Thu Feb 5 09:55:00 2015 (r278241) @@ -3876,6 +3876,8 @@ OLD_FILES+=usr/share/man/man8/utxrm.8.gz .if ${MK_WIRELESS} == no OLD_FILES+=etc/regdomain.xml +OLD_FILES+=etc/rc.d/hostapd +OLD_FILES+=etc/rc.d/wpa_supplicant OLD_FILES+=usr/sbin/ancontrol OLD_FILES+=usr/sbin/hostapd OLD_FILES+=usr/sbin/hostapd_cli From owner-svn-src-stable@FreeBSD.ORG Thu Feb 5 09:59:19 2015 Return-Path: Delivered-To: svn-src-stable@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 933FC986; Thu, 5 Feb 2015 09:59:19 +0000 (UTC) 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 7E672F20; Thu, 5 Feb 2015 09:59:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t159xJY8023541; Thu, 5 Feb 2015 09:59:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t159xJiJ023539; Thu, 5 Feb 2015 09:59:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502050959.t159xJiJ023539@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 5 Feb 2015 09: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: r278242 - in stable/10: etc/rc.d tools/build/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-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2015 09:59:19 -0000 Author: ngie Date: Thu Feb 5 09:59:18 2015 New Revision: 278242 URL: https://svnweb.freebsd.org/changeset/base/278242 Log: MFC r277740,r278053: r277740: Honor MK_WIRELESS with etc/rc.d/hostapd and etc/rc.d/wpa_supplicant Sponsored by: EMC / Isilon Storage Division r278053: Remove hostapd and wpa_supplicant from FILES so they're installed conditionally if MK_WIRELESS != no Modified: stable/10/etc/rc.d/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/Makefile ============================================================================== --- stable/10/etc/rc.d/Makefile Thu Feb 5 09:55:00 2015 (r278241) +++ stable/10/etc/rc.d/Makefile Thu Feb 5 09:59:18 2015 (r278242) @@ -48,7 +48,6 @@ FILES= DAEMON \ gssd \ hastd \ ${_hcsecd} \ - hostapd \ hostid \ hostid_save \ hostname \ @@ -153,7 +152,6 @@ FILES= DAEMON \ var \ virecover \ watchdogd \ - wpa_supplicant \ ypbind \ yppasswdd \ ypserv \ @@ -222,6 +220,11 @@ _unbound= local_unbound _utx= utx .endif +.if ${MK_WIRELESS} != "no" +FILES+= hostapd +FILES+= wpa_supplicant +.endif + FILESDIR= /etc/rc.d FILESMODE= ${BINMODE} Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Thu Feb 5 09:55:00 2015 (r278241) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Thu Feb 5 09:59:18 2015 (r278242) @@ -4758,6 +4758,8 @@ OLD_FILES+=usr/share/man/man8/utxrm.8.gz .if ${MK_WIRELESS} == no OLD_FILES+=etc/regdomain.xml +OLD_FILES+=etc/rc.d/hostapd +OLD_FILES+=etc/rc.d/wpa_supplicant OLD_FILES+=usr/sbin/ancontrol OLD_FILES+=usr/sbin/hostapd OLD_FILES+=usr/sbin/hostapd_cli From owner-svn-src-stable@FreeBSD.ORG Thu Feb 5 10:06:45 2015 Return-Path: Delivered-To: svn-src-stable@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 98458B6D; Thu, 5 Feb 2015 10:06:45 +0000 (UTC) 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 835956F; Thu, 5 Feb 2015 10:06:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t15A6j82028096; Thu, 5 Feb 2015 10:06:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t15A6jp0028094; Thu, 5 Feb 2015 10:06:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502051006.t15A6jp0028094@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 5 Feb 2015 10:06: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: r278243 - in stable/9: etc/defaults tools/build/mk 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2015 10:06:45 -0000 Author: ngie Date: Thu Feb 5 10:06:44 2015 New Revision: 278243 URL: https://svnweb.freebsd.org/changeset/base/278243 Log: MFC r277738: r277738: Honor MK_BLUETOOTH with etc/defaults/bluetooth.device.conf Sponsored by: EMC / Isilon Storage Division Modified: stable/9/etc/defaults/Makefile stable/9/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/9/ (props changed) stable/9/etc/ (props changed) stable/9/tools/ (props changed) stable/9/tools/build/ (props changed) Modified: stable/9/etc/defaults/Makefile ============================================================================== --- stable/9/etc/defaults/Makefile Thu Feb 5 09:59:18 2015 (r278242) +++ stable/9/etc/defaults/Makefile Thu Feb 5 10:06:44 2015 (r278243) @@ -1,7 +1,13 @@ # $FreeBSD$ -FILES= bluetooth.device.conf devfs.rules periodic.conf rc.conf +.include + +FILES= devfs.rules periodic.conf rc.conf NO_OBJ= FILESDIR= /etc/defaults +.if ${MK_BLUETOOTH} != "no" +FILES+= bluetooth.device.conf +.endif + .include Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Thu Feb 5 09:59:18 2015 (r278242) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Thu Feb 5 10:06:44 2015 (r278243) @@ -344,6 +344,8 @@ OLD_DIRS+=var/named/etc/namedb/dynamic OLD_FILES+=etc/bluetooth/hcsecd.conf OLD_FILES+=etc/bluetooth/hosts OLD_FILES+=etc/bluetooth/protocols +OLD_DIRS+=etc/bluetooth +OLD_FILES+=etc/defaults/bluetooth.device.conf OLD_FILES+=usr/bin/bthost OLD_FILES+=usr/bin/btsockstat OLD_FILES+=usr/bin/rfcomm_sppd From owner-svn-src-stable@FreeBSD.ORG Thu Feb 5 10:21:23 2015 Return-Path: Delivered-To: svn-src-stable@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 29924FE8; Thu, 5 Feb 2015 10:21:23 +0000 (UTC) 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 EF436229; Thu, 5 Feb 2015 10:21:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t15ALMFv035762; Thu, 5 Feb 2015 10:21:22 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t15ALMfA035760; Thu, 5 Feb 2015 10:21:22 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502051021.t15ALMfA035760@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 5 Feb 2015 10:21: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: r278244 - in stable/10: etc/devd tools/build/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-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2015 10:21:23 -0000 Author: ngie Date: Thu Feb 5 10:21:21 2015 New Revision: 278244 URL: https://svnweb.freebsd.org/changeset/base/278244 Log: MFC r270028: r270028: Make the USB and ZFS devd configuration files optional depending on the values of MK_USB/MK_ZFS Making zfs.conf optional resolves PR # 186971 PR: 186971 Phabric: D606 Approved by: jmmv (mentor) Sponsored by: EMC / Isilon Storage Division Modified: stable/10/etc/devd/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/devd/Makefile ============================================================================== --- stable/10/etc/devd/Makefile Thu Feb 5 10:06:44 2015 (r278243) +++ stable/10/etc/devd/Makefile Thu Feb 5 10:21:21 2015 (r278244) @@ -2,8 +2,6 @@ .include -FILES= uath.conf usb.conf zfs.conf - .if ${MACHINE} == "powerpc" FILES+= apple.conf .endif @@ -16,6 +14,14 @@ FILES+= asus.conf FILES+= hyperv.conf .endif +.if ${MK_USB} != "no" +FILES+= uath.conf usb.conf +.endif + +.if ${MK_ZFS} != "no" +FILES+= zfs.conf +.endif + NO_OBJ= FILESDIR= /etc/devd FILESMODE= 644 Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Thu Feb 5 10:06:44 2015 (r278243) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Thu Feb 5 10:21:21 2015 (r278244) @@ -511,6 +511,7 @@ OLD_DIRS+=usr/share/dtrace OLD_FILES+=boot/gptzfsboot OLD_FILES+=boot/zfsboot OLD_FILES+=boot/zfsloader +OLD_FILES+=etc/devd/zfs.conf OLD_FILES+=etc/periodic/daily/404.status-zfs OLD_FILES+=etc/periodic/daily/800.scrub-zfs OLD_LIBS+=lib/libzfs.so.2 @@ -4732,9 +4733,10 @@ OLD_FILES+=usr/sbin/unbound-control OLD_FILES+=usr/sbin/unbound-control-setup .endif -#.if ${MK_USB} == no -# to be filled in -#.endif +.if ${MK_USB} == no +OLD_FILES+=etc/devd/uauth.conf +OLD_FILES+=etc/devd/usb.conf +.endif .if ${MK_UTMPX} == no OLD_FILES+=etc/periodic/monthly/200.accounting From owner-svn-src-stable@FreeBSD.ORG Thu Feb 5 10:26:26 2015 Return-Path: Delivered-To: svn-src-stable@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 15DCA31D; Thu, 5 Feb 2015 10:26:26 +0000 (UTC) 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 DB94B330; Thu, 5 Feb 2015 10:26:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t15AQPk3037682; Thu, 5 Feb 2015 10:26:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t15AQPpk037679; Thu, 5 Feb 2015 10:26:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502051026.t15AQPpk037679@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 5 Feb 2015 10:26: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: r278245 - in stable/9: etc/devd tools/build/mk 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2015 10:26:26 -0000 Author: ngie Date: Thu Feb 5 10:26:24 2015 New Revision: 278245 URL: https://svnweb.freebsd.org/changeset/base/278245 Log: MFstable/10 r278244: MFC r270028: Make the USB and ZFS devd configuration files optional depending on the values of MK_USB/MK_ZFS Making zfs.conf optional resolves PR # 186971 PR: 186971 Phabric: D606 Approved by: jmmv (mentor) Sponsored by: EMC / Isilon Storage Division Modified: stable/9/etc/devd/Makefile stable/9/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/9/ (props changed) stable/9/etc/ (props changed) stable/9/tools/ (props changed) stable/9/tools/build/ (props changed) Modified: stable/9/etc/devd/Makefile ============================================================================== --- stable/9/etc/devd/Makefile Thu Feb 5 10:21:21 2015 (r278244) +++ stable/9/etc/devd/Makefile Thu Feb 5 10:26:24 2015 (r278245) @@ -1,6 +1,6 @@ # $FreeBSD$ -FILES= uath.conf usb.conf zfs.conf +.include .if ${MACHINE} == "powerpc" FILES+= apple.conf @@ -10,6 +10,14 @@ FILES+= apple.conf FILES+= asus.conf .endif +.if ${MK_USB} != "no" +FILES+= uath.conf usb.conf +.endif + +.if ${MK_ZFS} != "no" +FILES+= zfs.conf +.endif + NO_OBJ= FILESDIR= /etc/devd FILESMODE= 644 Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Thu Feb 5 10:21:21 2015 (r278244) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Thu Feb 5 10:26:24 2015 (r278245) @@ -709,6 +709,7 @@ OLD_DIRS+=usr/share/dtrace OLD_FILES+=boot/gptzfsboot OLD_FILES+=boot/zfsboot OLD_FILES+=boot/zfsloader +OLD_FILES+=etc/devd/zfs.conf OLD_FILES+=etc/periodic/daily/404.status-zfs OLD_FILES+=etc/periodic/daily/800.scrub-zfs OLD_LIBS+=lib/libzfs.so.2 @@ -3854,9 +3855,10 @@ OLD_FILES+=usr/share/man/man8/telnetd.8. # to be filled in #.endif -#.if ${MK_USB} == no -# to be filled in -#.endif +.if ${MK_USB} == no +OLD_FILES+=etc/devd/uauth.conf +OLD_FILES+=etc/devd/usb.conf +.endif .if ${MK_UTMPX} == no OLD_FILES+=etc/periodic/monthly/200.accounting From owner-svn-src-stable@FreeBSD.ORG Thu Feb 5 10:36:40 2015 Return-Path: Delivered-To: svn-src-stable@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 01578572; Thu, 5 Feb 2015 10:36:39 +0000 (UTC) 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 C6AAF613; Thu, 5 Feb 2015 10:36:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t15Aad8N042431; Thu, 5 Feb 2015 10:36:39 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t15Aad0t042425; Thu, 5 Feb 2015 10:36:39 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502051036.t15Aad0t042425@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 5 Feb 2015 10:36: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: r278246 - in stable/10: etc/devd etc/rc.d tools/build/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-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2015 10:36:40 -0000 Author: ngie Date: Thu Feb 5 10:36:38 2015 New Revision: 278246 URL: https://svnweb.freebsd.org/changeset/base/278246 Log: MFC r277730: r277730: Honor MK_ACPI in etc/devd and etc/rc.d Sponsored by: EMC / Isilon Storage Division Modified: stable/10/etc/devd/Makefile stable/10/etc/rc.d/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/devd/Makefile ============================================================================== --- stable/10/etc/devd/Makefile Thu Feb 5 10:26:24 2015 (r278245) +++ stable/10/etc/devd/Makefile Thu Feb 5 10:36:38 2015 (r278246) @@ -2,18 +2,20 @@ .include +FILES= + .if ${MACHINE} == "powerpc" FILES+= apple.conf .endif .if ${MACHINE} == "amd64" || ${MACHINE} == "i386" +.if ${MK_ACPI} != "no" FILES+= asus.conf .endif - .if ${MK_HYPERV} != "no" FILES+= hyperv.conf .endif - +.endif .if ${MK_USB} != "no" FILES+= uath.conf usb.conf .endif Modified: stable/10/etc/rc.d/Makefile ============================================================================== --- stable/10/etc/rc.d/Makefile Thu Feb 5 10:26:24 2015 (r278245) +++ stable/10/etc/rc.d/Makefile Thu Feb 5 10:36:38 2015 (r278246) @@ -109,7 +109,6 @@ FILES= DAEMON \ pfsync \ postrandom \ powerd \ - power_profile \ ppp \ pppoed \ pwcheck \ @@ -161,6 +160,10 @@ FILES= DAEMON \ zfs \ zvol +.if ${MK_ACPI} != "no" +FILES+= power_profile +.endif + .if ${MK_AMD} != "no" FILES+= amd .endif Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Thu Feb 5 10:26:24 2015 (r278245) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Thu Feb 5 10:36:38 2015 (r278246) @@ -14,6 +14,8 @@ OLD_FILES+=usr/share/man/man8/sa.8.gz .endif .if ${MK_ACPI} == no +OLD_FILES+=etc/devd/asus.conf +OLD_FILES+=etc/rc.d/power_profile OLD_FILES+=usr/sbin/acpiconf OLD_FILES+=usr/sbin/acpidb OLD_FILES+=usr/sbin/acpidump From owner-svn-src-stable@FreeBSD.ORG Thu Feb 5 10:50:52 2015 Return-Path: Delivered-To: svn-src-stable@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 C9F0C845; Thu, 5 Feb 2015 10:50:52 +0000 (UTC) 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 9A9A9780; Thu, 5 Feb 2015 10:50:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t15AoqYF048169; Thu, 5 Feb 2015 10:50:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t15AopU5048161; Thu, 5 Feb 2015 10:50:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502051050.t15AopU5048161@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 5 Feb 2015 10:50: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: r278247 - in stable/9: etc/devd etc/rc.d tools/build/mk 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2015 10:50:52 -0000 Author: ngie Date: Thu Feb 5 10:50:51 2015 New Revision: 278247 URL: https://svnweb.freebsd.org/changeset/base/278247 Log: MFC r277730: r277730: Honor MK_ACPI in etc/devd and etc/rc.d Sponsored by: EMC / Isilon Storage Division Modified: stable/9/etc/devd/Makefile stable/9/etc/rc.d/Makefile stable/9/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/9/ (props changed) stable/9/etc/ (props changed) stable/9/etc/rc.d/ (props changed) stable/9/tools/ (props changed) stable/9/tools/build/ (props changed) Modified: stable/9/etc/devd/Makefile ============================================================================== --- stable/9/etc/devd/Makefile Thu Feb 5 10:36:38 2015 (r278246) +++ stable/9/etc/devd/Makefile Thu Feb 5 10:50:51 2015 (r278247) @@ -2,13 +2,17 @@ .include +FILES= + .if ${MACHINE} == "powerpc" FILES+= apple.conf .endif .if ${MACHINE} == "amd64" || ${MACHINE} == "i386" +.if ${MK_ACPI} != "no" FILES+= asus.conf .endif +.endif .if ${MK_USB} != "no" FILES+= uath.conf usb.conf Modified: stable/9/etc/rc.d/Makefile ============================================================================== --- stable/9/etc/rc.d/Makefile Thu Feb 5 10:36:38 2015 (r278246) +++ stable/9/etc/rc.d/Makefile Thu Feb 5 10:50:51 2015 (r278247) @@ -101,7 +101,6 @@ FILES= DAEMON \ pflog \ pfsync \ powerd \ - power_profile \ ppp \ pppoed \ pwcheck \ @@ -154,6 +153,10 @@ FILES= DAEMON \ FILES+= amd .endif +.if ${MK_ACPI} != "no" +FILES+= power_profile +.endif + .if ${MK_APM} != "no" FILES+= apm FILES+= apmd Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Thu Feb 5 10:36:38 2015 (r278246) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Thu Feb 5 10:50:51 2015 (r278247) @@ -14,6 +14,8 @@ OLD_FILES+=usr/share/man/man8/sa.8.gz .endif .if ${MK_ACPI} == no +OLD_FILES+=etc/devd/asus.conf +OLD_FILES+=etc/rc.d/power_profile OLD_FILES+=usr/sbin/acpiconf OLD_FILES+=usr/sbin/acpidb OLD_FILES+=usr/sbin/acpidump From owner-svn-src-stable@FreeBSD.ORG Thu Feb 5 11:54:35 2015 Return-Path: Delivered-To: svn-src-stable@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 023EB9EA; Thu, 5 Feb 2015 11:54:35 +0000 (UTC) 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 E12F0E26; Thu, 5 Feb 2015 11:54:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t15BsYPW079568; Thu, 5 Feb 2015 11:54:34 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t15BsY6P079567; Thu, 5 Feb 2015 11:54:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201502051154.t15BsY6P079567@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 5 Feb 2015 11:54: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: r278252 - stable/10/release/doc/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-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2015 11:54:35 -0000 Author: gjb Date: Thu Feb 5 11:54:34 2015 New Revision: 278252 URL: https://svnweb.freebsd.org/changeset/base/278252 Log: MFC r278101 (hrs): Add a toc.section.depth=3 parameter to use the same ToC depth as DocBook DSSSL stylesheet. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/share/mk/doc.relnotes.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/release/doc/share/mk/doc.relnotes.mk ============================================================================== --- stable/10/release/doc/share/mk/doc.relnotes.mk Thu Feb 5 11:42:59 2015 (r278251) +++ stable/10/release/doc/share/mk/doc.relnotes.mk Thu Feb 5 11:54:34 2015 (r278252) @@ -17,6 +17,7 @@ PROFILING+= --param profile.attribute "' XSLTPROCFLAGS+= --param release.url "'${RELEASEURL}'" XSLTPROCFLAGS+= --param release.branch "'${RELEASEBRANCH}'" XSLTPROCFLAGS+= --param release.maillist "'${RELEASEMAILLIST}'" +XSLTPROCFLAGS+= --param toc.section.depth "'3'" # Find the RELNOTESng document catalogs EXTRA_CATALOGS+= file://${RELN_ROOT}/${LANGCODE}/share/xml/catalog.xml \ From owner-svn-src-stable@FreeBSD.ORG Thu Feb 5 11:54:56 2015 Return-Path: Delivered-To: svn-src-stable@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 B6002B12; Thu, 5 Feb 2015 11:54:56 +0000 (UTC) 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 A10E8E2A; Thu, 5 Feb 2015 11:54:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t15Bsu21079658; Thu, 5 Feb 2015 11:54:56 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t15BsuBj079657; Thu, 5 Feb 2015 11:54:56 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201502051154.t15BsuBj079657@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 5 Feb 2015 11:54: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: r278253 - stable/9/release/doc/share/mk 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2015 11:54:56 -0000 Author: gjb Date: Thu Feb 5 11:54:55 2015 New Revision: 278253 URL: https://svnweb.freebsd.org/changeset/base/278253 Log: MFC r278101 (hrs): Add a toc.section.depth=3 parameter to use the same ToC depth as DocBook DSSSL stylesheet. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/share/mk/doc.relnotes.mk Directory Properties: stable/9/release/doc/ (props changed) Modified: stable/9/release/doc/share/mk/doc.relnotes.mk ============================================================================== --- stable/9/release/doc/share/mk/doc.relnotes.mk Thu Feb 5 11:54:34 2015 (r278252) +++ stable/9/release/doc/share/mk/doc.relnotes.mk Thu Feb 5 11:54:55 2015 (r278253) @@ -17,6 +17,7 @@ PROFILING+= --param profile.attribute "' XSLTPROCFLAGS+= --param release.url "'${RELEASEURL}'" XSLTPROCFLAGS+= --param release.branch "'${RELEASEBRANCH}'" XSLTPROCFLAGS+= --param release.maillist "'${RELEASEMAILLIST}'" +XSLTPROCFLAGS+= --param toc.section.depth "'3'" # Find the RELNOTESng document catalogs EXTRA_CATALOGS+= file://${RELN_ROOT}/${LANGCODE}/share/xml/catalog.xml \ From owner-svn-src-stable@FreeBSD.ORG Thu Feb 5 13:07:41 2015 Return-Path: Delivered-To: svn-src-stable@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 CC0DF7F8; Thu, 5 Feb 2015 13:07:41 +0000 (UTC) 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 B5C1F8D8; Thu, 5 Feb 2015 13:07:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t15D7ftX013142; Thu, 5 Feb 2015 13:07:41 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t15D7f3C013141; Thu, 5 Feb 2015 13:07:41 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201502051307.t15D7f3C013141@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 5 Feb 2015 13:07: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: r278258 - 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-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2015 13:07:41 -0000 Author: gjb Date: Thu Feb 5 13:07:41 2015 New Revision: 278258 URL: https://svnweb.freebsd.org/changeset/base/278258 Log: MFC [1] r278115, r278116: r278115: Move the 'Upgrading from Previous Releases of FreeBSD' section to the top of the file, following the introduction. r278116: Overhaul the relnotes page to reorganize the sections. With the previous layout, the majority of the release notes were categorized under one main "What's New" section, which in addition to making the page difficult to parse relevant bits, also had a few rendering issues, such as 'Note' blocks visually not appearing as if they pertain to a particular change. This change removes the "What's New" section, integrating it with the introduction. In addition, each section now provides a brief description of its contents, broken down further into a subsection for each "topic", making it much easier to find a specific topic in the page. [1] This is a direct commit, not an MFC. 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 Thu Feb 5 13:00:27 2015 (r278257) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Feb 5 13:07:41 2015 (r278258) @@ -90,12 +90,8 @@ information on known bugs, security advisories, and corrections to documentation. An up-to-date copy of the errata for &os; &release.current; can be found on the &os; Web site. - - - - What's New - This section describes the most user-visible new or changed + This document describes the most user-visible new or changed features in &os; since &release.prev;. Typical release note items document recent security @@ -107,166 +103,320 @@ between releases; this document focuses primarily on security advisories, user-visible changes, and major architectural improvements. + + + + Upgrading from Previous Releases of &os; + + Binary upgrades between RELEASE versions + (and snapshots of the various security branches) are supported + using the &man.freebsd-update.8; utility. The binary upgrade + procedure will update unmodified userland utilities, as well as + unmodified GENERIC kernel distributed as + a part of an official &os; release. The &man.freebsd-update.8; + utility requires that the host being upgraded have Internet + connectivity. + + Source-based upgrades (those based on recompiling the &os; + base system from source code) from previous versions are + supported, according to the instructions in + /usr/src/UPDATING. + + + Upgrading &os; should only be attempted after + backing up all data and configuration + files. + + + + + Security and Errata + + This section lists the various Security Advisories and + Errata Notices since &release.prev;. Security Advisories + No advisories. + + + + Errata Notices + + No errata notices. + + + + + Userland + + This section covers changes and additions to userland + applications, contributed software, and system utilities. + + + Userland Configuration Changes + + The &man.termcap.5; file is installed + as-is from sources, instead of reordering, creating + /etc/termcap.db by default, providing + a performance improvements to applications that use the + &man.termcap.5; database, such as &man.vi.1; and + &man.ncurses.3;. + + + + Userland Application Changes + + A new utility, &man.dpv.1;, has been + added to the base system, providing a &man.dialog.1;-style + progress view from one or more input streams. A corresponding + library, &man.dpv.3;, has also been added. + + The &man.elfdump.1; utility has been + updated to support capability mode provided by + &man.capsicum.4;. + + + + Contributed Software + + OpenSSL has + been updated to version 1.0.1l. + + + + Installation and Configuration Tools + +   + + + + <filename class="directory">/etc/rc.d</filename> + Scripts + +   + + + + <filename class="directory">/etc/periodic</filename> + Scripts + +   + + + + Runtime Libraries and API + + A new file configuration library, + &man.figpar.3;, has been added to the base system. + + + + ABI Compatibility + +   + + + + + Kernel + + This section covers changes to kernel configurations, system + tuning, and system control parameters that are not otherwise + categorized. + + + Kernel Bug Fixes +   + + + + Kernel Configuration +   - - Kernel Changes + + System Tuning and Controls Throttling via ACPI and P4TCC via &man.device.hints.5; have been turned off by default. + + - - Virtualization Support + + Devices and Drivers -   - + This section covers changes and additions to devices and + device drivers since &release.prev;. - - ARM Support + + Device Drivers -   - +   + - - Boot Loader Changes + + Storage Drivers -   - +   + - - Hardware Support + + Network Drivers -   +   + + - - Multimedia Support + + Hardware Support -   - + This section covers general hardware support for physical + machines, hypervisors, and virtualization environments, as well + as hardware changes and updates that do not otherwise fit in + other sections of this document. - - Network Interface Support + + Hardware Support -   - - +   + - - Network Protocols + + Virtualization Support -   - +   + - - Disks and Storage + + ARM Support - The - &man.ctld.8; utility has been updated to include support for - registering iSCSI targets and portals on - iSNS servers. This provides a mechanism - which allows iSCSI initiators to find - targets and portals without requiring active - discovery. +   + + - The - &man.ctl.4; subsystem has been updated, increasing the ports - limit from 128 to 256, - and LUN limit from 256 - to 1024. - + + Storage - - File Systems + This section covers changes and additions to file systems + and other storage subsystems, both local and networked. - A new tunable, - vfs.zfs.spa_slop_shift, has been added, - which controls how much space is reserved by default. - + + Networked Storage + + The + &man.ctld.8; utility has been updated to include support for + registering iSCSI targets and portals on + iSNS servers. This provides a mechanism + which allows iSCSI initiators to find + targets and portals without requiring active + discovery. - - Userland Changes + + ZFS - A new file configuration library, - &man.figpar.3;, has been added to the base system. + A new tunable, + vfs.zfs.spa_slop_shift, has been added, + which controls how much space is reserved by default. + - A new utility, &man.dpv.1;, has been - added to the base system, providing a &man.dialog.1;-style - progress view from one or more input streams. A corresponding - library, &man.dpv.3;, has also been added. + + &man.geom.4; - The &man.elfdump.1; utility has been - updated to support capability mode provided by - &man.capsicum.4;. + The + &man.ctl.4; subsystem has been updated, increasing the ports + limit from 128 to 256, + and LUN limit from 256 + to 1024. + + - The &man.termcap.5; file is installed - as-is from sources, instead of reordering, creating - /etc/termcap.db by default, providing - a performance improvements to applications that use the - &man.termcap.5; database, such as &man.vi.1; and - &man.ncurses.3;. + + Boot Loader Changes - - <filename>/etc/rc.d</filename> Scripts + This section covers the boot loader, boot menu, and other + boot-related changes. -   - + + Boot Loader Changes + +   - - Contributed Software + + Boot Menu Changes - OpenSSL has - been updated to version 1.0.1l. +   + + + + Networking - - Ports/Packages Collection Infrastructure + This section describes changes that affect networking in + &os;. + + + Network Procols   + + + + Ports Collection and Package Infrastructure - - Release Engineering and Integration + This section covers changes to the &os; Ports + Collection, package infrastructure, and package maintenance and + installation tools. + + + Infrastructure Changes   - - Documentation + + Packaging Changes   - - Upgrading from Previous Releases of &os; + + Documentation - Binary upgrades between RELEASE versions - (and snapshots of the various security branches) are supported - using the &man.freebsd-update.8; utility. The binary upgrade - procedure will update unmodified userland utilities, as well as - unmodified GENERIC kernel distributed as - a part of an official &os; release. The &man.freebsd-update.8; - utility requires that the host being upgraded have Internet - connectivity. + This section covers changes to the &os; Documentation + Project sources and toolchain. - Source-based upgrades (those based on recompiling the &os; - base system from source code) from previous versions are - supported, according to the instructions in - /usr/src/UPDATING. + + Documentation Source Changes - - Upgrading &os; should only be attempted after - backing up all data and configuration - files. - +   + + + + Documentation Toolchain Changes + +   + + + + + Release Engineering and Integration + + This section convers changes that are specific to the + &os; Release Engineering processes. + + + Integration Changes + +   + From owner-svn-src-stable@FreeBSD.ORG Thu Feb 5 13:53:32 2015 Return-Path: Delivered-To: svn-src-stable@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 B1FA212E; Thu, 5 Feb 2015 13:53:32 +0000 (UTC) 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 9C837E12; Thu, 5 Feb 2015 13:53:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t15DrW8Q036027; Thu, 5 Feb 2015 13:53:32 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t15DrWHI036026; Thu, 5 Feb 2015 13:53:32 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201502051353.t15DrWHI036026@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 5 Feb 2015 13:53: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: r278260 - 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-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2015 13:53:32 -0000 Author: gjb Date: Thu Feb 5 13:53:31 2015 New Revision: 278260 URL: https://svnweb.freebsd.org/changeset/base/278260 Log: Fill in the Security Advisories and Errata Notices sections. 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 Thu Feb 5 13:49:04 2015 (r278259) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Feb 5 13:53:31 2015 (r278260) @@ -138,13 +138,106 @@ Security Advisories - No advisories. + + + + + + + + Advisory + Date + Topic + + + + + + FreeBSD-SA-14:27.stdio + 10 December 2014 + Buffer overflow in stdio + + + + FreeBSD-SA-14:28.file + 10 December 2014 + Multiple vulnerabilities in &man.file.1; + and &man.libmagic.3; + + + + FreeBSD-SA-14:30.unbound + 17 December 2014 + Remote denial of service + vulnerability + + + + FreeBSD-SA-14:31.ntp + 23 December 2014 + Multiple vulnerabilities in NTP + suite + + + + FreeBSD-SA-15:01.openssl + 14 January 2015 + Multiple vulnerabilities in + OpenSSL + + + + FreeBSD-SA-15:02.kmem + 27 January 2015 + SCTP kernel memory corruption and + disclosure vulnerability + + + + FreeBSD-SA-15:03.sctp + 27 January 2015 + SCTP stream reset + vulnerability + + + + Errata Notices - No errata notices. + + + + + + + + Errata + Date + Topic + + + + + + FreeBSD-EN-14:13.freebsd-update + 23 December 2014 + Fixed directory deletion issue in + &man.freebsd-update.8; + + + + From owner-svn-src-stable@FreeBSD.ORG Thu Feb 5 14:12:06 2015 Return-Path: Delivered-To: svn-src-stable@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 6CC23D2D; Thu, 5 Feb 2015 14:12:06 +0000 (UTC) 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 4D0E9160; Thu, 5 Feb 2015 14:12:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t15EC6bj045389; Thu, 5 Feb 2015 14:12:06 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t15EC5TG045387; Thu, 5 Feb 2015 14:12:05 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201502051412.t15EC5TG045387@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 5 Feb 2015 14:12: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: r278263 - 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-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2015 14:12:06 -0000 Author: gjb Date: Thu Feb 5 14:12:05 2015 New Revision: 278263 URL: https://svnweb.freebsd.org/changeset/base/278263 Log: Add an entity to use to link to SAs and ENs. Update the Security Advisories and Errata Notices section to use the new entity. Prefer https:// for other URLs. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml stable/10/release/doc/share/xml/release.ent Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Feb 5 14:08:57 2015 (r278262) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Feb 5 14:12:05 2015 (r278263) @@ -154,14 +154,14 @@ FreeBSD-SA-14:27.stdio + xlink:href="&security.url;/FreeBSD-SA-14:27.stdio.asc">FreeBSD-SA-14:27.stdio 10 December 2014 Buffer overflow in stdio FreeBSD-SA-14:28.file + xlink:href="&security.url;/FreeBSD-SA-14:28.file.asc">FreeBSD-SA-14:28.file 10 December 2014 Multiple vulnerabilities in &man.file.1; and &man.libmagic.3; @@ -169,7 +169,7 @@ FreeBSD-SA-14:30.unbound + xlink:href="&security.url;/FreeBSD-SA-14:30.unbound.asc">FreeBSD-SA-14:30.unbound 17 December 2014 Remote denial of service vulnerability @@ -177,7 +177,7 @@ FreeBSD-SA-14:31.ntp + xlink:href="&security.url;/FreeBSD-SA-14:31.ntp.asc">FreeBSD-SA-14:31.ntp 23 December 2014 Multiple vulnerabilities in NTP suite @@ -185,7 +185,7 @@ FreeBSD-SA-15:01.openssl + xlink:href="&security.url;/FreeBSD-SA-15:01.openssl.asc">FreeBSD-SA-15:01.openssl 14 January 2015 Multiple vulnerabilities in OpenSSL @@ -193,7 +193,7 @@ FreeBSD-SA-15:02.kmem + xlink:href="&security.url;/FreeBSD-SA-15:02.kmem.asc">FreeBSD-SA-15:02.kmem 27 January 2015 SCTP kernel memory corruption and disclosure vulnerability @@ -201,7 +201,7 @@ FreeBSD-SA-15:03.sctp + xlink:href="&security.url;/FreeBSD-SA-15:03.sctp.asc">FreeBSD-SA-15:03.sctp 27 January 2015 SCTP stream reset vulnerability @@ -230,7 +230,7 @@ FreeBSD-EN-14:13.freebsd-update + xlink:href="&security.url;/FreeBSD-EN-14:13.freebsd-update.asc">FreeBSD-EN-14:13.freebsd-update 23 December 2014 Fixed directory deletion issue in &man.freebsd-update.8; Modified: stable/10/release/doc/share/xml/release.ent ============================================================================== --- stable/10/release/doc/share/xml/release.ent Thu Feb 5 14:08:57 2015 (r278262) +++ stable/10/release/doc/share/xml/release.ent Thu Feb 5 14:12:05 2015 (r278263) @@ -25,7 +25,10 @@ - + + + + @@ -51,7 +54,7 @@ - + From owner-svn-src-stable@FreeBSD.ORG Thu Feb 5 16:28:20 2015 Return-Path: Delivered-To: svn-src-stable@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 A817A841; Thu, 5 Feb 2015 16:28:20 +0000 (UTC) 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 8AA2036D; Thu, 5 Feb 2015 16:28:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t15GSKV0009816; Thu, 5 Feb 2015 16:28:20 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t15GSJUi009808; Thu, 5 Feb 2015 16:28:19 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201502051628.t15GSJUi009808@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 5 Feb 2015 16:28: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: r278267 - in stable/10/release/doc: en_US.ISO8859-1/errata 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-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2015 16:28:20 -0000 Author: gjb Date: Thu Feb 5 16:28:18 2015 New Revision: 278267 URL: https://svnweb.freebsd.org/changeset/base/278267 Log: Apply r278265 from head: Security Advisory information is included on several pages in the release notes. Rather than duplicating the information between various files, add two new files to include in all pages that currently display the information. Sponsored by: The FreeBSD Foundation Added: stable/10/release/doc/share/xml/errata.xml - copied, changed from r278265, head/release/doc/share/xml/errata.xml stable/10/release/doc/share/xml/security.xml - copied, changed from r278265, head/release/doc/share/xml/security.xml Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Thu Feb 5 16:00:34 2015 (r278266) +++ stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Thu Feb 5 16:28:18 2015 (r278267) @@ -4,6 +4,8 @@ %release; + + ]>
Security Advisories - - - - - - - - Advisory - Date - Topic - - - - - - SA-14:27.stdio - 10 December 2014 - Buffer overflow in stdio - - - - SA-14:28.file - 10 December 2014 - Multiple vulnerabilities in &man.file.1; and - &man.libmagic.3; - - - - SA-14:30.unbound - 17 December 2014 - Remote denial of service - vulnerability - - - - SA-14:31.ntp - 23 December 2014 - Multiple vulnerabilities - - - - + &security; + + + + Errata Notices + + &errata; Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Feb 5 16:00:34 2015 (r278266) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Feb 5 16:28:18 2015 (r278267) @@ -7,6 +7,8 @@ %sponsor; %vendor; + + ]>
@@ -138,106 +140,13 @@ Security Advisories - - - - - - - - Advisory - Date - Topic - - - - - - FreeBSD-SA-14:27.stdio - 10 December 2014 - Buffer overflow in stdio - - - - FreeBSD-SA-14:28.file - 10 December 2014 - Multiple vulnerabilities in &man.file.1; - and &man.libmagic.3; - - - - FreeBSD-SA-14:30.unbound - 17 December 2014 - Remote denial of service - vulnerability - - - - FreeBSD-SA-14:31.ntp - 23 December 2014 - Multiple vulnerabilities in NTP - suite - - - - FreeBSD-SA-15:01.openssl - 14 January 2015 - Multiple vulnerabilities in - OpenSSL - - - - FreeBSD-SA-15:02.kmem - 27 January 2015 - SCTP kernel memory corruption and - disclosure vulnerability - - - - FreeBSD-SA-15:03.sctp - 27 January 2015 - SCTP stream reset - vulnerability - - - - + &security; Errata Notices - - - - - - - - Errata - Date - Topic - - - - - - FreeBSD-EN-14:13.freebsd-update - 23 December 2014 - Fixed directory deletion issue in - &man.freebsd-update.8; - - - - + &errata; Copied and modified: stable/10/release/doc/share/xml/errata.xml (from r278265, head/release/doc/share/xml/errata.xml) ============================================================================== --- head/release/doc/share/xml/errata.xml Thu Feb 5 15:46:01 2015 (r278265, copy source) +++ stable/10/release/doc/share/xml/errata.xml Thu Feb 5 16:28:18 2015 (r278267) @@ -19,9 +19,11 @@ - No errata notices. -   -   + FreeBSD-EN-14:13.freebsd-update + 23 December 2014 + Fixed directory deletion issue in + &man.freebsd-update.8; Copied and modified: stable/10/release/doc/share/xml/security.xml (from r278265, head/release/doc/share/xml/security.xml) ============================================================================== --- head/release/doc/share/xml/security.xml Thu Feb 5 15:46:01 2015 (r278265, copy source) +++ stable/10/release/doc/share/xml/security.xml Thu Feb 5 16:28:18 2015 (r278267) @@ -19,9 +19,58 @@ - No advisories. -   -   + FreeBSD-SA-14:27.stdio + 10 December 2014 + Buffer overflow in stdio + + + + FreeBSD-SA-14:28.file + 10 December 2014 + Multiple vulnerabilities in &man.file.1; + and &man.libmagic.3; + + + + FreeBSD-SA-14:30.unbound + 17 December 2014 + Remote denial of service + vulnerability + + + + FreeBSD-SA-14:31.ntp + 23 December 2014 + Multiple vulnerabilities in NTP + suite + + + + FreeBSD-SA-15:01.openssl + 14 January 2015 + Multiple vulnerabilities in + OpenSSL + + + + FreeBSD-SA-15:02.kmem + 27 January 2015 + SCTP kernel memory corruption and + disclosure vulnerability + + + + FreeBSD-SA-15:03.sctp + 27 January 2015 + SCTP stream reset + vulnerability From owner-svn-src-stable@FreeBSD.ORG Thu Feb 5 16:31:50 2015 Return-Path: Delivered-To: svn-src-stable@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 C457BC47; Thu, 5 Feb 2015 16:31:50 +0000 (UTC) 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 AFE0D64E; Thu, 5 Feb 2015 16:31:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t15GVo4a011975; Thu, 5 Feb 2015 16:31:50 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t15GVoWT011974; Thu, 5 Feb 2015 16:31:50 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201502051631.t15GVoWT011974@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 5 Feb 2015 16:31: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: r278269 - stable/10/release/doc/en_US.ISO8859-1/errata X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2015 16:31:50 -0000 Author: gjb Date: Thu Feb 5 16:31:49 2015 New Revision: 278269 URL: https://svnweb.freebsd.org/changeset/base/278269 Log: Reapply 'Open Issues' to the 10.1-RELEASE errata page, which was only added to releng/10.1, not stable/10. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Thu Feb 5 16:29:26 2015 (r278268) +++ stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Thu Feb 5 16:31:49 2015 (r278269) @@ -119,6 +119,99 @@ boot instability may be present on virtual machines running on other hypervisors, such as Xen or KVM. + + + &os;/&arch.i386; 10.1-RELEASE configured with + a multi-disk ZFS dataset (mirror, raidz1, raidz2, raidz3) + may crash during boot when the ZFS pool mount is attempted + while booting an unmodified GENERIC + kernel. + + As described in /usr/src/UPDATING + entry 20121223, rebuilding the kernel + with options KSTACK_PAGES=4 has been + observed to resolve the boot-time crash. This, however, is + not an ideal solution for inclusion in the + GENERIC kernel configuration, as + increasing KSTACK_PAGES implicitly + decreases available usermode threads in an environment that + is already resource-starved. + + Taking into account the heavy resource requirements of + ZFS, in addition to the &arch.i386;-specific tuning + requirements for general workloads, using ZFS with the + &os;/&arch.i386; GENERIC kernel + is strongly discouraged. + + + It is extremely important to take note that, by + default, &man.freebsd-update.8; will install the + GENERIC kernel configuration, and + as such, &man.freebsd-update.8; consumers are strongly + encouraged to avoid &os;-provided kernel binary upgrades + with such configurations. + + + + Although there is slight change in how the crash + manifests on &os;/&arch.i386; between 10.0-RELEASE and + 10.1-RELEASE, and given the date of the + /usr/src/UPDATING entry, there is no + evidence suggesting this is a regression between + &os; 10.0-RELEASE and &os; 10.1-RELEASE + directly. + + + + + Due to an incompatibility between &man.bsdconfig.8; + and &man.pkg.8; version 1.3, packages included on the + &os; dvd installer will not be recognized by + &man.bsdconfig.8;. + + To install packages from the dvd1.iso + installer, create the /dist target directory, and + manually mount the dvd1.iso + ISO: + + &prompt.root; mkdir -p /dist +&prompt.root; mount -t cd9660 /dev/cd0 /dist + + + Be sure to use the correct /dev device path for the + dvd1.iso ISO + installer. + + + Next, set REPOS_DIR to the path of the + repos/ directory + within the installer so &man.pkg.8; will use the correct + repository metadata. + + If using &man.sh.1;: + + &prompt.root; export REPOS_DIR=/dist/packages/repos + + If using &man.csh.1;: + + &prompt.root; setenv REPOS_DIR /dist/packages/repos + + + Keep in mind that REPOS_DIR will need + to be set again after the current shell session is + terminated, if continuing to use the packages provided on + the dvd1.iso installer. + + + Finally, bootstrap &man.pkg.8; from the + ISO, and install required + packages: + + &prompt.root; pkg bootstrap +&prompt.root; pkg install xorg-server xorg gnome2 [...] + From owner-svn-src-stable@FreeBSD.ORG Thu Feb 5 17:46:15 2015 Return-Path: Delivered-To: svn-src-stable@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 B6AEA852; Thu, 5 Feb 2015 17:46:15 +0000 (UTC) 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 97C5AEB3; Thu, 5 Feb 2015 17:46:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t15HkFCi049296; Thu, 5 Feb 2015 17:46:15 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t15HkEeI049292; Thu, 5 Feb 2015 17:46:14 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201502051746.t15HkEeI049292@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 5 Feb 2015 17:46:14 +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: r278271 - in stable/9/release/doc: en_US.ISO8859-1/errata en_US.ISO8859-1/relnotes share/xml 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2015 17:46:15 -0000 Author: gjb Date: Thu Feb 5 17:46:13 2015 New Revision: 278271 URL: https://svnweb.freebsd.org/changeset/base/278271 Log: Apply r278265 from head: Security Advisory information is included on several pages in the release notes. Rather than duplicating the information between various files, add two new files to include in all pages that currently display the information. Bump copyright year. Move SAs and ENs into their respective files. Add missing ENs. Sponsored by: The FreeBSD Foundation Added: stable/9/release/doc/share/xml/errata.xml - copied, changed from r278269, head/release/doc/share/xml/errata.xml stable/9/release/doc/share/xml/security.xml - copied, changed from r278269, head/release/doc/share/xml/security.xml Modified: stable/9/release/doc/en_US.ISO8859-1/errata/article.xml stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Thu Feb 5 17:21:42 2015 (r278270) +++ stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Thu Feb 5 17:46:13 2015 (r278271) @@ -3,6 +3,8 @@ "../../../share/xml/freebsd50.dtd" [ %release; + + ]> - + + + + @@ -47,7 +50,7 @@ - + Modified: stable/9/release/doc/share/xml/security.xml ============================================================================== --- stable/9/release/doc/share/xml/security.xml Thu Feb 5 19:17:37 2015 (r278274) +++ stable/9/release/doc/share/xml/security.xml Thu Feb 5 19:31:41 2015 (r278275) @@ -19,86 +19,86 @@ - FreeBSD-SA-14:18.openssl + FreeBSD-SA-14:18.openssl 9 September 2014 Multiple vulnerabilities - FreeBSD-SA-14:19.tcp + FreeBSD-SA-14:19.tcp 16 September 2014 Denial of Service in TCP packet processing. - FreeBSD-SA-14:20.rtsold + FreeBSD-SA-14:20.rtsold 21 October 2014 Remote buffer overflow vulnerability. - FreeBSD-SA-14:21.routed + FreeBSD-SA-14:21.routed 21 October 2014 Remote denial of service vulnerability. - FreeBSD-SA-14:22.namei + FreeBSD-SA-14:22.namei 21 October 2014 Memory leak in sandboxed namei lookup. - FreeBSD-SA-14:23.openssl + FreeBSD-SA-14:23.openssl 21 October 2014 Multiple vulerabilities. - FreeBSD-SA-14:25.setlogin + FreeBSD-SA-14:25.setlogin 04 November 2014 Kernel stack disclosure. - FreeBSD-SA-14:26.ftp + FreeBSD-SA-14:26.ftp 04 November 2014 Remote code execution. - FreeBSD-SA-14:28.file + FreeBSD-SA-14:28.file 10 December 2014 Multiple vulnerabilities in &man.file.1; and &man.libmagic.3; - FreeBSD-SA-14:29.bind + FreeBSD-SA-14:29.bind 10 December 2014 Remote denial of service vulnerability - FreeBSD-SA-14:31.ntp + FreeBSD-SA-14:31.ntp 23 December 2014 Multiple vulnerabilities - FreeBSD-SA-15:01.openssl + FreeBSD-SA-15:01.openssl 14 January 2015 Multiple vulnerabilities FreeBSD-SA-15:02.kmem + xlink:href="&security.url;/FreeBSD-SA-15:02.kmem.asc">FreeBSD-SA-15:02.kmem 27 January 2015 SCTP kernel memory corruption and disclosure vulnerability @@ -106,7 +106,7 @@ FreeBSD-SA-15:03.sctp + xlink:href="&security.url;/FreeBSD-SA-15:03.sctp.asc">FreeBSD-SA-15:03.sctp 27 January 2015 SCTP stream reset vulnerability From owner-svn-src-stable@FreeBSD.ORG Thu Feb 5 19:31:43 2015 Return-Path: Delivered-To: svn-src-stable@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 883961CE; Thu, 5 Feb 2015 19:31:43 +0000 (UTC) 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 6FAB3DBF; Thu, 5 Feb 2015 19:31:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t15JVhlg003127; Thu, 5 Feb 2015 19:31:43 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t15JVgWl003124; Thu, 5 Feb 2015 19:31:42 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201502051931.t15JVgWl003124@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 5 Feb 2015 19:31:42 +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: r278275 - in stable: 8/release/doc/share/xml 9/release/doc/share/xml X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2015 19:31:43 -0000 Author: gjb Date: Thu Feb 5 19:31:41 2015 New Revision: 278275 URL: https://svnweb.freebsd.org/changeset/base/278275 Log: Add the 'security.url' macro to stable/9 and stable/8 branches, and replace hard-coded (and inconsistent) URLs in security.xml and errata.xml. Prefer https:// over http://. Sponsored by: The FreeBSD Foundation Modified: stable/8/release/doc/share/xml/errata.xml stable/8/release/doc/share/xml/release.ent stable/8/release/doc/share/xml/security.xml Changes in other areas also in this revision: Modified: stable/9/release/doc/share/xml/errata.xml stable/9/release/doc/share/xml/release.ent stable/9/release/doc/share/xml/security.xml Modified: stable/8/release/doc/share/xml/errata.xml ============================================================================== --- stable/8/release/doc/share/xml/errata.xml Thu Feb 5 19:17:37 2015 (r278274) +++ stable/8/release/doc/share/xml/errata.xml Thu Feb 5 19:31:41 2015 (r278275) @@ -19,14 +19,14 @@ - FreeBSD-EN-13:01.fxp + FreeBSD-EN-13:01.fxp 28 June 2013 Fixed a problem where &man.dhclient.8; would infinitely try to intialize &man.fxp.4; - FreeBSD-EN-13:02.vtnet + FreeBSD-EN-13:02.vtnet 28 June 2013 Fixed a problem frames sent to additional MAC addresses are not forwarded to the &man.vtnet.4; @@ -34,80 +34,80 @@ - FreeBSD-EN-13:04.freebsd-update + FreeBSD-EN-13:04.freebsd-update 26 October 2013 Multiple fixes - FreeBSD-EN-13:05.freebsd-update + FreeBSD-EN-13:05.freebsd-update 28 November 2013 Fix INDEX generation - FreeBSD-EN-14:01.random + FreeBSD-EN-14:01.random 14 January 2014 Disable hardware RNGs by default - FreeBSD-EN-14:02.mmap + FreeBSD-EN-14:02.mmap 14 January 2014 Fix incorrect coalescing of stack entry - FreeBSD-EN-14:03.pkg + FreeBSD-EN-14:03.pkg 15 May 2014 Add pkg bootstrapping, configuration and public keys - FreeBSD-EN-14:04.kldxref + FreeBSD-EN-14:04.kldxref 15 May 2014 Improve build repeatability for &man.kldxref.8; - FreeBSD-EN-14:06.exec + FreeBSD-EN-14:06.exec 3 June 2014 Fix triple-fault when executing from a threaded process - FreeBSD-EN-14:08.heimdal + FreeBSD-EN-14:08.heimdal 24 June 2014 Fix gss_pseudo_random() interoperability issue - FreeBSD-EN-14:09.jail + FreeBSD-EN-14:09.jail 8 July 2014 Fix jail fails to start if WITHOUT_INET/WITHOUT_INET6 is use - FreeBSD-EN-14:10.tzdata + FreeBSD-EN-14:10.tzdata 21 October 2014 Time zone data file update - FreeBSD-EN-14:12.zfs + FreeBSD-EN-14:12.zfs 4 November 2014 Fix NFSv4 and ZFS cache consistency issue - FreeBSD-EN-14:13.freebsd-update + FreeBSD-EN-14:13.freebsd-update 23 December 2014 Fix directory deletion issue Modified: stable/8/release/doc/share/xml/release.ent ============================================================================== --- stable/8/release/doc/share/xml/release.ent Thu Feb 5 19:17:37 2015 (r278274) +++ stable/8/release/doc/share/xml/release.ent Thu Feb 5 19:31:41 2015 (r278275) @@ -22,6 +22,9 @@ + + + - + Modified: stable/8/release/doc/share/xml/security.xml ============================================================================== --- stable/8/release/doc/share/xml/security.xml Thu Feb 5 19:17:37 2015 (r278274) +++ stable/8/release/doc/share/xml/security.xml Thu Feb 5 19:31:41 2015 (r278275) @@ -19,14 +19,14 @@ - FreeBSD-SA-13:07.bind + FreeBSD-SA-13:07.bind 26 July 2013 Denial of Service vulnerability in &man.named.8; - FreeBSD-SA-13:09.ip_multicast + FreeBSD-SA-13:09.ip_multicast 21 August 2013 Integer overflow in computing the size of a temporary buffer can result in a buffer which is too @@ -34,14 +34,14 @@ - FreeBSD-SA-13:10.sctp + FreeBSD-SA-13:10.sctp 21 August 2013 Fix a bug that could lead to kernel memory disclosure with SCTP state cookie - FreeBSD-SA-13:12.ifioctl + FreeBSD-SA-13:12.ifioctl 10 September 2013 In IPv6 and NetATM, stop SIOCSIFADDR, @@ -53,7 +53,7 @@ - FreeBSD-SA-13:13.nullfs + FreeBSD-SA-13:13.nullfs 10 September 2013 Prevent cross-mount hardlinks between different nullfs mounts of the same underlying @@ -61,157 +61,157 @@ - FreeBSD-SA-14:01.bsnmpd + FreeBSD-SA-14:01.bsnmpd 14 January 2014 bsnmpd remote denial of service vulnerability - FreeBSD-SA-14:02.ntpd + FreeBSD-SA-14:02.ntpd 14 January 2014 ntpd distributed reflection Denial of Service vulnerability - FreeBSD-SA-14:04.bind + FreeBSD-SA-14:04.bind 14 January 2014 BIND remote denial of service vulnerability - FreeBSD-SA-14:05.nfsserver + FreeBSD-SA-14:05.nfsserver 8 April 2014 NFS deadlock vulnerability - FreeBSD-SA-14:06.openssl + FreeBSD-SA-14:06.openssl 8 April 2014 ECDSA Cache Side-channel Attack in OpenSSL - FreeBSD-SA-14:08.tcp + FreeBSD-SA-14:08.tcp 30 April 2014 TCP reassembly vulnerability - FreeBSD-SA-14:11.sendmail + FreeBSD-SA-14:11.sendmail 5 June 2014 sendmail improper close-on-exec flag handling - FreeBSD-SA-14:12.ktrace + FreeBSD-SA-14:12.ktrace 5 June 2014 ktrace memory disclosure - FreeBSD-SA-14:14.openssl + FreeBSD-SA-14:14.openssl 5 June 2014 OpenSSL multiple vulnerabilities - FreeBSD-SA-14:16.file + FreeBSD-SA-14:16.file 5 June 2014 Multiple vulnerabilities in &man.file.1; and &man.libmagic.3; - FreeBSD-SA-14:17.kmem + FreeBSD-SA-14:17.kmem 8 July 2014 kernel memory disclosure in control message and SCTP notifications - FreeBSD-SA-14:18.openssl + FreeBSD-SA-14:18.openssl 9 September 2014 Multiple vulnerabilities in OpenSSL - FreeBSD-SA-14:19.tcp + FreeBSD-SA-14:19.tcp 16 September 2014 Denial of Service in TCP packet processing - FreeBSD-SA-14:21.routed + FreeBSD-SA-14:21.routed 21 October 2014 &man.routed.8; denial of service vulnerability - FreeBSD-SA-14:23.openssl + FreeBSD-SA-14:23.openssl 21 October 2014 Multiple vulnerabilities in OpenSSL - FreeBSD-SA-14:25.setlogin + FreeBSD-SA-14:25.setlogin 4 November 2014 kernel stack disclosure in &man.setlogin.2; and &man.getlogin.2; - FreeBSD-SA-14:26.ftp + FreeBSD-SA-14:26.ftp 4 November 2014 Remote command execution in &man.ftp.1; - FreeBSD-SA-14:28.file + FreeBSD-SA-14:28.file 10 December 2014 Multiple vulnerabilities in &man.file.1; and &man.libmagic.3; - FreeBSD-SA-14:29.bind + FreeBSD-SA-14:29.bind 10 December 2014 BIND remote denial of service vulnerability - FreeBSD-SA-14:31.ntp + FreeBSD-SA-14:31.ntp 23 December 2014 Multiple vulnerabilities in NTP suite - FreeBSD-SA-15:01.ntp + FreeBSD-SA-15:01.ntp 14 January 2015 Multiple vulnerabilities in OpenSSL - FreeBSD-SA-15:02.kmem + FreeBSD-SA-15:02.kmem 27 January 2015 Fix SCTP SCTP_SS_VALUE kernel memory corruption and disclosure vulnerability - FreeBSD-SA-15:03.sctp + FreeBSD-SA-15:03.sctp 27 January 2015 Fix SCTP stream reset vulnerability From owner-svn-src-stable@FreeBSD.ORG Thu Feb 5 20:03:14 2015 Return-Path: Delivered-To: svn-src-stable@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 3BCB2429; Thu, 5 Feb 2015 20:03:14 +0000 (UTC) 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 2322A213; Thu, 5 Feb 2015 20:03:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t15K3EuW018183; Thu, 5 Feb 2015 20:03:14 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t15K33Nj018125; Thu, 5 Feb 2015 20:03:03 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502052003.t15K33Nj018125@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 5 Feb 2015 20:03:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278278 - in stable/10/sys: arm/allwinner arm/cavium/cns11xx arm/freescale/vybrid arm/lpc arm/samsung/exynos arm/ti/am335x arm/ti/usb arm/xilinx dev/usb dev/usb/controller mips/atheros ... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2015 20:03:14 -0000 Author: hselasky Date: Thu Feb 5 20:03:02 2015 New Revision: 278278 URL: https://svnweb.freebsd.org/changeset/base/278278 Log: MFC r266969 and r276717: Add 64-bit DMA support in the XHCI controller driver. - Fix some comments and whitespaces while at it. - Add support for PAE. Modified: stable/10/sys/arm/allwinner/a10_ehci.c stable/10/sys/arm/cavium/cns11xx/ehci_ebus.c stable/10/sys/arm/cavium/cns11xx/ohci_ec.c stable/10/sys/arm/freescale/vybrid/vf_ehci.c stable/10/sys/arm/lpc/lpc_ohci.c stable/10/sys/arm/samsung/exynos/exynos5_ehci.c stable/10/sys/arm/ti/am335x/am335x_usbss.c stable/10/sys/arm/ti/usb/omap_ehci.c stable/10/sys/arm/xilinx/zy7_ehci.c stable/10/sys/dev/usb/controller/at91dci_atmelarm.c stable/10/sys/dev/usb/controller/at91dci_fdt.c stable/10/sys/dev/usb/controller/atmegadci_atmelarm.c stable/10/sys/dev/usb/controller/dwc_otg_atmelarm.c stable/10/sys/dev/usb/controller/dwc_otg_fdt.c stable/10/sys/dev/usb/controller/ehci_fsl.c stable/10/sys/dev/usb/controller/ehci_imx.c stable/10/sys/dev/usb/controller/ehci_ixp4xx.c stable/10/sys/dev/usb/controller/ehci_mv.c stable/10/sys/dev/usb/controller/ehci_pci.c stable/10/sys/dev/usb/controller/musb_otg_atmelarm.c stable/10/sys/dev/usb/controller/ohci_atmelarm.c stable/10/sys/dev/usb/controller/ohci_fdt.c stable/10/sys/dev/usb/controller/ohci_pci.c stable/10/sys/dev/usb/controller/ohci_s3c24x0.c stable/10/sys/dev/usb/controller/uhci_pci.c stable/10/sys/dev/usb/controller/usb_controller.c stable/10/sys/dev/usb/controller/uss820dci_atmelarm.c stable/10/sys/dev/usb/controller/xhci.c stable/10/sys/dev/usb/controller/xhci_pci.c stable/10/sys/dev/usb/usb_bus.h stable/10/sys/dev/usb/usb_busdma.h stable/10/sys/dev/usb/usb_transfer.c stable/10/sys/mips/atheros/ar71xx_ehci.c stable/10/sys/mips/atheros/ar71xx_ohci.c stable/10/sys/mips/cavium/usb/octusb_octeon.c stable/10/sys/mips/rmi/xls_ehci.c stable/10/sys/mips/rt305x/rt305x_dotg.c stable/10/sys/powerpc/ps3/ehci_ps3.c stable/10/sys/powerpc/ps3/ohci_ps3.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/allwinner/a10_ehci.c ============================================================================== --- stable/10/sys/arm/allwinner/a10_ehci.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/arm/allwinner/a10_ehci.c Thu Feb 5 20:03:02 2015 (r278278) @@ -119,6 +119,7 @@ a10_ehci_attach(device_t self) sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, Modified: stable/10/sys/arm/cavium/cns11xx/ehci_ebus.c ============================================================================== --- stable/10/sys/arm/cavium/cns11xx/ehci_ebus.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/arm/cavium/cns11xx/ehci_ebus.c Thu Feb 5 20:03:02 2015 (r278278) @@ -102,6 +102,7 @@ ehci_ebus_attach(device_t self) sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, Modified: stable/10/sys/arm/cavium/cns11xx/ohci_ec.c ============================================================================== --- stable/10/sys/arm/cavium/cns11xx/ohci_ec.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/arm/cavium/cns11xx/ohci_ec.c Thu Feb 5 20:03:02 2015 (r278278) @@ -91,6 +91,7 @@ ohci_ec_attach(device_t dev) sc->sc_ohci.sc_bus.parent = dev; sc->sc_ohci.sc_bus.devices = sc->sc_ohci.sc_devices; sc->sc_ohci.sc_bus.devices_max = OHCI_MAX_DEVICES; + sc->sc_ohci.sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_ohci.sc_bus, Modified: stable/10/sys/arm/freescale/vybrid/vf_ehci.c ============================================================================== --- stable/10/sys/arm/freescale/vybrid/vf_ehci.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/arm/freescale/vybrid/vf_ehci.c Thu Feb 5 20:03:02 2015 (r278278) @@ -259,6 +259,7 @@ vybrid_ehci_attach(device_t dev) sc->sc_bus.parent = dev; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; if (bus_alloc_resources(dev, vybrid_ehci_spec, esc->res)) { device_printf(dev, "could not allocate resources\n"); Modified: stable/10/sys/arm/lpc/lpc_ohci.c ============================================================================== --- stable/10/sys/arm/lpc/lpc_ohci.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/arm/lpc/lpc_ohci.c Thu Feb 5 20:03:02 2015 (r278278) @@ -122,6 +122,7 @@ lpc_ohci_attach(device_t dev) sc->sc_bus.parent = dev; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = OHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; if (usb_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(dev), &ohci_iterate_hw_softc)) Modified: stable/10/sys/arm/samsung/exynos/exynos5_ehci.c ============================================================================== --- stable/10/sys/arm/samsung/exynos/exynos5_ehci.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/arm/samsung/exynos/exynos5_ehci.c Thu Feb 5 20:03:02 2015 (r278278) @@ -231,6 +231,7 @@ exynos_ehci_attach(device_t dev) sc->sc_bus.parent = dev; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; if (bus_alloc_resources(dev, exynos_ehci_spec, esc->res)) { device_printf(dev, "could not allocate resources\n"); Modified: stable/10/sys/arm/ti/am335x/am335x_usbss.c ============================================================================== --- stable/10/sys/arm/ti/am335x/am335x_usbss.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/arm/ti/am335x/am335x_usbss.c Thu Feb 5 20:03:02 2015 (r278278) @@ -335,6 +335,7 @@ musbotg_attach(device_t dev) sc->sc_otg[i].sc_bus.parent = dev; sc->sc_otg[i].sc_bus.devices = sc->sc_otg[i].sc_devices; sc->sc_otg[i].sc_bus.devices_max = MUSB2_MAX_DEVICES; + sc->sc_otg[i].sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_otg[i].sc_bus, Modified: stable/10/sys/arm/ti/usb/omap_ehci.c ============================================================================== --- stable/10/sys/arm/ti/usb/omap_ehci.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/arm/ti/usb/omap_ehci.c Thu Feb 5 20:03:02 2015 (r278278) @@ -780,7 +780,8 @@ omap_ehci_attach(device_t dev) sc->sc_bus.parent = dev; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; - + sc->sc_bus.dma_bits = 32; + /* save the device */ isc->sc_dev = dev; Modified: stable/10/sys/arm/xilinx/zy7_ehci.c ============================================================================== --- stable/10/sys/arm/xilinx/zy7_ehci.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/arm/xilinx/zy7_ehci.c Thu Feb 5 20:03:02 2015 (r278278) @@ -216,6 +216,7 @@ zy7_ehci_attach(device_t dev) sc->sc_bus.parent = dev; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, Modified: stable/10/sys/dev/usb/controller/at91dci_atmelarm.c ============================================================================== --- stable/10/sys/dev/usb/controller/at91dci_atmelarm.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/dev/usb/controller/at91dci_atmelarm.c Thu Feb 5 20:03:02 2015 (r278278) @@ -156,6 +156,7 @@ at91_udp_attach(device_t dev) sc->sc_dci.sc_bus.parent = dev; sc->sc_dci.sc_bus.devices = sc->sc_dci.sc_devices; sc->sc_dci.sc_bus.devices_max = AT91_MAX_DEVICES; + sc->sc_dci.sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_dci.sc_bus, Modified: stable/10/sys/dev/usb/controller/at91dci_fdt.c ============================================================================== --- stable/10/sys/dev/usb/controller/at91dci_fdt.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/dev/usb/controller/at91dci_fdt.c Thu Feb 5 20:03:02 2015 (r278278) @@ -162,6 +162,7 @@ at91_udp_attach(device_t dev) sc->sc_dci.sc_bus.parent = dev; sc->sc_dci.sc_bus.devices = sc->sc_dci.sc_devices; sc->sc_dci.sc_bus.devices_max = AT91_MAX_DEVICES; + sc->sc_dci.sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_dci.sc_bus, Modified: stable/10/sys/dev/usb/controller/atmegadci_atmelarm.c ============================================================================== --- stable/10/sys/dev/usb/controller/atmegadci_atmelarm.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/dev/usb/controller/atmegadci_atmelarm.c Thu Feb 5 20:03:02 2015 (r278278) @@ -101,6 +101,7 @@ atmegadci_attach(device_t dev) sc->sc_otg.sc_bus.parent = dev; sc->sc_otg.sc_bus.devices = sc->sc_otg.sc_devices; sc->sc_otg.sc_bus.devices_max = ATMEGA_MAX_DEVICES; + sc->sc_otg.sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_otg.sc_bus, Modified: stable/10/sys/dev/usb/controller/dwc_otg_atmelarm.c ============================================================================== --- stable/10/sys/dev/usb/controller/dwc_otg_atmelarm.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/dev/usb/controller/dwc_otg_atmelarm.c Thu Feb 5 20:03:02 2015 (r278278) @@ -85,6 +85,7 @@ dwc_otg_attach(device_t dev) sc->sc_otg.sc_bus.parent = dev; sc->sc_otg.sc_bus.devices = sc->sc_otg.sc_devices; sc->sc_otg.sc_bus.devices_max = DWC_OTG_MAX_DEVICES; + sc->sc_otg.sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_otg.sc_bus, Modified: stable/10/sys/dev/usb/controller/dwc_otg_fdt.c ============================================================================== --- stable/10/sys/dev/usb/controller/dwc_otg_fdt.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/dev/usb/controller/dwc_otg_fdt.c Thu Feb 5 20:03:02 2015 (r278278) @@ -98,6 +98,7 @@ dwc_otg_attach(device_t dev) sc->sc_otg.sc_bus.parent = dev; sc->sc_otg.sc_bus.devices = sc->sc_otg.sc_devices; sc->sc_otg.sc_bus.devices_max = DWC_OTG_MAX_DEVICES; + sc->sc_otg.sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_otg.sc_bus, Modified: stable/10/sys/dev/usb/controller/ehci_fsl.c ============================================================================== --- stable/10/sys/dev/usb/controller/ehci_fsl.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/dev/usb/controller/ehci_fsl.c Thu Feb 5 20:03:02 2015 (r278278) @@ -239,6 +239,7 @@ fsl_ehci_attach(device_t self) sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; if (usb_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(self), &ehci_iterate_hw_softc)) Modified: stable/10/sys/dev/usb/controller/ehci_imx.c ============================================================================== --- stable/10/sys/dev/usb/controller/ehci_imx.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/dev/usb/controller/ehci_imx.c Thu Feb 5 20:03:02 2015 (r278278) @@ -237,7 +237,9 @@ imx_ehci_attach(device_t dev) esc->sc_bus.parent = dev; esc->sc_bus.devices = esc->sc_devices; esc->sc_bus.devices_max = EHCI_MAX_DEVICES; + esc->sc_bus.dma_bits = 32; + /* allocate all DMA memory */ if (usb_bus_mem_alloc_all(&esc->sc_bus, USB_GET_DMA_TAG(dev), &ehci_iterate_hw_softc) != 0) { device_printf(dev, "usb_bus_mem_alloc_all() failed\n"); Modified: stable/10/sys/dev/usb/controller/ehci_ixp4xx.c ============================================================================== --- stable/10/sys/dev/usb/controller/ehci_ixp4xx.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/dev/usb/controller/ehci_ixp4xx.c Thu Feb 5 20:03:02 2015 (r278278) @@ -107,6 +107,7 @@ ehci_ixp_attach(device_t self) sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, Modified: stable/10/sys/dev/usb/controller/ehci_mv.c ============================================================================== --- stable/10/sys/dev/usb/controller/ehci_mv.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/dev/usb/controller/ehci_mv.c Thu Feb 5 20:03:02 2015 (r278278) @@ -126,6 +126,7 @@ mv_ehci_attach(device_t self) sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, Modified: stable/10/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- stable/10/sys/dev/usb/controller/ehci_pci.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/dev/usb/controller/ehci_pci.c Thu Feb 5 20:03:02 2015 (r278278) @@ -280,6 +280,7 @@ ehci_pci_attach(device_t self) sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, Modified: stable/10/sys/dev/usb/controller/musb_otg_atmelarm.c ============================================================================== --- stable/10/sys/dev/usb/controller/musb_otg_atmelarm.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/dev/usb/controller/musb_otg_atmelarm.c Thu Feb 5 20:03:02 2015 (r278278) @@ -137,6 +137,7 @@ musbotg_attach(device_t dev) sc->sc_otg.sc_bus.parent = dev; sc->sc_otg.sc_bus.devices = sc->sc_otg.sc_devices; sc->sc_otg.sc_bus.devices_max = MUSB2_MAX_DEVICES; + sc->sc_otg.sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_otg.sc_bus, Modified: stable/10/sys/dev/usb/controller/ohci_atmelarm.c ============================================================================== --- stable/10/sys/dev/usb/controller/ohci_atmelarm.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/dev/usb/controller/ohci_atmelarm.c Thu Feb 5 20:03:02 2015 (r278278) @@ -93,6 +93,7 @@ ohci_atmelarm_attach(device_t dev) sc->sc_ohci.sc_bus.parent = dev; sc->sc_ohci.sc_bus.devices = sc->sc_ohci.sc_devices; sc->sc_ohci.sc_bus.devices_max = OHCI_MAX_DEVICES; + sc->sc_ohci.sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_ohci.sc_bus, Modified: stable/10/sys/dev/usb/controller/ohci_fdt.c ============================================================================== --- stable/10/sys/dev/usb/controller/ohci_fdt.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/dev/usb/controller/ohci_fdt.c Thu Feb 5 20:03:02 2015 (r278278) @@ -99,6 +99,7 @@ ohci_at91_fdt_attach(device_t dev) sc->sc_ohci.sc_bus.parent = dev; sc->sc_ohci.sc_bus.devices = sc->sc_ohci.sc_devices; sc->sc_ohci.sc_bus.devices_max = OHCI_MAX_DEVICES; + sc->sc_ohci.sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_ohci.sc_bus, Modified: stable/10/sys/dev/usb/controller/ohci_pci.c ============================================================================== --- stable/10/sys/dev/usb/controller/ohci_pci.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/dev/usb/controller/ohci_pci.c Thu Feb 5 20:03:02 2015 (r278278) @@ -211,6 +211,7 @@ ohci_pci_attach(device_t self) sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = OHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(self), Modified: stable/10/sys/dev/usb/controller/ohci_s3c24x0.c ============================================================================== --- stable/10/sys/dev/usb/controller/ohci_s3c24x0.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/dev/usb/controller/ohci_s3c24x0.c Thu Feb 5 20:03:02 2015 (r278278) @@ -84,6 +84,7 @@ ohci_s3c24x0_attach(device_t dev) sc->sc_bus.parent = dev; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = OHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(dev), Modified: stable/10/sys/dev/usb/controller/uhci_pci.c ============================================================================== --- stable/10/sys/dev/usb/controller/uhci_pci.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/dev/usb/controller/uhci_pci.c Thu Feb 5 20:03:02 2015 (r278278) @@ -261,6 +261,7 @@ uhci_pci_attach(device_t self) sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = UHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(self), Modified: stable/10/sys/dev/usb/controller/usb_controller.c ============================================================================== --- stable/10/sys/dev/usb/controller/usb_controller.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/dev/usb/controller/usb_controller.c Thu Feb 5 20:03:02 2015 (r278278) @@ -917,7 +917,7 @@ usb_bus_mem_alloc_all(struct usb_bus *bu #if USB_HAVE_BUSDMA usb_dma_tag_setup(bus->dma_parent_tag, bus->dma_tags, - dmat, &bus->bus_mtx, NULL, 32, USB_BUS_DMA_TAG_MAX); + dmat, &bus->bus_mtx, NULL, bus->dma_bits, USB_BUS_DMA_TAG_MAX); #endif if ((bus->devices_max > USB_MAX_DEVICES) || (bus->devices_max < USB_MIN_DEVICES) || Modified: stable/10/sys/dev/usb/controller/uss820dci_atmelarm.c ============================================================================== --- stable/10/sys/dev/usb/controller/uss820dci_atmelarm.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/dev/usb/controller/uss820dci_atmelarm.c Thu Feb 5 20:03:02 2015 (r278278) @@ -107,6 +107,7 @@ uss820_atmelarm_attach(device_t dev) sc->sc_bus.parent = dev; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = USS820_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, Modified: stable/10/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/dev/usb/controller/xhci.c Thu Feb 5 20:03:02 2015 (r278278) @@ -323,7 +323,7 @@ xhci_reset_command_queue_locked(struct x usbd_get_page(&sc->sc_hw.root_pc, 0, &buf_res); - /* setup command ring control base address */ + /* set up command ring control base address */ addr = buf_res.physaddr; phwr = buf_res.buffer; addr += (uintptr_t)&((struct xhci_hw_root *)0)->hwr_commands[0]; @@ -353,34 +353,11 @@ xhci_start_controller(struct xhci_softc DPRINTF("\n"); - sc->sc_capa_off = 0; - sc->sc_oper_off = XREAD1(sc, capa, XHCI_CAPLENGTH); - sc->sc_runt_off = XREAD4(sc, capa, XHCI_RTSOFF) & ~0x1F; - sc->sc_door_off = XREAD4(sc, capa, XHCI_DBOFF) & ~0x3; - - DPRINTF("CAPLENGTH=0x%x\n", sc->sc_oper_off); - DPRINTF("RUNTIMEOFFSET=0x%x\n", sc->sc_runt_off); - DPRINTF("DOOROFFSET=0x%x\n", sc->sc_door_off); - sc->sc_event_ccs = 1; sc->sc_event_idx = 0; sc->sc_command_ccs = 1; sc->sc_command_idx = 0; - DPRINTF("xHCI version = 0x%04x\n", XREAD2(sc, capa, XHCI_HCIVERSION)); - - temp = XREAD4(sc, capa, XHCI_HCSPARAMS0); - - DPRINTF("HCS0 = 0x%08x\n", temp); - - if (XHCI_HCS0_CSZ(temp)) { - sc->sc_ctx_is_64_byte = 1; - device_printf(sc->sc_bus.parent, "64 byte context size.\n"); - } else { - sc->sc_ctx_is_64_byte = 0; - device_printf(sc->sc_bus.parent, "32 byte context size.\n"); - } - /* Reset controller */ XWRITE4(sc, oper, XHCI_USBCMD, XHCI_CMD_HCRST); @@ -420,7 +397,7 @@ xhci_start_controller(struct xhci_softc if (sc->sc_noslot > XHCI_MAX_DEVICES) sc->sc_noslot = XHCI_MAX_DEVICES; - /* setup number of device slots */ + /* set up number of device slots */ DPRINTF("CONFIG=0x%08x -> 0x%08x\n", XREAD4(sc, oper, XHCI_CONFIG), sc->sc_noslot); @@ -453,7 +430,7 @@ xhci_start_controller(struct xhci_softc /* disable all device notifications */ XWRITE4(sc, oper, XHCI_DNCTRL, 0); - /* setup device context base address */ + /* set up device context base address */ usbd_get_page(&sc->sc_hw.ctx_pc, 0, &buf_res); pdctxa = buf_res.buffer; memset(pdctxa, 0, sizeof(*pdctxa)); @@ -532,7 +509,7 @@ xhci_start_controller(struct xhci_softc temp |= XHCI_IMAN_INTR_ENA; XWRITE4(sc, runt, XHCI_IMAN(0), temp); - /* setup command ring control base address */ + /* set up command ring control base address */ addr = buf_res.physaddr; addr += (uintptr_t)&((struct xhci_hw_root *)0)->hwr_commands[0]; @@ -605,7 +582,11 @@ xhci_halt_controller(struct xhci_softc * usb_error_t xhci_init(struct xhci_softc *sc, device_t self) { - /* initialise some bus fields */ + uint32_t temp; + + DPRINTF("\n"); + + /* initialize some bus fields */ sc->sc_bus.parent = self; /* set the bus revision */ @@ -614,7 +595,7 @@ xhci_init(struct xhci_softc *sc, device_ /* set up the bus struct */ sc->sc_bus.methods = &xhci_bus_methods; - /* setup devices array */ + /* set up devices array */ sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = XHCI_MAX_DEVICES; @@ -622,9 +603,34 @@ xhci_init(struct xhci_softc *sc, device_ sc->sc_event_ccs = 1; sc->sc_command_ccs = 1; - /* setup command queue mutex and condition varible */ - cv_init(&sc->sc_cmd_cv, "CMDQ"); - sx_init(&sc->sc_cmd_sx, "CMDQ lock"); + /* set up bus space offsets */ + sc->sc_capa_off = 0; + sc->sc_oper_off = XREAD1(sc, capa, XHCI_CAPLENGTH); + sc->sc_runt_off = XREAD4(sc, capa, XHCI_RTSOFF) & ~0x1F; + sc->sc_door_off = XREAD4(sc, capa, XHCI_DBOFF) & ~0x3; + + DPRINTF("CAPLENGTH=0x%x\n", sc->sc_oper_off); + DPRINTF("RUNTIMEOFFSET=0x%x\n", sc->sc_runt_off); + DPRINTF("DOOROFFSET=0x%x\n", sc->sc_door_off); + + DPRINTF("xHCI version = 0x%04x\n", XREAD2(sc, capa, XHCI_HCIVERSION)); + + temp = XREAD4(sc, capa, XHCI_HCSPARAMS0); + + DPRINTF("HCS0 = 0x%08x\n", temp); + + /* set up context size */ + if (XHCI_HCS0_CSZ(temp)) { + sc->sc_ctx_is_64_byte = 1; + } else { + sc->sc_ctx_is_64_byte = 0; + } + + /* get DMA bits */ + sc->sc_bus.dma_bits = XHCI_HCS0_AC64(temp) ? 64 : 32; + + device_printf(self, "%d bytes context size, %d-bit DMA\n", + sc->sc_ctx_is_64_byte ? 64 : 32, (int)sc->sc_bus.dma_bits); /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, @@ -632,10 +638,14 @@ xhci_init(struct xhci_softc *sc, device_ return (ENOMEM); } - sc->sc_config_msg[0].hdr.pm_callback = &xhci_configure_msg; - sc->sc_config_msg[0].bus = &sc->sc_bus; - sc->sc_config_msg[1].hdr.pm_callback = &xhci_configure_msg; - sc->sc_config_msg[1].bus = &sc->sc_bus; + /* set up command queue mutex and condition varible */ + cv_init(&sc->sc_cmd_cv, "CMDQ"); + sx_init(&sc->sc_cmd_sx, "CMDQ lock"); + + sc->sc_config_msg[0].hdr.pm_callback = &xhci_configure_msg; + sc->sc_config_msg[0].bus = &sc->sc_bus; + sc->sc_config_msg[1].hdr.pm_callback = &xhci_configure_msg; + sc->sc_config_msg[1].bus = &sc->sc_bus; return (0); } @@ -1815,7 +1825,7 @@ restart: npkt_off += buf_res.length; } - /* setup npkt */ + /* set up npkt */ npkt = (len_old - npkt_off + temp->max_packet_size - 1) / temp->max_packet_size; @@ -1932,7 +1942,7 @@ restart: if (precompute) { precompute = 0; - /* setup alt next pointer, if any */ + /* set up alt next pointer, if any */ if (temp->last_frame) { td_alt_next = NULL; } else { @@ -2110,7 +2120,7 @@ xhci_setup_generic_chain(struct usb_xfer } if (x != xfer->nframes) { - /* setup page_cache pointer */ + /* set up page_cache pointer */ temp.pc = xfer->frbuffers + x; /* set endpoint direction */ temp.direction = UE_GET_DIR(xfer->endpointno); @@ -2701,7 +2711,7 @@ xhci_alloc_device_ext(struct usb_device goto error; } - /* initialise all endpoint LINK TRBs */ + /* initialize all endpoint LINK TRBs */ for (i = 0; i != XHCI_MAX_ENDPOINTS; i++) { @@ -3085,7 +3095,7 @@ xhci_device_generic_enter(struct usb_xfe { DPRINTF("\n"); - /* setup TD's and QH */ + /* set up TD's and QH */ xhci_setup_generic_chain(xfer); xhci_device_generic_multi_enter(xfer->endpoint, Modified: stable/10/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci_pci.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/dev/usb/controller/xhci_pci.c Thu Feb 5 20:03:02 2015 (r278278) @@ -181,26 +181,26 @@ xhci_pci_attach(device_t self) struct xhci_softc *sc = device_get_softc(self); int count, err, rid; - /* XXX check for 64-bit capability */ - - if (xhci_init(sc, self)) { - device_printf(self, "Could not initialize softc\n"); - goto error; - } - - pci_enable_busmaster(self); - rid = PCI_XHCI_CBMEM; sc->sc_io_res = bus_alloc_resource_any(self, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (!sc->sc_io_res) { device_printf(self, "Could not map memory\n"); - goto error; + return (ENOMEM); } sc->sc_io_tag = rman_get_bustag(sc->sc_io_res); sc->sc_io_hdl = rman_get_bushandle(sc->sc_io_res); sc->sc_io_size = rman_get_size(sc->sc_io_res); + if (xhci_init(sc, self)) { + device_printf(self, "Could not initialize softc\n"); + bus_release_resource(self, SYS_RES_MEMORY, PCI_XHCI_CBMEM, + sc->sc_io_res); + return (ENXIO); + } + + pci_enable_busmaster(self); + usb_callout_init_mtx(&sc->sc_callout, &sc->sc_bus.bus_mtx, 0); rid = 0; @@ -299,10 +299,8 @@ xhci_pci_detach(device_t self) /* during module unload there are lots of children leftover */ device_delete_children(self); - if (sc->sc_io_res) { - usb_callout_drain(&sc->sc_callout); - xhci_halt_controller(sc); - } + usb_callout_drain(&sc->sc_callout); + xhci_halt_controller(sc); pci_disable_busmaster(self); Modified: stable/10/sys/dev/usb/usb_bus.h ============================================================================== --- stable/10/sys/dev/usb/usb_bus.h Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/dev/usb/usb_bus.h Thu Feb 5 20:03:02 2015 (r278278) @@ -115,6 +115,7 @@ struct usb_bus { uint8_t devices_max; /* maximum number of USB devices */ uint8_t do_probe; /* set if USB should be re-probed */ uint8_t no_explore; /* don't explore USB ports */ + uint8_t dma_bits; /* number of DMA address lines */ }; #endif /* _USB_BUS_H_ */ Modified: stable/10/sys/dev/usb/usb_busdma.h ============================================================================== --- stable/10/sys/dev/usb/usb_busdma.h Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/dev/usb/usb_busdma.h Thu Feb 5 20:03:02 2015 (r278278) @@ -62,7 +62,7 @@ typedef void (usb_dma_callback_t)(struct */ struct usb_page { #if USB_HAVE_BUSDMA - bus_size_t physaddr; + bus_addr_t physaddr; void *buffer; /* non Kernel Virtual Address */ #endif }; @@ -75,7 +75,7 @@ struct usb_page { struct usb_page_search { void *buffer; #if USB_HAVE_BUSDMA - bus_size_t physaddr; + bus_addr_t physaddr; #endif usb_size_t length; }; Modified: stable/10/sys/dev/usb/usb_transfer.c ============================================================================== --- stable/10/sys/dev/usb/usb_transfer.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/dev/usb/usb_transfer.c Thu Feb 5 20:03:02 2015 (r278278) @@ -960,7 +960,8 @@ usbd_transfer_setup(struct usb_device *u #if USB_HAVE_BUSDMA usb_dma_tag_setup(&info->dma_parent_tag, parm->dma_tag_p, udev->bus->dma_parent_tag[0].tag, - xfer_mtx, &usb_bdma_done_event, 32, parm->dma_tag_max); + xfer_mtx, &usb_bdma_done_event, udev->bus->dma_bits, + parm->dma_tag_max); #endif info->bus = udev->bus; Modified: stable/10/sys/mips/atheros/ar71xx_ehci.c ============================================================================== --- stable/10/sys/mips/atheros/ar71xx_ehci.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/mips/atheros/ar71xx_ehci.c Thu Feb 5 20:03:02 2015 (r278278) @@ -90,6 +90,7 @@ ar71xx_ehci_attach(device_t self) sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, Modified: stable/10/sys/mips/atheros/ar71xx_ohci.c ============================================================================== --- stable/10/sys/mips/atheros/ar71xx_ohci.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/mips/atheros/ar71xx_ohci.c Thu Feb 5 20:03:02 2015 (r278278) @@ -76,6 +76,7 @@ ar71xx_ohci_attach(device_t dev) sc->sc_ohci.sc_bus.parent = dev; sc->sc_ohci.sc_bus.devices = sc->sc_ohci.sc_devices; sc->sc_ohci.sc_bus.devices_max = OHCI_MAX_DEVICES; + sc->sc_ohci.sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_ohci.sc_bus, Modified: stable/10/sys/mips/cavium/usb/octusb_octeon.c ============================================================================== --- stable/10/sys/mips/cavium/usb/octusb_octeon.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/mips/cavium/usb/octusb_octeon.c Thu Feb 5 20:03:02 2015 (r278278) @@ -103,6 +103,7 @@ octusb_octeon_attach(device_t dev) sc->sc_dci.sc_bus.parent = dev; sc->sc_dci.sc_bus.devices = sc->sc_dci.sc_devices; sc->sc_dci.sc_bus.devices_max = OCTUSB_MAX_DEVICES; + sc->sc_dci.sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_dci.sc_bus, Modified: stable/10/sys/mips/rmi/xls_ehci.c ============================================================================== --- stable/10/sys/mips/rmi/xls_ehci.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/mips/rmi/xls_ehci.c Thu Feb 5 20:03:02 2015 (r278278) @@ -93,6 +93,7 @@ ehci_xls_attach(device_t self) sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, Modified: stable/10/sys/mips/rt305x/rt305x_dotg.c ============================================================================== --- stable/10/sys/mips/rt305x/rt305x_dotg.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/mips/rt305x/rt305x_dotg.c Thu Feb 5 20:03:02 2015 (r278278) @@ -92,6 +92,7 @@ dotg_obio_attach(device_t dev) sc->sc_dci.sc_bus.parent = dev; sc->sc_dci.sc_bus.devices = sc->sc_dci.sc_devices; sc->sc_dci.sc_bus.devices_max = DOTG_MAX_DEVICES; + sc->sc_dci.sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_dci.sc_bus, Modified: stable/10/sys/powerpc/ps3/ehci_ps3.c ============================================================================== --- stable/10/sys/powerpc/ps3/ehci_ps3.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/powerpc/ps3/ehci_ps3.c Thu Feb 5 20:03:02 2015 (r278278) @@ -89,7 +89,9 @@ ehci_ps3_attach(device_t dev) sc->sc_bus.parent = dev; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; + /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(dev), &ehci_iterate_hw_softc)) return (ENOMEM); Modified: stable/10/sys/powerpc/ps3/ohci_ps3.c ============================================================================== --- stable/10/sys/powerpc/ps3/ohci_ps3.c Thu Feb 5 19:54:03 2015 (r278277) +++ stable/10/sys/powerpc/ps3/ohci_ps3.c Thu Feb 5 20:03:02 2015 (r278278) @@ -85,7 +85,9 @@ ohci_ps3_attach(device_t dev) sc->sc_bus.parent = dev; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = OHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; + /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(dev), &ohci_iterate_hw_softc)) return (ENOMEM); From owner-svn-src-stable@FreeBSD.ORG Thu Feb 5 20:15:50 2015 Return-Path: Delivered-To: svn-src-stable@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 97D96A91; Thu, 5 Feb 2015 20:15:50 +0000 (UTC) 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 7FB3F378; Thu, 5 Feb 2015 20:15:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t15KFoDU023707; Thu, 5 Feb 2015 20:15:50 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t15KFhKB023663; Thu, 5 Feb 2015 20:15:43 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502052015.t15KFhKB023663@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 5 Feb 2015 20:15: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: r278279 - in stable/9/sys: arm/econa dev/usb dev/usb/controller mips/atheros mips/cavium/usb mips/rmi mips/rt305x powerpc/ps3 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2015 20:15:50 -0000 Author: hselasky Date: Thu Feb 5 20:15:42 2015 New Revision: 278279 URL: https://svnweb.freebsd.org/changeset/base/278279 Log: MFC r266969 and r276717: Add 64-bit DMA support in the XHCI controller driver. - Fix some comments and whitespaces while at it. - Add support for PAE. Modified: stable/9/sys/arm/econa/ehci_ebus.c stable/9/sys/arm/econa/ohci_ec.c stable/9/sys/dev/usb/controller/at91dci_atmelarm.c stable/9/sys/dev/usb/controller/atmegadci_atmelarm.c stable/9/sys/dev/usb/controller/ehci_ixp4xx.c stable/9/sys/dev/usb/controller/ehci_mv.c stable/9/sys/dev/usb/controller/ehci_pci.c stable/9/sys/dev/usb/controller/musb_otg_atmelarm.c stable/9/sys/dev/usb/controller/ohci_atmelarm.c stable/9/sys/dev/usb/controller/ohci_pci.c stable/9/sys/dev/usb/controller/ohci_s3c24x0.c stable/9/sys/dev/usb/controller/uhci_pci.c stable/9/sys/dev/usb/controller/usb_controller.c stable/9/sys/dev/usb/controller/uss820dci_atmelarm.c stable/9/sys/dev/usb/controller/xhci.c stable/9/sys/dev/usb/controller/xhci_pci.c stable/9/sys/dev/usb/usb_bus.h stable/9/sys/dev/usb/usb_busdma.h stable/9/sys/dev/usb/usb_transfer.c stable/9/sys/mips/atheros/ar71xx_ehci.c stable/9/sys/mips/atheros/ar71xx_ohci.c stable/9/sys/mips/cavium/usb/octusb_octeon.c stable/9/sys/mips/rmi/xls_ehci.c stable/9/sys/mips/rt305x/rt305x_dotg.c stable/9/sys/powerpc/ps3/ehci_ps3.c stable/9/sys/powerpc/ps3/ohci_ps3.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/arm/econa/ehci_ebus.c ============================================================================== --- stable/9/sys/arm/econa/ehci_ebus.c Thu Feb 5 20:03:02 2015 (r278278) +++ stable/9/sys/arm/econa/ehci_ebus.c Thu Feb 5 20:15:42 2015 (r278279) @@ -102,6 +102,7 @@ ehci_ebus_attach(device_t self) sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, Modified: stable/9/sys/arm/econa/ohci_ec.c ============================================================================== --- stable/9/sys/arm/econa/ohci_ec.c Thu Feb 5 20:03:02 2015 (r278278) +++ stable/9/sys/arm/econa/ohci_ec.c Thu Feb 5 20:15:42 2015 (r278279) @@ -91,6 +91,7 @@ ohci_ec_attach(device_t dev) sc->sc_ohci.sc_bus.parent = dev; sc->sc_ohci.sc_bus.devices = sc->sc_ohci.sc_devices; sc->sc_ohci.sc_bus.devices_max = OHCI_MAX_DEVICES; + sc->sc_ohci.sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_ohci.sc_bus, Modified: stable/9/sys/dev/usb/controller/at91dci_atmelarm.c ============================================================================== --- stable/9/sys/dev/usb/controller/at91dci_atmelarm.c Thu Feb 5 20:03:02 2015 (r278278) +++ stable/9/sys/dev/usb/controller/at91dci_atmelarm.c Thu Feb 5 20:15:42 2015 (r278279) @@ -159,6 +159,7 @@ at91_udp_attach(device_t dev) sc->sc_dci.sc_bus.parent = dev; sc->sc_dci.sc_bus.devices = sc->sc_dci.sc_devices; sc->sc_dci.sc_bus.devices_max = AT91_MAX_DEVICES; + sc->sc_dci.sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_dci.sc_bus, Modified: stable/9/sys/dev/usb/controller/atmegadci_atmelarm.c ============================================================================== --- stable/9/sys/dev/usb/controller/atmegadci_atmelarm.c Thu Feb 5 20:03:02 2015 (r278278) +++ stable/9/sys/dev/usb/controller/atmegadci_atmelarm.c Thu Feb 5 20:15:42 2015 (r278279) @@ -101,6 +101,7 @@ atmegadci_attach(device_t dev) sc->sc_otg.sc_bus.parent = dev; sc->sc_otg.sc_bus.devices = sc->sc_otg.sc_devices; sc->sc_otg.sc_bus.devices_max = ATMEGA_MAX_DEVICES; + sc->sc_otg.sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_otg.sc_bus, Modified: stable/9/sys/dev/usb/controller/ehci_ixp4xx.c ============================================================================== --- stable/9/sys/dev/usb/controller/ehci_ixp4xx.c Thu Feb 5 20:03:02 2015 (r278278) +++ stable/9/sys/dev/usb/controller/ehci_ixp4xx.c Thu Feb 5 20:15:42 2015 (r278279) @@ -107,6 +107,7 @@ ehci_ixp_attach(device_t self) sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, Modified: stable/9/sys/dev/usb/controller/ehci_mv.c ============================================================================== --- stable/9/sys/dev/usb/controller/ehci_mv.c Thu Feb 5 20:03:02 2015 (r278278) +++ stable/9/sys/dev/usb/controller/ehci_mv.c Thu Feb 5 20:15:42 2015 (r278279) @@ -123,6 +123,7 @@ mv_ehci_attach(device_t self) sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, Modified: stable/9/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- stable/9/sys/dev/usb/controller/ehci_pci.c Thu Feb 5 20:03:02 2015 (r278278) +++ stable/9/sys/dev/usb/controller/ehci_pci.c Thu Feb 5 20:15:42 2015 (r278279) @@ -278,6 +278,7 @@ ehci_pci_attach(device_t self) sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, Modified: stable/9/sys/dev/usb/controller/musb_otg_atmelarm.c ============================================================================== --- stable/9/sys/dev/usb/controller/musb_otg_atmelarm.c Thu Feb 5 20:03:02 2015 (r278278) +++ stable/9/sys/dev/usb/controller/musb_otg_atmelarm.c Thu Feb 5 20:15:42 2015 (r278279) @@ -137,6 +137,7 @@ musbotg_attach(device_t dev) sc->sc_otg.sc_bus.parent = dev; sc->sc_otg.sc_bus.devices = sc->sc_otg.sc_devices; sc->sc_otg.sc_bus.devices_max = MUSB2_MAX_DEVICES; + sc->sc_otg.sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_otg.sc_bus, Modified: stable/9/sys/dev/usb/controller/ohci_atmelarm.c ============================================================================== --- stable/9/sys/dev/usb/controller/ohci_atmelarm.c Thu Feb 5 20:03:02 2015 (r278278) +++ stable/9/sys/dev/usb/controller/ohci_atmelarm.c Thu Feb 5 20:15:42 2015 (r278279) @@ -91,6 +91,7 @@ ohci_atmelarm_attach(device_t dev) sc->sc_ohci.sc_bus.parent = dev; sc->sc_ohci.sc_bus.devices = sc->sc_ohci.sc_devices; sc->sc_ohci.sc_bus.devices_max = OHCI_MAX_DEVICES; + sc->sc_ohci.sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_ohci.sc_bus, Modified: stable/9/sys/dev/usb/controller/ohci_pci.c ============================================================================== --- stable/9/sys/dev/usb/controller/ohci_pci.c Thu Feb 5 20:03:02 2015 (r278278) +++ stable/9/sys/dev/usb/controller/ohci_pci.c Thu Feb 5 20:15:42 2015 (r278279) @@ -211,6 +211,7 @@ ohci_pci_attach(device_t self) sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = OHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(self), Modified: stable/9/sys/dev/usb/controller/ohci_s3c24x0.c ============================================================================== --- stable/9/sys/dev/usb/controller/ohci_s3c24x0.c Thu Feb 5 20:03:02 2015 (r278278) +++ stable/9/sys/dev/usb/controller/ohci_s3c24x0.c Thu Feb 5 20:15:42 2015 (r278279) @@ -84,6 +84,7 @@ ohci_s3c24x0_attach(device_t dev) sc->sc_bus.parent = dev; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = OHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(dev), Modified: stable/9/sys/dev/usb/controller/uhci_pci.c ============================================================================== --- stable/9/sys/dev/usb/controller/uhci_pci.c Thu Feb 5 20:03:02 2015 (r278278) +++ stable/9/sys/dev/usb/controller/uhci_pci.c Thu Feb 5 20:15:42 2015 (r278279) @@ -261,6 +261,7 @@ uhci_pci_attach(device_t self) sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = UHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(self), Modified: stable/9/sys/dev/usb/controller/usb_controller.c ============================================================================== --- stable/9/sys/dev/usb/controller/usb_controller.c Thu Feb 5 20:03:02 2015 (r278278) +++ stable/9/sys/dev/usb/controller/usb_controller.c Thu Feb 5 20:15:42 2015 (r278279) @@ -890,7 +890,7 @@ usb_bus_mem_alloc_all(struct usb_bus *bu #if USB_HAVE_BUSDMA usb_dma_tag_setup(bus->dma_parent_tag, bus->dma_tags, - dmat, &bus->bus_mtx, NULL, 32, USB_BUS_DMA_TAG_MAX); + dmat, &bus->bus_mtx, NULL, bus->dma_bits, USB_BUS_DMA_TAG_MAX); #endif if ((bus->devices_max > USB_MAX_DEVICES) || (bus->devices_max < USB_MIN_DEVICES) || Modified: stable/9/sys/dev/usb/controller/uss820dci_atmelarm.c ============================================================================== --- stable/9/sys/dev/usb/controller/uss820dci_atmelarm.c Thu Feb 5 20:03:02 2015 (r278278) +++ stable/9/sys/dev/usb/controller/uss820dci_atmelarm.c Thu Feb 5 20:15:42 2015 (r278279) @@ -107,6 +107,7 @@ uss820_atmelarm_attach(device_t dev) sc->sc_bus.parent = dev; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = USS820_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, Modified: stable/9/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci.c Thu Feb 5 20:03:02 2015 (r278278) +++ stable/9/sys/dev/usb/controller/xhci.c Thu Feb 5 20:15:42 2015 (r278279) @@ -312,7 +312,7 @@ xhci_reset_command_queue_locked(struct x usbd_get_page(&sc->sc_hw.root_pc, 0, &buf_res); - /* setup command ring control base address */ + /* set up command ring control base address */ addr = buf_res.physaddr; phwr = buf_res.buffer; addr += (uintptr_t)&((struct xhci_hw_root *)0)->hwr_commands[0]; @@ -342,34 +342,11 @@ xhci_start_controller(struct xhci_softc DPRINTF("\n"); - sc->sc_capa_off = 0; - sc->sc_oper_off = XREAD1(sc, capa, XHCI_CAPLENGTH); - sc->sc_runt_off = XREAD4(sc, capa, XHCI_RTSOFF) & ~0x1F; - sc->sc_door_off = XREAD4(sc, capa, XHCI_DBOFF) & ~0x3; - - DPRINTF("CAPLENGTH=0x%x\n", sc->sc_oper_off); - DPRINTF("RUNTIMEOFFSET=0x%x\n", sc->sc_runt_off); - DPRINTF("DOOROFFSET=0x%x\n", sc->sc_door_off); - sc->sc_event_ccs = 1; sc->sc_event_idx = 0; sc->sc_command_ccs = 1; sc->sc_command_idx = 0; - DPRINTF("xHCI version = 0x%04x\n", XREAD2(sc, capa, XHCI_HCIVERSION)); - - temp = XREAD4(sc, capa, XHCI_HCSPARAMS0); - - DPRINTF("HCS0 = 0x%08x\n", temp); - - if (XHCI_HCS0_CSZ(temp)) { - sc->sc_ctx_is_64_byte = 1; - device_printf(sc->sc_bus.parent, "64 byte context size.\n"); - } else { - sc->sc_ctx_is_64_byte = 0; - device_printf(sc->sc_bus.parent, "32 byte context size.\n"); - } - /* Reset controller */ XWRITE4(sc, oper, XHCI_USBCMD, XHCI_CMD_HCRST); @@ -409,7 +386,7 @@ xhci_start_controller(struct xhci_softc if (sc->sc_noslot > XHCI_MAX_DEVICES) sc->sc_noslot = XHCI_MAX_DEVICES; - /* setup number of device slots */ + /* set up number of device slots */ DPRINTF("CONFIG=0x%08x -> 0x%08x\n", XREAD4(sc, oper, XHCI_CONFIG), sc->sc_noslot); @@ -442,7 +419,7 @@ xhci_start_controller(struct xhci_softc /* disable all device notifications */ XWRITE4(sc, oper, XHCI_DNCTRL, 0); - /* setup device context base address */ + /* set up device context base address */ usbd_get_page(&sc->sc_hw.ctx_pc, 0, &buf_res); pdctxa = buf_res.buffer; memset(pdctxa, 0, sizeof(*pdctxa)); @@ -521,7 +498,7 @@ xhci_start_controller(struct xhci_softc temp |= XHCI_IMAN_INTR_ENA; XWRITE4(sc, runt, XHCI_IMAN(0), temp); - /* setup command ring control base address */ + /* set up command ring control base address */ addr = buf_res.physaddr; addr += (uintptr_t)&((struct xhci_hw_root *)0)->hwr_commands[0]; @@ -594,7 +571,11 @@ xhci_halt_controller(struct xhci_softc * usb_error_t xhci_init(struct xhci_softc *sc, device_t self) { - /* initialise some bus fields */ + uint32_t temp; + + DPRINTF("\n"); + + /* initialize some bus fields */ sc->sc_bus.parent = self; /* set the bus revision */ @@ -603,7 +584,7 @@ xhci_init(struct xhci_softc *sc, device_ /* set up the bus struct */ sc->sc_bus.methods = &xhci_bus_methods; - /* setup devices array */ + /* set up devices array */ sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = XHCI_MAX_DEVICES; @@ -611,9 +592,34 @@ xhci_init(struct xhci_softc *sc, device_ sc->sc_event_ccs = 1; sc->sc_command_ccs = 1; - /* setup command queue mutex and condition varible */ - cv_init(&sc->sc_cmd_cv, "CMDQ"); - sx_init(&sc->sc_cmd_sx, "CMDQ lock"); + /* set up bus space offsets */ + sc->sc_capa_off = 0; + sc->sc_oper_off = XREAD1(sc, capa, XHCI_CAPLENGTH); + sc->sc_runt_off = XREAD4(sc, capa, XHCI_RTSOFF) & ~0x1F; + sc->sc_door_off = XREAD4(sc, capa, XHCI_DBOFF) & ~0x3; + + DPRINTF("CAPLENGTH=0x%x\n", sc->sc_oper_off); + DPRINTF("RUNTIMEOFFSET=0x%x\n", sc->sc_runt_off); + DPRINTF("DOOROFFSET=0x%x\n", sc->sc_door_off); + + DPRINTF("xHCI version = 0x%04x\n", XREAD2(sc, capa, XHCI_HCIVERSION)); + + temp = XREAD4(sc, capa, XHCI_HCSPARAMS0); + + DPRINTF("HCS0 = 0x%08x\n", temp); + + /* set up context size */ + if (XHCI_HCS0_CSZ(temp)) { + sc->sc_ctx_is_64_byte = 1; + } else { + sc->sc_ctx_is_64_byte = 0; + } + + /* get DMA bits */ + sc->sc_bus.dma_bits = XHCI_HCS0_AC64(temp) ? 64 : 32; + + device_printf(self, "%d bytes context size, %d-bit DMA\n", + sc->sc_ctx_is_64_byte ? 64 : 32, (int)sc->sc_bus.dma_bits); /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, @@ -621,16 +627,20 @@ xhci_init(struct xhci_softc *sc, device_ return (ENOMEM); } - sc->sc_config_msg[0].hdr.pm_callback = &xhci_configure_msg; - sc->sc_config_msg[0].bus = &sc->sc_bus; - sc->sc_config_msg[1].hdr.pm_callback = &xhci_configure_msg; - sc->sc_config_msg[1].bus = &sc->sc_bus; + /* set up command queue mutex and condition varible */ + cv_init(&sc->sc_cmd_cv, "CMDQ"); + sx_init(&sc->sc_cmd_sx, "CMDQ lock"); if (usb_proc_create(&sc->sc_config_proc, &sc->sc_bus.bus_mtx, device_get_nameunit(self), USB_PRI_MED)) { printf("WARNING: Creation of XHCI configure " "callback process failed.\n"); } + sc->sc_config_msg[0].hdr.pm_callback = &xhci_configure_msg; + sc->sc_config_msg[0].bus = &sc->sc_bus; + sc->sc_config_msg[1].hdr.pm_callback = &xhci_configure_msg; + sc->sc_config_msg[1].bus = &sc->sc_bus; + return (0); } @@ -1795,7 +1805,7 @@ restart: npkt_off += buf_res.length; } - /* setup npkt */ + /* set up npkt */ npkt = (len_old - npkt_off + temp->max_packet_size - 1) / temp->max_packet_size; @@ -1912,7 +1922,7 @@ restart: if (precompute) { precompute = 0; - /* setup alt next pointer, if any */ + /* set up alt next pointer, if any */ if (temp->last_frame) { td_alt_next = NULL; } else { @@ -2089,7 +2099,7 @@ xhci_setup_generic_chain(struct usb_xfer } if (x != xfer->nframes) { - /* setup page_cache pointer */ + /* set up page_cache pointer */ temp.pc = xfer->frbuffers + x; /* set endpoint direction */ temp.direction = UE_GET_DIR(xfer->endpointno); @@ -3020,7 +3030,7 @@ xhci_device_generic_enter(struct usb_xfe { DPRINTF("\n"); - /* setup TD's and QH */ + /* set up TD's and QH */ xhci_setup_generic_chain(xfer); xhci_device_generic_multi_enter(xfer->endpoint, xfer); Modified: stable/9/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci_pci.c Thu Feb 5 20:03:02 2015 (r278278) +++ stable/9/sys/dev/usb/controller/xhci_pci.c Thu Feb 5 20:15:42 2015 (r278279) @@ -181,26 +181,26 @@ xhci_pci_attach(device_t self) struct xhci_softc *sc = device_get_softc(self); int count, err, rid; - /* XXX check for 64-bit capability */ - - if (xhci_init(sc, self)) { - device_printf(self, "Could not initialize softc\n"); - goto error; - } - - pci_enable_busmaster(self); - rid = PCI_XHCI_CBMEM; sc->sc_io_res = bus_alloc_resource_any(self, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (!sc->sc_io_res) { device_printf(self, "Could not map memory\n"); - goto error; + return (ENOMEM); } sc->sc_io_tag = rman_get_bustag(sc->sc_io_res); sc->sc_io_hdl = rman_get_bushandle(sc->sc_io_res); sc->sc_io_size = rman_get_size(sc->sc_io_res); + if (xhci_init(sc, self)) { + device_printf(self, "Could not initialize softc\n"); + bus_release_resource(self, SYS_RES_MEMORY, PCI_XHCI_CBMEM, + sc->sc_io_res); + return (ENXIO); + } + + pci_enable_busmaster(self); + usb_callout_init_mtx(&sc->sc_callout, &sc->sc_bus.bus_mtx, 0); rid = 0; @@ -299,10 +299,8 @@ xhci_pci_detach(device_t self) /* during module unload there are lots of children leftover */ device_delete_children(self); - if (sc->sc_io_res) { - usb_callout_drain(&sc->sc_callout); - xhci_halt_controller(sc); - } + usb_callout_drain(&sc->sc_callout); + xhci_halt_controller(sc); pci_disable_busmaster(self); Modified: stable/9/sys/dev/usb/usb_bus.h ============================================================================== --- stable/9/sys/dev/usb/usb_bus.h Thu Feb 5 20:03:02 2015 (r278278) +++ stable/9/sys/dev/usb/usb_bus.h Thu Feb 5 20:15:42 2015 (r278279) @@ -104,6 +104,7 @@ struct usb_bus { uint8_t devices_max; /* maximum number of USB devices */ uint8_t do_probe; /* set if USB should be re-probed */ uint8_t no_explore; /* don't explore USB ports */ + uint8_t dma_bits; /* number of DMA address lines */ }; #endif /* _USB_BUS_H_ */ Modified: stable/9/sys/dev/usb/usb_busdma.h ============================================================================== --- stable/9/sys/dev/usb/usb_busdma.h Thu Feb 5 20:03:02 2015 (r278278) +++ stable/9/sys/dev/usb/usb_busdma.h Thu Feb 5 20:15:42 2015 (r278279) @@ -60,7 +60,7 @@ typedef void (usb_dma_callback_t)(struct */ struct usb_page { #if USB_HAVE_BUSDMA - bus_size_t physaddr; + bus_addr_t physaddr; void *buffer; /* non Kernel Virtual Address */ #endif }; @@ -73,7 +73,7 @@ struct usb_page { struct usb_page_search { void *buffer; #if USB_HAVE_BUSDMA - bus_size_t physaddr; + bus_addr_t physaddr; #endif usb_size_t length; }; Modified: stable/9/sys/dev/usb/usb_transfer.c ============================================================================== --- stable/9/sys/dev/usb/usb_transfer.c Thu Feb 5 20:03:02 2015 (r278278) +++ stable/9/sys/dev/usb/usb_transfer.c Thu Feb 5 20:15:42 2015 (r278279) @@ -915,7 +915,8 @@ usbd_transfer_setup(struct usb_device *u #if USB_HAVE_BUSDMA usb_dma_tag_setup(&info->dma_parent_tag, parm->dma_tag_p, udev->bus->dma_parent_tag[0].tag, - xfer_mtx, &usb_bdma_done_event, 32, parm->dma_tag_max); + xfer_mtx, &usb_bdma_done_event, udev->bus->dma_bits, + parm->dma_tag_max); #endif info->bus = udev->bus; Modified: stable/9/sys/mips/atheros/ar71xx_ehci.c ============================================================================== --- stable/9/sys/mips/atheros/ar71xx_ehci.c Thu Feb 5 20:03:02 2015 (r278278) +++ stable/9/sys/mips/atheros/ar71xx_ehci.c Thu Feb 5 20:15:42 2015 (r278279) @@ -90,6 +90,7 @@ ar71xx_ehci_attach(device_t self) sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, Modified: stable/9/sys/mips/atheros/ar71xx_ohci.c ============================================================================== --- stable/9/sys/mips/atheros/ar71xx_ohci.c Thu Feb 5 20:03:02 2015 (r278278) +++ stable/9/sys/mips/atheros/ar71xx_ohci.c Thu Feb 5 20:15:42 2015 (r278279) @@ -76,6 +76,7 @@ ar71xx_ohci_attach(device_t dev) sc->sc_ohci.sc_bus.parent = dev; sc->sc_ohci.sc_bus.devices = sc->sc_ohci.sc_devices; sc->sc_ohci.sc_bus.devices_max = OHCI_MAX_DEVICES; + sc->sc_ohci.sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_ohci.sc_bus, Modified: stable/9/sys/mips/cavium/usb/octusb_octeon.c ============================================================================== --- stable/9/sys/mips/cavium/usb/octusb_octeon.c Thu Feb 5 20:03:02 2015 (r278278) +++ stable/9/sys/mips/cavium/usb/octusb_octeon.c Thu Feb 5 20:15:42 2015 (r278279) @@ -101,6 +101,7 @@ octusb_octeon_attach(device_t dev) sc->sc_dci.sc_bus.parent = dev; sc->sc_dci.sc_bus.devices = sc->sc_dci.sc_devices; sc->sc_dci.sc_bus.devices_max = OCTUSB_MAX_DEVICES; + sc->sc_dci.sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_dci.sc_bus, Modified: stable/9/sys/mips/rmi/xls_ehci.c ============================================================================== --- stable/9/sys/mips/rmi/xls_ehci.c Thu Feb 5 20:03:02 2015 (r278278) +++ stable/9/sys/mips/rmi/xls_ehci.c Thu Feb 5 20:15:42 2015 (r278279) @@ -93,6 +93,7 @@ ehci_xls_attach(device_t self) sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, Modified: stable/9/sys/mips/rt305x/rt305x_dotg.c ============================================================================== --- stable/9/sys/mips/rt305x/rt305x_dotg.c Thu Feb 5 20:03:02 2015 (r278278) +++ stable/9/sys/mips/rt305x/rt305x_dotg.c Thu Feb 5 20:15:42 2015 (r278279) @@ -92,6 +92,7 @@ dotg_obio_attach(device_t dev) sc->sc_dci.sc_bus.parent = dev; sc->sc_dci.sc_bus.devices = sc->sc_dci.sc_devices; sc->sc_dci.sc_bus.devices_max = DOTG_MAX_DEVICES; + sc->sc_dci.sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_dci.sc_bus, Modified: stable/9/sys/powerpc/ps3/ehci_ps3.c ============================================================================== --- stable/9/sys/powerpc/ps3/ehci_ps3.c Thu Feb 5 20:03:02 2015 (r278278) +++ stable/9/sys/powerpc/ps3/ehci_ps3.c Thu Feb 5 20:15:42 2015 (r278279) @@ -89,7 +89,9 @@ ehci_ps3_attach(device_t dev) sc->sc_bus.parent = dev; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; + /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(dev), &ehci_iterate_hw_softc)) return (ENOMEM); Modified: stable/9/sys/powerpc/ps3/ohci_ps3.c ============================================================================== --- stable/9/sys/powerpc/ps3/ohci_ps3.c Thu Feb 5 20:03:02 2015 (r278278) +++ stable/9/sys/powerpc/ps3/ohci_ps3.c Thu Feb 5 20:15:42 2015 (r278279) @@ -85,7 +85,9 @@ ohci_ps3_attach(device_t dev) sc->sc_bus.parent = dev; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = OHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; + /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(dev), &ohci_iterate_hw_softc)) return (ENOMEM); From owner-svn-src-stable@FreeBSD.ORG Thu Feb 5 20:49:15 2015 Return-Path: Delivered-To: svn-src-stable@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 5D467A39; Thu, 5 Feb 2015 20:49:15 +0000 (UTC) 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 4841C965; Thu, 5 Feb 2015 20:49:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t15KnFiU038775; Thu, 5 Feb 2015 20:49:15 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t15KnEHv038772; Thu, 5 Feb 2015 20:49:14 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502052049.t15KnEHv038772@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 5 Feb 2015 20: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: r278283 - in stable/10/sys: fs/devfs kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2015 20:49:15 -0000 Author: hselasky Date: Thu Feb 5 20:49:13 2015 New Revision: 278283 URL: https://svnweb.freebsd.org/changeset/base/278283 Log: MFC r277179, r277199 and r277391: Add a kernel function to delist our kernel character devices, so that the device name can be re-used right away in case we are destroying the character devices in the background. Modified: stable/10/sys/fs/devfs/devfs_int.h stable/10/sys/kern/kern_conf.c stable/10/sys/sys/conf.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/devfs/devfs_int.h ============================================================================== --- stable/10/sys/fs/devfs/devfs_int.h Thu Feb 5 20:45:50 2015 (r278282) +++ stable/10/sys/fs/devfs/devfs_int.h Thu Feb 5 20:49:13 2015 (r278283) @@ -56,6 +56,7 @@ struct cdev_priv { u_int cdp_flags; #define CDP_ACTIVE (1 << 0) #define CDP_SCHED_DTR (1 << 1) +#define CDP_UNREF_DTR (1 << 2) u_int cdp_inuse; u_int cdp_maxdirent; Modified: stable/10/sys/kern/kern_conf.c ============================================================================== --- stable/10/sys/kern/kern_conf.c Thu Feb 5 20:45:50 2015 (r278282) +++ stable/10/sys/kern/kern_conf.c Thu Feb 5 20:49:13 2015 (r278283) @@ -116,6 +116,8 @@ dev_free_devlocked(struct cdev *cdev) mtx_assert(&devmtx, MA_OWNED); cdp = cdev2priv(cdev); + KASSERT((cdp->cdp_flags & CDP_UNREF_DTR) == 0, + ("destroy_dev() was not called after delist_dev(%p)", cdev)); TAILQ_INSERT_HEAD(&cdevp_free_list, cdp, cdp_list); } @@ -1035,6 +1037,7 @@ destroy_devl(struct cdev *dev) { struct cdevsw *csw; struct cdev_privdata *p; + struct cdev_priv *cdp; mtx_assert(&devmtx, MA_OWNED); KASSERT(dev->si_flags & SI_NAMED, @@ -1043,13 +1046,22 @@ destroy_devl(struct cdev *dev) ("WARNING: Driver mistake: destroy_dev on eternal %d\n", dev2unit(dev))); - devfs_destroy(dev); + cdp = cdev2priv(dev); + if ((cdp->cdp_flags & CDP_UNREF_DTR) == 0) { + /* + * Avoid race with dev_rel(), e.g. from the populate + * loop. If CDP_UNREF_DTR flag is set, the reference + * to be dropped at the end of destroy_devl() was + * already taken by delist_dev_locked(). + */ + dev_refl(dev); + + devfs_destroy(dev); + } /* Remove name marking */ dev->si_flags &= ~SI_NAMED; - dev->si_refcount++; /* Avoid race with dev_rel() */ - /* If we are a child, remove us from the parents list */ if (dev->si_flags & SI_CHILD) { LIST_REMOVE(dev, si_siblings); @@ -1105,13 +1117,39 @@ destroy_devl(struct cdev *dev) } } dev->si_flags &= ~SI_ALIAS; - dev->si_refcount--; /* Avoid race with dev_rel() */ + cdp->cdp_flags &= ~CDP_UNREF_DTR; + dev->si_refcount--; - if (dev->si_refcount > 0) { + if (dev->si_refcount > 0) LIST_INSERT_HEAD(&dead_cdevsw.d_devs, dev, si_list); - } else { + else dev_free_devlocked(dev); - } +} + +static void +delist_dev_locked(struct cdev *dev) +{ + struct cdev_priv *cdp; + struct cdev *child; + + mtx_assert(&devmtx, MA_OWNED); + cdp = cdev2priv(dev); + if ((cdp->cdp_flags & CDP_UNREF_DTR) != 0) + return; + cdp->cdp_flags |= CDP_UNREF_DTR; + dev_refl(dev); + devfs_destroy(dev); + LIST_FOREACH(child, &dev->si_children, si_siblings) + delist_dev_locked(child); +} + +void +delist_dev(struct cdev *dev) +{ + + dev_lock(); + delist_dev_locked(dev); + dev_unlock(); } void Modified: stable/10/sys/sys/conf.h ============================================================================== --- stable/10/sys/sys/conf.h Thu Feb 5 20:45:50 2015 (r278282) +++ stable/10/sys/sys/conf.h Thu Feb 5 20:49:13 2015 (r278283) @@ -245,6 +245,7 @@ void clone_cleanup(struct clonedevs **); int clone_create(struct clonedevs **, struct cdevsw *, int *unit, struct cdev **dev, int extra); int count_dev(struct cdev *_dev); +void delist_dev(struct cdev *_dev); void destroy_dev(struct cdev *_dev); int destroy_dev_sched(struct cdev *dev); int destroy_dev_sched_cb(struct cdev *dev, void (*cb)(void *), void *arg); From owner-svn-src-stable@FreeBSD.ORG Thu Feb 5 20:59:04 2015 Return-Path: Delivered-To: svn-src-stable@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 9E8FA22B; Thu, 5 Feb 2015 20:59:04 +0000 (UTC) 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 8A363A76; Thu, 5 Feb 2015 20:59:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t15Kx4da043715; Thu, 5 Feb 2015 20:59:04 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t15Kx4BR043714; Thu, 5 Feb 2015 20:59:04 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201502052059.t15Kx4BR043714@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 5 Feb 2015 20:59: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: r278286 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2015 20:59:04 -0000 Author: jhb Date: Thu Feb 5 20:59:03 2015 New Revision: 278286 URL: https://svnweb.freebsd.org/changeset/base/278286 Log: MFC 274402: Add device ID for the T502-BT (dual-port 1G) adapter. Modified: stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Thu Feb 5 20:55:55 2015 (r278285) +++ stable/10/sys/dev/cxgbe/t4_main.c Thu Feb 5 20:59:03 2015 (r278286) @@ -488,6 +488,7 @@ struct { {0x5411, "Chelsio T520-LL-CR"}, /* 2 x 10G */ {0x5412, "Chelsio T560-CR"}, /* 1 x 40G, 2 x 10G */ {0x5414, "Chelsio T580-LP-SO-CR"}, /* 2 x 40G, nomem */ + {0x5415, "Chelsio T502-BT"}, /* 2 x 1G */ #ifdef notyet {0x5404, "Chelsio T520-BCH"}, {0x5405, "Chelsio T540-BCH"}, From owner-svn-src-stable@FreeBSD.ORG Thu Feb 5 20:59:22 2015 Return-Path: Delivered-To: svn-src-stable@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 2C1FF353; Thu, 5 Feb 2015 20:59:22 +0000 (UTC) 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 17A7CA7A; Thu, 5 Feb 2015 20:59:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t15KxLFF043797; Thu, 5 Feb 2015 20:59:21 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t15KxLGS043796; Thu, 5 Feb 2015 20:59:21 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201502052059.t15KxLGS043796@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 5 Feb 2015 20:59:21 +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: r278287 - stable/9/sys/dev/cxgbe 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2015 20:59:22 -0000 Author: jhb Date: Thu Feb 5 20:59:21 2015 New Revision: 278287 URL: https://svnweb.freebsd.org/changeset/base/278287 Log: MFC 274402: Add device ID for the T502-BT (dual-port 1G) adapter. Modified: stable/9/sys/dev/cxgbe/t4_main.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_main.c Thu Feb 5 20:59:03 2015 (r278286) +++ stable/9/sys/dev/cxgbe/t4_main.c Thu Feb 5 20:59:21 2015 (r278287) @@ -469,6 +469,7 @@ struct { {0x5411, "Chelsio T520-LL-CR"}, /* 2 x 10G */ {0x5412, "Chelsio T560-CR"}, /* 1 x 40G, 2 x 10G */ {0x5414, "Chelsio T580-LP-SO-CR"}, /* 2 x 40G, nomem */ + {0x5415, "Chelsio T502-BT"}, /* 2 x 1G */ #ifdef notyet {0x5404, "Chelsio T520-BCH"}, {0x5405, "Chelsio T540-BCH"}, From owner-svn-src-stable@FreeBSD.ORG Thu Feb 5 20:59:50 2015 Return-Path: Delivered-To: svn-src-stable@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 EFC074CB; Thu, 5 Feb 2015 20:59:49 +0000 (UTC) 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 DB794A84; Thu, 5 Feb 2015 20:59:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t15Kxnmc043901; Thu, 5 Feb 2015 20:59:49 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t15KxnWB043900; Thu, 5 Feb 2015 20:59:49 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201502052059.t15KxnWB043900@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 5 Feb 2015 20:59:49 +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: r278288 - stable/8/sys/dev/cxgbe X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2015 20:59:50 -0000 Author: jhb Date: Thu Feb 5 20:59:48 2015 New Revision: 278288 URL: https://svnweb.freebsd.org/changeset/base/278288 Log: MFC 274402: Add device ID for the T502-BT (dual-port 1G) adapter. Modified: stable/8/sys/dev/cxgbe/t4_main.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/cxgbe/ (props changed) Modified: stable/8/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/8/sys/dev/cxgbe/t4_main.c Thu Feb 5 20:59:21 2015 (r278287) +++ stable/8/sys/dev/cxgbe/t4_main.c Thu Feb 5 20:59:48 2015 (r278288) @@ -468,6 +468,7 @@ struct { {0x5411, "Chelsio T520-LL-CR"}, /* 2 x 10G */ {0x5412, "Chelsio T560-CR"}, /* 1 x 40G, 2 x 10G */ {0x5414, "Chelsio T580-LP-SO-CR"}, /* 2 x 40G, nomem */ + {0x5415, "Chelsio T502-BT"}, /* 2 x 1G */ #ifdef notyet {0x5404, "Chelsio T520-BCH"}, {0x5405, "Chelsio T540-BCH"}, From owner-svn-src-stable@FreeBSD.ORG Thu Feb 5 21:18:46 2015 Return-Path: Delivered-To: svn-src-stable@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 937A8CF6; Thu, 5 Feb 2015 21:18:46 +0000 (UTC) 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 740A2D26; Thu, 5 Feb 2015 21:18:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t15LIkjX053898; Thu, 5 Feb 2015 21:18:46 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t15LIjmi053890; Thu, 5 Feb 2015 21:18:45 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502052118.t15LIjmi053890@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 5 Feb 2015 21:18: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: r278289 - in 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-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2015 21:18:46 -0000 Author: hselasky Date: Thu Feb 5 21:18:44 2015 New Revision: 278289 URL: https://svnweb.freebsd.org/changeset/base/278289 Log: MFC r277136: Resolve a special case deadlock: When two or more threads are simultaneously detaching kernel drivers on the same USB device we can get stuck in the "usb_wait_pending_ref_locked()" function because the conditions needed for allowing detach are not met. While at it ensure that "flag_iserror" is only written when "priv_mtx" is locked, which is protecting it. Modified: stable/10/sys/dev/usb/controller/usb_controller.c stable/10/sys/dev/usb/usb_bus.h stable/10/sys/dev/usb/usb_dev.c stable/10/sys/dev/usb/usb_device.c stable/10/sys/dev/usb/usb_device.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/usb_controller.c ============================================================================== --- stable/10/sys/dev/usb/controller/usb_controller.c Thu Feb 5 20:59:48 2015 (r278288) +++ stable/10/sys/dev/usb/controller/usb_controller.c Thu Feb 5 21:18:44 2015 (r278289) @@ -59,6 +59,7 @@ #include #include #include +#include #include #include @@ -221,6 +222,11 @@ usb_detach(device_t dev) usb_proc_mwait(USB_BUS_EXPLORE_PROC(bus), &bus->detach_msg[0], &bus->detach_msg[1]); +#if USB_HAVE_UGEN + /* Wait for cleanup to complete */ + usb_proc_mwait(USB_BUS_EXPLORE_PROC(bus), + &bus->cleanup_msg[0], &bus->cleanup_msg[1]); +#endif USB_BUS_UNLOCK(bus); #if USB_HAVE_PER_BUS_PROCESS @@ -633,6 +639,32 @@ usb_bus_shutdown(struct usb_proc_msg *pm USB_BUS_LOCK(bus); } +/*------------------------------------------------------------------------* + * usb_bus_cleanup + * + * This function is used to cleanup leftover USB character devices. + *------------------------------------------------------------------------*/ +#if USB_HAVE_UGEN +static void +usb_bus_cleanup(struct usb_proc_msg *pm) +{ + struct usb_bus *bus; + struct usb_fs_privdata *pd; + + bus = ((struct usb_bus_msg *)pm)->bus; + + while ((pd = LIST_FIRST(&bus->pd_cleanup_list)) != NULL) { + + LIST_REMOVE(pd, pd_next); + USB_BUS_UNLOCK(bus); + + usb_destroy_dev_sync(pd); + + USB_BUS_LOCK(bus); + } +} +#endif + static void usb_power_wdog(void *arg) { @@ -815,6 +847,14 @@ usb_attach_sub(device_t dev, struct usb_ bus->shutdown_msg[1].hdr.pm_callback = &usb_bus_shutdown; bus->shutdown_msg[1].bus = bus; +#if USB_HAVE_UGEN + LIST_INIT(&bus->pd_cleanup_list); + bus->cleanup_msg[0].hdr.pm_callback = &usb_bus_cleanup; + bus->cleanup_msg[0].bus = bus; + bus->cleanup_msg[1].hdr.pm_callback = &usb_bus_cleanup; + bus->cleanup_msg[1].bus = bus; +#endif + #if USB_HAVE_PER_BUS_PROCESS /* Create USB explore and callback processes */ Modified: stable/10/sys/dev/usb/usb_bus.h ============================================================================== --- stable/10/sys/dev/usb/usb_bus.h Thu Feb 5 20:59:48 2015 (r278288) +++ stable/10/sys/dev/usb/usb_bus.h Thu Feb 5 21:18:44 2015 (r278289) @@ -27,6 +27,8 @@ #ifndef _USB_BUS_H_ #define _USB_BUS_H_ +struct usb_fs_privdata; + /* * The following structure defines the USB explore message sent to the USB * explore process. @@ -83,6 +85,10 @@ struct usb_bus { struct usb_bus_msg resume_msg[2]; struct usb_bus_msg reset_msg[2]; struct usb_bus_msg shutdown_msg[2]; +#if USB_HAVE_UGEN + struct usb_bus_msg cleanup_msg[2]; + LIST_HEAD(,usb_fs_privdata) pd_cleanup_list; +#endif /* * This mutex protects the USB hardware: */ Modified: stable/10/sys/dev/usb/usb_dev.c ============================================================================== --- stable/10/sys/dev/usb/usb_dev.c Thu Feb 5 20:59:48 2015 (r278288) +++ stable/10/sys/dev/usb/usb_dev.c Thu Feb 5 21:18:44 2015 (r278289) @@ -294,8 +294,8 @@ error: usbd_enum_unlock(cpd->udev); if (crd->is_uref) { - cpd->udev->refcount--; - cv_broadcast(&cpd->udev->ref_cv); + if (--(cpd->udev->refcount) == 0) + cv_broadcast(&cpd->udev->ref_cv); } mtx_unlock(&usb_ref_lock); DPRINTFN(2, "fail\n"); @@ -366,8 +366,8 @@ usb_unref_device(struct usb_cdev_privdat } if (crd->is_uref) { crd->is_uref = 0; - cpd->udev->refcount--; - cv_broadcast(&cpd->udev->ref_cv); + if (--(cpd->udev->refcount) == 0) + cv_broadcast(&cpd->udev->ref_cv); } mtx_unlock(&usb_ref_lock); } @@ -593,12 +593,12 @@ usb_fifo_free(struct usb_fifo *f) /* decrease refcount */ f->refcount--; - /* prevent any write flush */ - f->flag_iserror = 1; /* need to wait until all callers have exited */ while (f->refcount != 0) { mtx_unlock(&usb_ref_lock); /* avoid LOR */ mtx_lock(f->priv_mtx); + /* prevent write flush, if any */ + f->flag_iserror = 1; /* get I/O thread out of any sleep state */ if (f->flag_sleeping) { f->flag_sleeping = 0; Modified: stable/10/sys/dev/usb/usb_device.c ============================================================================== --- stable/10/sys/dev/usb/usb_device.c Thu Feb 5 20:59:48 2015 (r278288) +++ stable/10/sys/dev/usb/usb_device.c Thu Feb 5 21:18:44 2015 (r278289) @@ -451,68 +451,29 @@ usb_endpoint_foreach(struct usb_device * return (NULL); } -#if USB_HAVE_UGEN -static uint16_t -usb_get_refcount(struct usb_device *udev) -{ - if (usb_proc_is_called_from(USB_BUS_EXPLORE_PROC(udev->bus)) || - usb_proc_is_called_from(USB_BUS_CONTROL_XFER_PROC(udev->bus))) - return (1); - return (2); -} -#endif - /*------------------------------------------------------------------------* - * usb_wait_pending_ref_locked + * usb_wait_pending_refs * * This function will wait for any USB references to go away before - * returning and disable further USB device refcounting on the - * specified USB device. This function is used when detaching a USB - * device. + * returning. This function is used before freeing a USB device. *------------------------------------------------------------------------*/ static void -usb_wait_pending_ref_locked(struct usb_device *udev) +usb_wait_pending_refs(struct usb_device *udev) { #if USB_HAVE_UGEN - const uint16_t refcount = usb_get_refcount(udev); - - DPRINTF("Refcount = %d\n", (int)refcount); + DPRINTF("Refcount = %d\n", (int)udev->refcount); + mtx_lock(&usb_ref_lock); + udev->refcount--; while (1) { /* wait for any pending references to go away */ - mtx_lock(&usb_ref_lock); - if (udev->refcount == refcount) { - /* prevent further refs being taken */ + if (udev->refcount == 0) { + /* prevent further refs being taken, if any */ udev->refcount = USB_DEV_REF_MAX; - mtx_unlock(&usb_ref_lock); break; } - usbd_enum_unlock(udev); cv_wait(&udev->ref_cv, &usb_ref_lock); - mtx_unlock(&usb_ref_lock); - (void) usbd_enum_lock(udev); } -#endif -} - -/*------------------------------------------------------------------------* - * usb_ref_restore_locked - * - * This function will restore the reference count value after a call - * to "usb_wait_pending_ref_locked()". - *------------------------------------------------------------------------*/ -static void -usb_ref_restore_locked(struct usb_device *udev) -{ -#if USB_HAVE_UGEN - const uint16_t refcount = usb_get_refcount(udev); - - DPRINTF("Refcount = %d\n", (int)refcount); - - /* restore reference count and wakeup waiters, if any */ - mtx_lock(&usb_ref_lock); - udev->refcount = refcount; - cv_broadcast(&udev->ref_cv); mtx_unlock(&usb_ref_lock); #endif } @@ -1189,9 +1150,6 @@ usb_detach_device(struct usb_device *ude sx_assert(&udev->enum_sx, SA_LOCKED); - /* wait for pending refs to go away */ - usb_wait_pending_ref_locked(udev); - /* * First detach the child to give the child's detach routine a * chance to detach the sub-devices in the correct order. @@ -1218,8 +1176,6 @@ usb_detach_device(struct usb_device *ude usb_detach_device_sub(udev, &iface->subdev, &iface->pnpinfo, flag); } - - usb_ref_restore_locked(udev); } /*------------------------------------------------------------------------* @@ -2036,14 +1992,46 @@ usb_make_dev(struct usb_device *udev, co } void +usb_destroy_dev_sync(struct usb_fs_privdata *pd) +{ + DPRINTFN(1, "Destroying device at ugen%d.%d\n", + pd->bus_index, pd->dev_index); + + /* + * Destroy character device synchronously. After this + * all system calls are returned. Can block. + */ + destroy_dev(pd->cdev); + + free(pd, M_USBDEV); +} + +void usb_destroy_dev(struct usb_fs_privdata *pd) { + struct usb_bus *bus; + if (pd == NULL) return; - destroy_dev(pd->cdev); + mtx_lock(&usb_ref_lock); + bus = devclass_get_softc(usb_devclass_ptr, pd->bus_index); + mtx_unlock(&usb_ref_lock); - free(pd, M_USBDEV); + if (bus == NULL) { + usb_destroy_dev_sync(pd); + return; + } + + /* make sure we can re-use the device name */ + delist_dev(pd->cdev); + + USB_BUS_LOCK(bus); + LIST_INSERT_HEAD(&bus->pd_cleanup_list, pd, pd_next); + /* get cleanup going */ + usb_proc_msignal(USB_BUS_EXPLORE_PROC(bus), + &bus->cleanup_msg[0], &bus->cleanup_msg[1]); + USB_BUS_UNLOCK(bus); } static void @@ -2194,6 +2182,9 @@ usb_free_device(struct usb_device *udev, &udev->cs_msg[0], &udev->cs_msg[1]); USB_BUS_UNLOCK(udev->bus); + /* wait for all references to go away */ + usb_wait_pending_refs(udev); + sx_destroy(&udev->enum_sx); sx_destroy(&udev->sr_sx); @@ -2679,14 +2670,8 @@ usb_fifo_free_wrap(struct usb_device *ud /* no need to free this FIFO */ continue; } - /* wait for pending refs to go away */ - usb_wait_pending_ref_locked(udev); - /* free this FIFO */ usb_fifo_free(f); - - /* restore refcount */ - usb_ref_restore_locked(udev); } } #endif Modified: stable/10/sys/dev/usb/usb_device.h ============================================================================== --- stable/10/sys/dev/usb/usb_device.h Thu Feb 5 20:59:48 2015 (r278288) +++ stable/10/sys/dev/usb/usb_device.h Thu Feb 5 21:18:44 2015 (r278289) @@ -293,6 +293,7 @@ struct usb_device *usb_alloc_device(devi struct usb_fs_privdata *usb_make_dev(struct usb_device *, const char *, int, int, int, uid_t, gid_t, int); void usb_destroy_dev(struct usb_fs_privdata *); +void usb_destroy_dev_sync(struct usb_fs_privdata *); #endif usb_error_t usb_probe_and_attach(struct usb_device *udev, uint8_t iface_index); From owner-svn-src-stable@FreeBSD.ORG Thu Feb 5 21:25:13 2015 Return-Path: Delivered-To: svn-src-stable@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 7B1C6F1; Thu, 5 Feb 2015 21:25:13 +0000 (UTC) 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 6610FE03; Thu, 5 Feb 2015 21:25:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t15LPDKR058256; Thu, 5 Feb 2015 21:25:13 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t15LPC7l058247; Thu, 5 Feb 2015 21:25:12 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502052125.t15LPC7l058247@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 5 Feb 2015 21:25:12 +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: r278290 - in stable/9/sys: fs/devfs kern 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2015 21:25:13 -0000 Author: hselasky Date: Thu Feb 5 21:25:11 2015 New Revision: 278290 URL: https://svnweb.freebsd.org/changeset/base/278290 Log: MFC r277179, r277199 and r277391: Add a kernel function to delist our kernel character devices, so that the device name can be re-used right away in case we are destroying the character devices in the background. Modified: stable/9/sys/fs/devfs/devfs_int.h stable/9/sys/kern/kern_conf.c stable/9/sys/sys/conf.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/fs/devfs/devfs_int.h ============================================================================== --- stable/9/sys/fs/devfs/devfs_int.h Thu Feb 5 21:18:44 2015 (r278289) +++ stable/9/sys/fs/devfs/devfs_int.h Thu Feb 5 21:25:11 2015 (r278290) @@ -56,6 +56,7 @@ struct cdev_priv { u_int cdp_flags; #define CDP_ACTIVE (1 << 0) #define CDP_SCHED_DTR (1 << 1) +#define CDP_UNREF_DTR (1 << 2) u_int cdp_inuse; u_int cdp_maxdirent; Modified: stable/9/sys/kern/kern_conf.c ============================================================================== --- stable/9/sys/kern/kern_conf.c Thu Feb 5 21:18:44 2015 (r278289) +++ stable/9/sys/kern/kern_conf.c Thu Feb 5 21:25:11 2015 (r278290) @@ -115,6 +115,8 @@ dev_free_devlocked(struct cdev *cdev) mtx_assert(&devmtx, MA_OWNED); cdp = cdev2priv(cdev); + KASSERT((cdp->cdp_flags & CDP_UNREF_DTR) == 0, + ("destroy_dev() was not called after delist_dev(%p)", cdev)); TAILQ_INSERT_HEAD(&cdevp_free_list, cdp, cdp_list); } @@ -1030,6 +1032,7 @@ destroy_devl(struct cdev *dev) { struct cdevsw *csw; struct cdev_privdata *p; + struct cdev_priv *cdp; mtx_assert(&devmtx, MA_OWNED); KASSERT(dev->si_flags & SI_NAMED, @@ -1038,13 +1041,22 @@ destroy_devl(struct cdev *dev) ("WARNING: Driver mistake: destroy_dev on eternal %d\n", dev2unit(dev))); - devfs_destroy(dev); + cdp = cdev2priv(dev); + if ((cdp->cdp_flags & CDP_UNREF_DTR) == 0) { + /* + * Avoid race with dev_rel(), e.g. from the populate + * loop. If CDP_UNREF_DTR flag is set, the reference + * to be dropped at the end of destroy_devl() was + * already taken by delist_dev_locked(). + */ + dev_refl(dev); + + devfs_destroy(dev); + } /* Remove name marking */ dev->si_flags &= ~SI_NAMED; - dev->si_refcount++; /* Avoid race with dev_rel() */ - /* If we are a child, remove us from the parents list */ if (dev->si_flags & SI_CHILD) { LIST_REMOVE(dev, si_siblings); @@ -1100,13 +1112,39 @@ destroy_devl(struct cdev *dev) } } dev->si_flags &= ~SI_ALIAS; - dev->si_refcount--; /* Avoid race with dev_rel() */ + cdp->cdp_flags &= ~CDP_UNREF_DTR; + dev->si_refcount--; - if (dev->si_refcount > 0) { + if (dev->si_refcount > 0) LIST_INSERT_HEAD(&dead_cdevsw.d_devs, dev, si_list); - } else { + else dev_free_devlocked(dev); - } +} + +static void +delist_dev_locked(struct cdev *dev) +{ + struct cdev_priv *cdp; + struct cdev *child; + + mtx_assert(&devmtx, MA_OWNED); + cdp = cdev2priv(dev); + if ((cdp->cdp_flags & CDP_UNREF_DTR) != 0) + return; + cdp->cdp_flags |= CDP_UNREF_DTR; + dev_refl(dev); + devfs_destroy(dev); + LIST_FOREACH(child, &dev->si_children, si_siblings) + delist_dev_locked(child); +} + +void +delist_dev(struct cdev *dev) +{ + + dev_lock(); + delist_dev_locked(dev); + dev_unlock(); } void Modified: stable/9/sys/sys/conf.h ============================================================================== --- stable/9/sys/sys/conf.h Thu Feb 5 21:18:44 2015 (r278289) +++ stable/9/sys/sys/conf.h Thu Feb 5 21:25:11 2015 (r278290) @@ -247,6 +247,7 @@ void clone_cleanup(struct clonedevs **); int clone_create(struct clonedevs **, struct cdevsw *, int *unit, struct cdev **dev, int extra); int count_dev(struct cdev *_dev); +void delist_dev(struct cdev *_dev); void destroy_dev(struct cdev *_dev); int destroy_dev_sched(struct cdev *dev); int destroy_dev_sched_cb(struct cdev *dev, void (*cb)(void *), void *arg); From owner-svn-src-stable@FreeBSD.ORG Thu Feb 5 21:38:01 2015 Return-Path: Delivered-To: svn-src-stable@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 44A5D7FA; Thu, 5 Feb 2015 21:38:01 +0000 (UTC) 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 2530CF8F; Thu, 5 Feb 2015 21:38:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t15Lc1sQ063328; Thu, 5 Feb 2015 21:38:01 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t15Lbx4v063313; Thu, 5 Feb 2015 21:37:59 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502052137.t15Lbx4v063313@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 5 Feb 2015 21:37:59 +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: r278291 - in 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-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2015 21:38:01 -0000 Author: hselasky Date: Thu Feb 5 21:37:59 2015 New Revision: 278291 URL: https://svnweb.freebsd.org/changeset/base/278291 Log: MFC r277136: Resolve a special case deadlock: When two or more threads are simultaneously detaching kernel drivers on the same USB device we can get stuck in the "usb_wait_pending_ref_locked()" function because the conditions needed for allowing detach are not met. While at it ensure that "flag_iserror" is only written when "priv_mtx" is locked, which is protecting it. Modified: stable/9/sys/dev/usb/controller/usb_controller.c stable/9/sys/dev/usb/usb_bus.h stable/9/sys/dev/usb/usb_dev.c stable/9/sys/dev/usb/usb_device.c stable/9/sys/dev/usb/usb_device.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/usb_controller.c ============================================================================== --- stable/9/sys/dev/usb/controller/usb_controller.c Thu Feb 5 21:25:11 2015 (r278290) +++ stable/9/sys/dev/usb/controller/usb_controller.c Thu Feb 5 21:37:59 2015 (r278291) @@ -56,6 +56,7 @@ #include #include #include +#include #include #include @@ -205,6 +206,11 @@ usb_detach(device_t dev) usb_proc_mwait(&bus->explore_proc, &bus->detach_msg[0], &bus->detach_msg[1]); +#if USB_HAVE_UGEN + /* Wait for cleanup to complete */ + usb_proc_mwait(&bus->explore_proc, + &bus->cleanup_msg[0], &bus->cleanup_msg[1]); +#endif USB_BUS_UNLOCK(bus); /* Get rid of USB callback processes */ @@ -613,6 +619,32 @@ usb_bus_shutdown(struct usb_proc_msg *pm USB_BUS_LOCK(bus); } +/*------------------------------------------------------------------------* + * usb_bus_cleanup + * + * This function is used to cleanup leftover USB character devices. + *------------------------------------------------------------------------*/ +#if USB_HAVE_UGEN +static void +usb_bus_cleanup(struct usb_proc_msg *pm) +{ + struct usb_bus *bus; + struct usb_fs_privdata *pd; + + bus = ((struct usb_bus_msg *)pm)->bus; + + while ((pd = LIST_FIRST(&bus->pd_cleanup_list)) != NULL) { + + LIST_REMOVE(pd, pd_next); + USB_BUS_UNLOCK(bus); + + usb_destroy_dev_sync(pd); + + USB_BUS_LOCK(bus); + } +} +#endif + static void usb_power_wdog(void *arg) { @@ -793,6 +825,14 @@ usb_attach_sub(device_t dev, struct usb_ bus->shutdown_msg[1].hdr.pm_callback = &usb_bus_shutdown; bus->shutdown_msg[1].bus = bus; +#if USB_HAVE_UGEN + LIST_INIT(&bus->pd_cleanup_list); + bus->cleanup_msg[0].hdr.pm_callback = &usb_bus_cleanup; + bus->cleanup_msg[0].bus = bus; + bus->cleanup_msg[1].hdr.pm_callback = &usb_bus_cleanup; + bus->cleanup_msg[1].bus = bus; +#endif + /* Create USB explore and callback processes */ if (usb_proc_create(&bus->giant_callback_proc, Modified: stable/9/sys/dev/usb/usb_bus.h ============================================================================== --- stable/9/sys/dev/usb/usb_bus.h Thu Feb 5 21:25:11 2015 (r278290) +++ stable/9/sys/dev/usb/usb_bus.h Thu Feb 5 21:37:59 2015 (r278291) @@ -27,6 +27,8 @@ #ifndef _USB_BUS_H_ #define _USB_BUS_H_ +struct usb_fs_privdata; + /* * The following structure defines the USB explore message sent to the USB * explore process. @@ -73,6 +75,10 @@ struct usb_bus { struct usb_bus_msg resume_msg[2]; struct usb_bus_msg reset_msg[2]; struct usb_bus_msg shutdown_msg[2]; +#if USB_HAVE_UGEN + struct usb_bus_msg cleanup_msg[2]; + LIST_HEAD(,usb_fs_privdata) pd_cleanup_list; +#endif /* * This mutex protects the USB hardware: */ Modified: stable/9/sys/dev/usb/usb_dev.c ============================================================================== --- stable/9/sys/dev/usb/usb_dev.c Thu Feb 5 21:25:11 2015 (r278290) +++ stable/9/sys/dev/usb/usb_dev.c Thu Feb 5 21:37:59 2015 (r278291) @@ -290,8 +290,8 @@ error: usbd_enum_unlock(cpd->udev); if (crd->is_uref) { - cpd->udev->refcount--; - cv_broadcast(&cpd->udev->ref_cv); + if (--(cpd->udev->refcount) == 0) + cv_broadcast(&cpd->udev->ref_cv); } mtx_unlock(&usb_ref_lock); DPRINTFN(2, "fail\n"); @@ -362,8 +362,8 @@ usb_unref_device(struct usb_cdev_privdat } if (crd->is_uref) { crd->is_uref = 0; - cpd->udev->refcount--; - cv_broadcast(&cpd->udev->ref_cv); + if (--(cpd->udev->refcount) == 0) + cv_broadcast(&cpd->udev->ref_cv); } mtx_unlock(&usb_ref_lock); } @@ -589,12 +589,12 @@ usb_fifo_free(struct usb_fifo *f) /* decrease refcount */ f->refcount--; - /* prevent any write flush */ - f->flag_iserror = 1; /* need to wait until all callers have exited */ while (f->refcount != 0) { mtx_unlock(&usb_ref_lock); /* avoid LOR */ mtx_lock(f->priv_mtx); + /* prevent write flush, if any */ + f->flag_iserror = 1; /* get I/O thread out of any sleep state */ if (f->flag_sleeping) { f->flag_sleeping = 0; Modified: stable/9/sys/dev/usb/usb_device.c ============================================================================== --- stable/9/sys/dev/usb/usb_device.c Thu Feb 5 21:25:11 2015 (r278290) +++ stable/9/sys/dev/usb/usb_device.c Thu Feb 5 21:37:59 2015 (r278291) @@ -430,68 +430,29 @@ usb_endpoint_foreach(struct usb_device * return (NULL); } -#if USB_HAVE_UGEN -static uint16_t -usb_get_refcount(struct usb_device *udev) -{ - if (usb_proc_is_called_from(&udev->bus->explore_proc) || - usb_proc_is_called_from(&udev->bus->control_xfer_proc)) - return (1); - return (2); -} -#endif - /*------------------------------------------------------------------------* - * usb_wait_pending_ref_locked + * usb_wait_pending_refs * * This function will wait for any USB references to go away before - * returning and disable further USB device refcounting on the - * specified USB device. This function is used when detaching a USB - * device. + * returning. This function is used before freeing a USB device. *------------------------------------------------------------------------*/ static void -usb_wait_pending_ref_locked(struct usb_device *udev) +usb_wait_pending_refs(struct usb_device *udev) { #if USB_HAVE_UGEN - const uint16_t refcount = usb_get_refcount(udev); - - DPRINTF("Refcount = %d\n", (int)refcount); + DPRINTF("Refcount = %d\n", (int)udev->refcount); + mtx_lock(&usb_ref_lock); + udev->refcount--; while (1) { /* wait for any pending references to go away */ - mtx_lock(&usb_ref_lock); - if (udev->refcount == refcount) { - /* prevent further refs being taken */ + if (udev->refcount == 0) { + /* prevent further refs being taken, if any */ udev->refcount = USB_DEV_REF_MAX; - mtx_unlock(&usb_ref_lock); break; } - usbd_enum_unlock(udev); cv_wait(&udev->ref_cv, &usb_ref_lock); - mtx_unlock(&usb_ref_lock); - (void) usbd_enum_lock(udev); } -#endif -} - -/*------------------------------------------------------------------------* - * usb_ref_restore_locked - * - * This function will restore the reference count value after a call - * to "usb_wait_pending_ref_locked()". - *------------------------------------------------------------------------*/ -static void -usb_ref_restore_locked(struct usb_device *udev) -{ -#if USB_HAVE_UGEN - const uint16_t refcount = usb_get_refcount(udev); - - DPRINTF("Refcount = %d\n", (int)refcount); - - /* restore reference count and wakeup waiters, if any */ - mtx_lock(&usb_ref_lock); - udev->refcount = refcount; - cv_broadcast(&udev->ref_cv); mtx_unlock(&usb_ref_lock); #endif } @@ -1156,9 +1117,6 @@ usb_detach_device(struct usb_device *ude sx_assert(&udev->enum_sx, SA_LOCKED); - /* wait for pending refs to go away */ - usb_wait_pending_ref_locked(udev); - /* * First detach the child to give the child's detach routine a * chance to detach the sub-devices in the correct order. @@ -1185,8 +1143,6 @@ usb_detach_device(struct usb_device *ude usb_detach_device_sub(udev, &iface->subdev, &iface->pnpinfo, flag); } - - usb_ref_restore_locked(udev); } /*------------------------------------------------------------------------* @@ -1999,14 +1955,46 @@ usb_make_dev(struct usb_device *udev, co } void +usb_destroy_dev_sync(struct usb_fs_privdata *pd) +{ + DPRINTFN(1, "Destroying device at ugen%d.%d\n", + pd->bus_index, pd->dev_index); + + /* + * Destroy character device synchronously. After this + * all system calls are returned. Can block. + */ + destroy_dev(pd->cdev); + + free(pd, M_USBDEV); +} + +void usb_destroy_dev(struct usb_fs_privdata *pd) { + struct usb_bus *bus; + if (pd == NULL) return; - destroy_dev(pd->cdev); + mtx_lock(&usb_ref_lock); + bus = devclass_get_softc(usb_devclass_ptr, pd->bus_index); + mtx_unlock(&usb_ref_lock); - free(pd, M_USBDEV); + if (bus == NULL) { + usb_destroy_dev_sync(pd); + return; + } + + /* make sure we can re-use the device name */ + delist_dev(pd->cdev); + + USB_BUS_LOCK(bus); + LIST_INSERT_HEAD(&bus->pd_cleanup_list, pd, pd_next); + /* get cleanup going */ + usb_proc_msignal(&bus->explore_proc, + &bus->cleanup_msg[0], &bus->cleanup_msg[1]); + USB_BUS_UNLOCK(bus); } static void @@ -2157,6 +2145,9 @@ usb_free_device(struct usb_device *udev, &udev->cs_msg[0], &udev->cs_msg[1]); USB_BUS_UNLOCK(udev->bus); + /* wait for all references to go away */ + usb_wait_pending_refs(udev); + sx_destroy(&udev->enum_sx); sx_destroy(&udev->sr_sx); @@ -2642,14 +2633,8 @@ usb_fifo_free_wrap(struct usb_device *ud /* no need to free this FIFO */ continue; } - /* wait for pending refs to go away */ - usb_wait_pending_ref_locked(udev); - /* free this FIFO */ usb_fifo_free(f); - - /* restore refcount */ - usb_ref_restore_locked(udev); } } #endif Modified: stable/9/sys/dev/usb/usb_device.h ============================================================================== --- stable/9/sys/dev/usb/usb_device.h Thu Feb 5 21:25:11 2015 (r278290) +++ stable/9/sys/dev/usb/usb_device.h Thu Feb 5 21:37:59 2015 (r278291) @@ -281,6 +281,7 @@ struct usb_device *usb_alloc_device(devi struct usb_fs_privdata *usb_make_dev(struct usb_device *, const char *, int, int, int, uid_t, gid_t, int); void usb_destroy_dev(struct usb_fs_privdata *); +void usb_destroy_dev_sync(struct usb_fs_privdata *); #endif usb_error_t usb_probe_and_attach(struct usb_device *udev, uint8_t iface_index); From owner-svn-src-stable@FreeBSD.ORG Thu Feb 5 21:53:42 2015 Return-Path: Delivered-To: svn-src-stable@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 D4F302E9; Thu, 5 Feb 2015 21:53:42 +0000 (UTC) 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 BFDD7223; Thu, 5 Feb 2015 21:53:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t15Lrg18072318; Thu, 5 Feb 2015 21:53:42 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t15Lrg06072315; Thu, 5 Feb 2015 21:53:42 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502052153.t15Lrg06072315@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 5 Feb 2015 21:53:42 +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: r278293 - in stable/8/sys: fs/devfs kern sys X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2015 21:53:43 -0000 Author: hselasky Date: Thu Feb 5 21:53:41 2015 New Revision: 278293 URL: https://svnweb.freebsd.org/changeset/base/278293 Log: MFC r277179, r277199 and r277391: Add a kernel function to delist our kernel character devices, so that the device name can be re-used right away in case we are destroying the character devices in the background. Modified: stable/8/sys/fs/devfs/devfs_int.h stable/8/sys/kern/kern_conf.c stable/8/sys/sys/conf.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) stable/8/sys/fs/ (props changed) stable/8/sys/kern/ (props changed) stable/8/sys/sys/ (props changed) Modified: stable/8/sys/fs/devfs/devfs_int.h ============================================================================== --- stable/8/sys/fs/devfs/devfs_int.h Thu Feb 5 21:50:51 2015 (r278292) +++ stable/8/sys/fs/devfs/devfs_int.h Thu Feb 5 21:53:41 2015 (r278293) @@ -55,6 +55,7 @@ struct cdev_priv { u_int cdp_flags; #define CDP_ACTIVE (1 << 0) #define CDP_SCHED_DTR (1 << 1) +#define CDP_UNREF_DTR (1 << 2) u_int cdp_inuse; u_int cdp_maxdirent; Modified: stable/8/sys/kern/kern_conf.c ============================================================================== --- stable/8/sys/kern/kern_conf.c Thu Feb 5 21:50:51 2015 (r278292) +++ stable/8/sys/kern/kern_conf.c Thu Feb 5 21:53:41 2015 (r278293) @@ -115,6 +115,8 @@ dev_free_devlocked(struct cdev *cdev) mtx_assert(&devmtx, MA_OWNED); cdp = cdev2priv(cdev); + KASSERT((cdp->cdp_flags & CDP_UNREF_DTR) == 0, + ("destroy_dev() was not called after delist_dev(%p)", cdev)); TAILQ_INSERT_HEAD(&cdevp_free_list, cdp, cdp_list); } @@ -871,6 +873,7 @@ destroy_devl(struct cdev *dev) { struct cdevsw *csw; struct cdev_privdata *p; + struct cdev_priv *cdp; mtx_assert(&devmtx, MA_OWNED); KASSERT(dev->si_flags & SI_NAMED, @@ -879,13 +882,22 @@ destroy_devl(struct cdev *dev) ("WARNING: Driver mistake: destroy_dev on eternal %d\n", dev2unit(dev))); - devfs_destroy(dev); + cdp = cdev2priv(dev); + if ((cdp->cdp_flags & CDP_UNREF_DTR) == 0) { + /* + * Avoid race with dev_rel(), e.g. from the populate + * loop. If CDP_UNREF_DTR flag is set, the reference + * to be dropped at the end of destroy_devl() was + * already taken by delist_dev_locked(). + */ + dev_refl(dev); + + devfs_destroy(dev); + } /* Remove name marking */ dev->si_flags &= ~SI_NAMED; - dev->si_refcount++; /* Avoid race with dev_rel() */ - /* If we are a child, remove us from the parents list */ if (dev->si_flags & SI_CHILD) { LIST_REMOVE(dev, si_siblings); @@ -941,13 +953,39 @@ destroy_devl(struct cdev *dev) } } dev->si_flags &= ~SI_ALIAS; - dev->si_refcount--; /* Avoid race with dev_rel() */ + cdp->cdp_flags &= ~CDP_UNREF_DTR; + dev->si_refcount--; - if (dev->si_refcount > 0) { + if (dev->si_refcount > 0) LIST_INSERT_HEAD(&dead_cdevsw.d_devs, dev, si_list); - } else { + else dev_free_devlocked(dev); - } +} + +static void +delist_dev_locked(struct cdev *dev) +{ + struct cdev_priv *cdp; + struct cdev *child; + + mtx_assert(&devmtx, MA_OWNED); + cdp = cdev2priv(dev); + if ((cdp->cdp_flags & CDP_UNREF_DTR) != 0) + return; + cdp->cdp_flags |= CDP_UNREF_DTR; + dev_refl(dev); + devfs_destroy(dev); + LIST_FOREACH(child, &dev->si_children, si_siblings) + delist_dev_locked(child); +} + +void +delist_dev(struct cdev *dev) +{ + + dev_lock(); + delist_dev_locked(dev); + dev_unlock(); } void Modified: stable/8/sys/sys/conf.h ============================================================================== --- stable/8/sys/sys/conf.h Thu Feb 5 21:50:51 2015 (r278292) +++ stable/8/sys/sys/conf.h Thu Feb 5 21:53:41 2015 (r278293) @@ -254,6 +254,7 @@ void clone_cleanup(struct clonedevs **); int clone_create(struct clonedevs **, struct cdevsw *, int *unit, struct cdev **dev, int extra); int count_dev(struct cdev *_dev); +void delist_dev(struct cdev *_dev); void destroy_dev(struct cdev *_dev); int destroy_dev_sched(struct cdev *dev); int destroy_dev_sched_cb(struct cdev *dev, void (*cb)(void *), void *arg); From owner-svn-src-stable@FreeBSD.ORG Thu Feb 5 22:03:14 2015 Return-Path: Delivered-To: svn-src-stable@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 1C0018DE; Thu, 5 Feb 2015 22:03:14 +0000 (UTC) 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 F0DA1363; Thu, 5 Feb 2015 22:03:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t15M3DCM077165; Thu, 5 Feb 2015 22:03:13 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t15M3CCh077157; Thu, 5 Feb 2015 22:03:12 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502052203.t15M3CCh077157@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 5 Feb 2015 22:03:12 +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: r278295 - in stable/8/sys/dev/usb: . controller X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2015 22:03:14 -0000 Author: hselasky Date: Thu Feb 5 22:03:12 2015 New Revision: 278295 URL: https://svnweb.freebsd.org/changeset/base/278295 Log: MFC r277136: Resolve a special case deadlock: When two or more threads are simultaneously detaching kernel drivers on the same USB device we can get stuck in the "usb_wait_pending_ref_locked()" function because the conditions needed for allowing detach are not met. While at it ensure that "flag_iserror" is only written when "priv_mtx" is locked, which is protecting it. Modified: stable/8/sys/dev/usb/controller/usb_controller.c stable/8/sys/dev/usb/usb_bus.h stable/8/sys/dev/usb/usb_dev.c stable/8/sys/dev/usb/usb_device.c stable/8/sys/dev/usb/usb_device.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/controller/usb_controller.c ============================================================================== --- stable/8/sys/dev/usb/controller/usb_controller.c Thu Feb 5 21:56:23 2015 (r278294) +++ stable/8/sys/dev/usb/controller/usb_controller.c Thu Feb 5 22:03:12 2015 (r278295) @@ -56,6 +56,7 @@ #include #include #include +#include #include #include @@ -205,6 +206,11 @@ usb_detach(device_t dev) usb_proc_mwait(&bus->explore_proc, &bus->detach_msg[0], &bus->detach_msg[1]); +#if USB_HAVE_UGEN + /* Wait for cleanup to complete */ + usb_proc_mwait(&bus->explore_proc, + &bus->cleanup_msg[0], &bus->cleanup_msg[1]); +#endif USB_BUS_UNLOCK(bus); /* Get rid of USB callback processes */ @@ -612,6 +618,32 @@ usb_bus_shutdown(struct usb_proc_msg *pm USB_BUS_LOCK(bus); } +/*------------------------------------------------------------------------* + * usb_bus_cleanup + * + * This function is used to cleanup leftover USB character devices. + *------------------------------------------------------------------------*/ +#if USB_HAVE_UGEN +static void +usb_bus_cleanup(struct usb_proc_msg *pm) +{ + struct usb_bus *bus; + struct usb_fs_privdata *pd; + + bus = ((struct usb_bus_msg *)pm)->bus; + + while ((pd = LIST_FIRST(&bus->pd_cleanup_list)) != NULL) { + + LIST_REMOVE(pd, pd_next); + USB_BUS_UNLOCK(bus); + + usb_destroy_dev_sync(pd); + + USB_BUS_LOCK(bus); + } +} +#endif + static void usb_power_wdog(void *arg) { @@ -792,6 +824,13 @@ usb_attach_sub(device_t dev, struct usb_ bus->shutdown_msg[1].hdr.pm_callback = &usb_bus_shutdown; bus->shutdown_msg[1].bus = bus; +#if USB_HAVE_UGEN + LIST_INIT(&bus->pd_cleanup_list); + bus->cleanup_msg[0].hdr.pm_callback = &usb_bus_cleanup; + bus->cleanup_msg[0].bus = bus; + bus->cleanup_msg[1].hdr.pm_callback = &usb_bus_cleanup; + bus->cleanup_msg[1].bus = bus; +#endif /* Create USB explore and callback processes */ if (usb_proc_create(&bus->giant_callback_proc, Modified: stable/8/sys/dev/usb/usb_bus.h ============================================================================== --- stable/8/sys/dev/usb/usb_bus.h Thu Feb 5 21:56:23 2015 (r278294) +++ stable/8/sys/dev/usb/usb_bus.h Thu Feb 5 22:03:12 2015 (r278295) @@ -27,6 +27,8 @@ #ifndef _USB_BUS_H_ #define _USB_BUS_H_ +struct usb_fs_privdata; + /* * The following structure defines the USB explore message sent to the USB * explore process. @@ -73,6 +75,10 @@ struct usb_bus { struct usb_bus_msg resume_msg[2]; struct usb_bus_msg reset_msg[2]; struct usb_bus_msg shutdown_msg[2]; +#if USB_HAVE_UGEN + struct usb_bus_msg cleanup_msg[2]; + LIST_HEAD(,usb_fs_privdata) pd_cleanup_list; +#endif /* * This mutex protects the USB hardware: */ Modified: stable/8/sys/dev/usb/usb_dev.c ============================================================================== --- stable/8/sys/dev/usb/usb_dev.c Thu Feb 5 21:56:23 2015 (r278294) +++ stable/8/sys/dev/usb/usb_dev.c Thu Feb 5 22:03:12 2015 (r278295) @@ -288,8 +288,8 @@ error: usbd_enum_unlock(cpd->udev); if (crd->is_uref) { - cpd->udev->refcount--; - cv_broadcast(&cpd->udev->ref_cv); + if (--(cpd->udev->refcount) == 0) + cv_broadcast(&cpd->udev->ref_cv); } mtx_unlock(&usb_ref_lock); DPRINTFN(2, "fail\n"); @@ -360,8 +360,8 @@ usb_unref_device(struct usb_cdev_privdat } if (crd->is_uref) { crd->is_uref = 0; - cpd->udev->refcount--; - cv_broadcast(&cpd->udev->ref_cv); + if (--(cpd->udev->refcount) == 0) + cv_broadcast(&cpd->udev->ref_cv); } mtx_unlock(&usb_ref_lock); } @@ -587,12 +587,12 @@ usb_fifo_free(struct usb_fifo *f) /* decrease refcount */ f->refcount--; - /* prevent any write flush */ - f->flag_iserror = 1; /* need to wait until all callers have exited */ while (f->refcount != 0) { mtx_unlock(&usb_ref_lock); /* avoid LOR */ mtx_lock(f->priv_mtx); + /* prevent write flush, if any */ + f->flag_iserror = 1; /* get I/O thread out of any sleep state */ if (f->flag_sleeping) { f->flag_sleeping = 0; Modified: stable/8/sys/dev/usb/usb_device.c ============================================================================== --- stable/8/sys/dev/usb/usb_device.c Thu Feb 5 21:56:23 2015 (r278294) +++ stable/8/sys/dev/usb/usb_device.c Thu Feb 5 22:03:12 2015 (r278295) @@ -430,68 +430,29 @@ usb_endpoint_foreach(struct usb_device * return (NULL); } -#if USB_HAVE_UGEN -static uint16_t -usb_get_refcount(struct usb_device *udev) -{ - if (usb_proc_is_called_from(&udev->bus->explore_proc) || - usb_proc_is_called_from(&udev->bus->control_xfer_proc)) - return (1); - return (2); -} -#endif - /*------------------------------------------------------------------------* - * usb_wait_pending_ref_locked + * usb_wait_pending_refs * * This function will wait for any USB references to go away before - * returning and disable further USB device refcounting on the - * specified USB device. This function is used when detaching a USB - * device. + * returning. This function is used before freeing a USB device. *------------------------------------------------------------------------*/ static void -usb_wait_pending_ref_locked(struct usb_device *udev) +usb_wait_pending_refs(struct usb_device *udev) { #if USB_HAVE_UGEN - const uint16_t refcount = usb_get_refcount(udev); - - DPRINTF("Refcount = %d\n", (int)refcount); + DPRINTF("Refcount = %d\n", (int)udev->refcount); + mtx_lock(&usb_ref_lock); + udev->refcount--; while (1) { /* wait for any pending references to go away */ - mtx_lock(&usb_ref_lock); - if (udev->refcount == refcount) { - /* prevent further refs being taken */ + if (udev->refcount == 0) { + /* prevent further refs being taken, if any */ udev->refcount = USB_DEV_REF_MAX; - mtx_unlock(&usb_ref_lock); break; } - usbd_enum_unlock(udev); cv_wait(&udev->ref_cv, &usb_ref_lock); - mtx_unlock(&usb_ref_lock); - (void) usbd_enum_lock(udev); } -#endif -} - -/*------------------------------------------------------------------------* - * usb_ref_restore_locked - * - * This function will restore the reference count value after a call - * to "usb_wait_pending_ref_locked()". - *------------------------------------------------------------------------*/ -static void -usb_ref_restore_locked(struct usb_device *udev) -{ -#if USB_HAVE_UGEN - const uint16_t refcount = usb_get_refcount(udev); - - DPRINTF("Refcount = %d\n", (int)refcount); - - /* restore reference count and wakeup waiters, if any */ - mtx_lock(&usb_ref_lock); - udev->refcount = refcount; - cv_broadcast(&udev->ref_cv); mtx_unlock(&usb_ref_lock); #endif } @@ -1157,9 +1118,6 @@ usb_detach_device(struct usb_device *ude sx_assert(&udev->enum_sx, SA_LOCKED); - /* wait for pending refs to go away */ - usb_wait_pending_ref_locked(udev); - /* * First detach the child to give the child's detach routine a * chance to detach the sub-devices in the correct order. @@ -1186,8 +1144,6 @@ usb_detach_device(struct usb_device *ude usb_detach_device_sub(udev, &iface->subdev, &iface->pnpinfo, flag); } - - usb_ref_restore_locked(udev); } /*------------------------------------------------------------------------* @@ -2000,14 +1956,43 @@ usb_make_dev(struct usb_device *udev, co } void +usb_destroy_dev_sync(struct usb_fs_privdata *pd) +{ + DPRINTFN(1, "Destroying device at ugen%d.%d\n", + pd->bus_index, pd->dev_index); + + /* + * Destroy character device synchronously. After this + * all system calls are returned. Can block. + */ + destroy_dev(pd->cdev); + + free(pd, M_USBDEV); +} + +void usb_destroy_dev(struct usb_fs_privdata *pd) { + struct usb_bus *bus; + if (pd == NULL) return; - destroy_dev(pd->cdev); + mtx_lock(&usb_ref_lock); + bus = devclass_get_softc(usb_devclass_ptr, pd->bus_index); + mtx_unlock(&usb_ref_lock); - free(pd, M_USBDEV); + if (bus == NULL) { + usb_destroy_dev_sync(pd); + return; + } + + USB_BUS_LOCK(bus); + LIST_INSERT_HEAD(&bus->pd_cleanup_list, pd, pd_next); + /* get cleanup going */ + usb_proc_msignal(&bus->explore_proc, + &bus->cleanup_msg[0], &bus->cleanup_msg[1]); + USB_BUS_UNLOCK(bus); } static void @@ -2156,6 +2141,9 @@ usb_free_device(struct usb_device *udev, &udev->cs_msg[0], &udev->cs_msg[1]); USB_BUS_UNLOCK(udev->bus); + /* wait for all references to go away */ + usb_wait_pending_refs(udev); + sx_destroy(&udev->enum_sx); sx_destroy(&udev->sr_sx); @@ -2716,14 +2704,8 @@ usb_fifo_free_wrap(struct usb_device *ud /* no need to free this FIFO */ continue; } - /* wait for pending refs to go away */ - usb_wait_pending_ref_locked(udev); - /* free this FIFO */ usb_fifo_free(f); - - /* restore refcount */ - usb_ref_restore_locked(udev); } } #endif Modified: stable/8/sys/dev/usb/usb_device.h ============================================================================== --- stable/8/sys/dev/usb/usb_device.h Thu Feb 5 21:56:23 2015 (r278294) +++ stable/8/sys/dev/usb/usb_device.h Thu Feb 5 22:03:12 2015 (r278295) @@ -282,6 +282,7 @@ struct usb_device *usb_alloc_device(devi struct usb_fs_privdata *usb_make_dev(struct usb_device *, const char *, int, int, int, uid_t, gid_t, int); void usb_destroy_dev(struct usb_fs_privdata *); +void usb_destroy_dev_sync(struct usb_fs_privdata *); #endif usb_error_t usb_probe_and_attach(struct usb_device *udev, uint8_t iface_index); From owner-svn-src-stable@FreeBSD.ORG Fri Feb 6 08:58:07 2015 Return-Path: Delivered-To: svn-src-stable@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 AF3CD2A4; Fri, 6 Feb 2015 08:58:07 +0000 (UTC) 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 9A3AFDBD; Fri, 6 Feb 2015 08:58:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t168w7pU085908; Fri, 6 Feb 2015 08:58:07 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t168w7ia085907; Fri, 6 Feb 2015 08:58:07 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201502060858.t168w7ia085907@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 6 Feb 2015 08:58: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: r278309 - stable/10/libexec/rtld-elf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Feb 2015 08:58:07 -0000 Author: kib Date: Fri Feb 6 08:58:06 2015 New Revision: 278309 URL: https://svnweb.freebsd.org/changeset/base/278309 Log: MFC r277936: Use powerof2(). Remove single-use variable. Modified: stable/10/libexec/rtld-elf/rtld.c Directory Properties: stable/10/ (props changed) Modified: stable/10/libexec/rtld-elf/rtld.c ============================================================================== --- stable/10/libexec/rtld-elf/rtld.c Fri Feb 6 05:11:46 2015 (r278308) +++ stable/10/libexec/rtld-elf/rtld.c Fri Feb 6 08:58:06 2015 (r278309) @@ -863,7 +863,6 @@ digest_dynamic1(Obj_Entry *obj, int earl const Elf32_Word *hashval; Elf32_Word bkt, nmaskwords; int bloom_size32; - bool nmw_power2; int plttype = DT_REL; *dyn_rpath = NULL; @@ -973,16 +972,15 @@ digest_dynamic1(Obj_Entry *obj, int earl obj->symndx_gnu = hashtab[1]; nmaskwords = hashtab[2]; bloom_size32 = (__ELF_WORD_SIZE / 32) * nmaskwords; - /* Number of bitmask words is required to be power of 2 */ - nmw_power2 = ((nmaskwords & (nmaskwords - 1)) == 0); obj->maskwords_bm_gnu = nmaskwords - 1; obj->shift2_gnu = hashtab[3]; obj->bloom_gnu = (Elf_Addr *) (hashtab + 4); obj->buckets_gnu = hashtab + 4 + bloom_size32; obj->chain_zero_gnu = obj->buckets_gnu + obj->nbuckets_gnu - obj->symndx_gnu; - obj->valid_hash_gnu = nmw_power2 && obj->nbuckets_gnu > 0 && - obj->buckets_gnu != NULL; + /* Number of bitmask words is required to be power of 2 */ + obj->valid_hash_gnu = powerof2(nmaskwords) && + obj->nbuckets_gnu > 0 && obj->buckets_gnu != NULL; } break; From owner-svn-src-stable@FreeBSD.ORG Fri Feb 6 09:02:11 2015 Return-Path: Delivered-To: svn-src-stable@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 CFE0FBD6; Fri, 6 Feb 2015 09:02:11 +0000 (UTC) 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 BB78FE64; Fri, 6 Feb 2015 09:02:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1692BSv090063; Fri, 6 Feb 2015 09:02:11 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1692BfM090062; Fri, 6 Feb 2015 09:02:11 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201502060902.t1692BfM090062@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 6 Feb 2015 09:02: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: r278310 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Feb 2015 09:02:11 -0000 Author: kib Date: Fri Feb 6 09:02:10 2015 New Revision: 278310 URL: https://svnweb.freebsd.org/changeset/base/278310 Log: MFC r278145: Fix use after free in pipe_dtor(). Modified: stable/10/sys/kern/sys_pipe.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/sys_pipe.c ============================================================================== --- stable/10/sys/kern/sys_pipe.c Fri Feb 6 08:58:06 2015 (r278309) +++ stable/10/sys/kern/sys_pipe.c Fri Feb 6 09:02:10 2015 (r278310) @@ -374,15 +374,16 @@ pipe_named_ctor(struct pipe **ppipe, str void pipe_dtor(struct pipe *dpipe) { + struct pipe *peer; ino_t ino; ino = dpipe->pipe_ino; + peer = (dpipe->pipe_state & PIPE_NAMED) != 0 ? dpipe->pipe_peer : NULL; funsetown(&dpipe->pipe_sigio); pipeclose(dpipe); - if (dpipe->pipe_state & PIPE_NAMED) { - dpipe = dpipe->pipe_peer; - funsetown(&dpipe->pipe_sigio); - pipeclose(dpipe); + if (peer != NULL) { + funsetown(&peer->pipe_sigio); + pipeclose(peer); } if (ino != 0 && ino != (ino_t)-1) free_unr(pipeino_unr, ino); From owner-svn-src-stable@FreeBSD.ORG Fri Feb 6 13:43:48 2015 Return-Path: Delivered-To: svn-src-stable@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 C3BD9D77; Fri, 6 Feb 2015 13:43:48 +0000 (UTC) Received: from apnoea.adamw.org (apnoea.adamw.org [204.109.59.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C23734E; Fri, 6 Feb 2015 13:43:48 +0000 (UTC) Received: from [192.168.192.25] (67-0-108-129.albq.qwest.net [67.0.108.129]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by apnoea.adamw.org (Postfix) with ESMTPSA id 45FBC1257BA; Fri, 6 Feb 2015 06:35:07 -0700 (MST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r278258 - stable/10/release/doc/en_US.ISO8859-1/relnotes From: Adam Weinberger In-Reply-To: <201502051307.t15D7f3C013141@svn.freebsd.org> Date: Fri, 6 Feb 2015 06:35:06 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <346B0A61-964A-4009-9D5D-A5B79970182B@adamw.org> References: <201502051307.t15D7f3C013141@svn.freebsd.org> To: Glen Barber X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Feb 2015 13:43:48 -0000 > On 5 Feb, 2015, at 6:07, Glen Barber wrote: >=20 > Author: gjb > Date: Thu Feb 5 13:07:41 2015 > New Revision: 278258 > URL: https://svnweb.freebsd.org/changeset/base/278258 >=20 > r278115: > Move the 'Upgrading from Previous Releases of FreeBSD' > section to the top of the file, following the introduction. Hi Glen, This is a really great change! It also notes: > + Source-based upgrades (those based on recompiling the &os; > + base system from source code) from previous versions are > + supported, according to the instructions in > + /usr/src/UPDATING. Any chance something similar can happen for /usr/src/UPDATING? In the = stable/* and releng/* branches, the how-to-upgrade information appears = nearly 2,000 lines down. Maybe: - Everything from most recent branch, (or most recent - 1?) onward - "COMMON ITEMS" - Everything else # Adam --=20 Adam Weinberger adamw@adamw.org http://www.adamw.org From owner-svn-src-stable@FreeBSD.ORG Fri Feb 6 15:53:14 2015 Return-Path: Delivered-To: svn-src-stable@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 E1A3C54A; Fri, 6 Feb 2015 15:53:14 +0000 (UTC) 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 CCBDF3B4; Fri, 6 Feb 2015 15:53:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t16FrEPt086347; Fri, 6 Feb 2015 15:53:14 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t16FrElM086344; Fri, 6 Feb 2015 15:53:14 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201502061553.t16FrElM086344@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 6 Feb 2015 15: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: r278319 - in stable: 10/sys/dev/cxgbe/tom 10/sys/kern 9/sys/dev/cxgbe/tom 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-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Feb 2015 15:53:15 -0000 Author: jhb Date: Fri Feb 6 15:53:13 2015 New Revision: 278319 URL: https://svnweb.freebsd.org/changeset/base/278319 Log: MFC 275808: Check for SS_NBIO in so->so_state instead of sb->sb_flags in soreceive_stream(). Modified: stable/10/sys/dev/cxgbe/tom/t4_ddp.c stable/10/sys/kern/uipc_socket.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/dev/cxgbe/tom/t4_ddp.c stable/9/sys/kern/uipc_socket.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/10/sys/dev/cxgbe/tom/t4_ddp.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_ddp.c Fri Feb 6 15:38:11 2015 (r278318) +++ stable/10/sys/dev/cxgbe/tom/t4_ddp.c Fri Feb 6 15:53:13 2015 (r278319) @@ -1172,7 +1172,7 @@ restart: /* Socket buffer got some data that we shall deliver now. */ if (sb->sb_cc > 0 && !(flags & MSG_WAITALL) && - ((sb->sb_flags & SS_NBIO) || + ((so->so_state & SS_NBIO) || (flags & (MSG_DONTWAIT|MSG_NBIO)) || sb->sb_cc >= sb->sb_lowat || sb->sb_cc >= uio->uio_resid || Modified: stable/10/sys/kern/uipc_socket.c ============================================================================== --- stable/10/sys/kern/uipc_socket.c Fri Feb 6 15:38:11 2015 (r278318) +++ stable/10/sys/kern/uipc_socket.c Fri Feb 6 15:53:13 2015 (r278319) @@ -1941,7 +1941,7 @@ restart: /* Socket buffer got some data that we shall deliver now. */ if (sb->sb_cc > 0 && !(flags & MSG_WAITALL) && - ((sb->sb_flags & SS_NBIO) || + ((so->so_state & SS_NBIO) || (flags & (MSG_DONTWAIT|MSG_NBIO)) || sb->sb_cc >= sb->sb_lowat || sb->sb_cc >= uio->uio_resid || From owner-svn-src-stable@FreeBSD.ORG Fri Feb 6 15:53:15 2015 Return-Path: Delivered-To: svn-src-stable@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 8DE9254B; Fri, 6 Feb 2015 15:53:15 +0000 (UTC) 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 77CB33B5; Fri, 6 Feb 2015 15:53:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t16FrFsq086354; Fri, 6 Feb 2015 15:53:15 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t16FrFYu086352; Fri, 6 Feb 2015 15:53:15 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201502061553.t16FrFYu086352@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 6 Feb 2015 15:53:15 +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: r278319 - in stable: 10/sys/dev/cxgbe/tom 10/sys/kern 9/sys/dev/cxgbe/tom 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-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Feb 2015 15:53:15 -0000 Author: jhb Date: Fri Feb 6 15:53:13 2015 New Revision: 278319 URL: https://svnweb.freebsd.org/changeset/base/278319 Log: MFC 275808: Check for SS_NBIO in so->so_state instead of sb->sb_flags in soreceive_stream(). Modified: stable/9/sys/dev/cxgbe/tom/t4_ddp.c stable/9/sys/kern/uipc_socket.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/cxgbe/tom/t4_ddp.c stable/10/sys/kern/uipc_socket.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/dev/cxgbe/tom/t4_ddp.c ============================================================================== --- stable/9/sys/dev/cxgbe/tom/t4_ddp.c Fri Feb 6 15:38:11 2015 (r278318) +++ stable/9/sys/dev/cxgbe/tom/t4_ddp.c Fri Feb 6 15:53:13 2015 (r278319) @@ -1161,7 +1161,7 @@ restart: /* Socket buffer got some data that we shall deliver now. */ if (sb->sb_cc > 0 && !(flags & MSG_WAITALL) && - ((sb->sb_flags & SS_NBIO) || + ((so->so_state & SS_NBIO) || (flags & (MSG_DONTWAIT|MSG_NBIO)) || sb->sb_cc >= sb->sb_lowat || sb->sb_cc >= uio->uio_resid || Modified: stable/9/sys/kern/uipc_socket.c ============================================================================== --- stable/9/sys/kern/uipc_socket.c Fri Feb 6 15:38:11 2015 (r278318) +++ stable/9/sys/kern/uipc_socket.c Fri Feb 6 15:53:13 2015 (r278319) @@ -2063,7 +2063,7 @@ restart: /* Socket buffer got some data that we shall deliver now. */ if (sb->sb_cc > 0 && !(flags & MSG_WAITALL) && - ((sb->sb_flags & SS_NBIO) || + ((so->so_state & SS_NBIO) || (flags & (MSG_DONTWAIT|MSG_NBIO)) || sb->sb_cc >= sb->sb_lowat || sb->sb_cc >= uio->uio_resid || From owner-svn-src-stable@FreeBSD.ORG Fri Feb 6 18:13:31 2015 Return-Path: Delivered-To: svn-src-stable@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 4816574F; Fri, 6 Feb 2015 18:13:31 +0000 (UTC) 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 33F1C86E; Fri, 6 Feb 2015 18:13:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t16IDVFX052049; Fri, 6 Feb 2015 18:13:31 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t16IDVgw052047; Fri, 6 Feb 2015 18:13:31 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201502061813.t16IDVgw052047@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 6 Feb 2015 18:13:31 +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: r278324 - in stable: 10/sbin/ipfw 9/sbin/ipfw 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Feb 2015 18:13:31 -0000 Author: jhb Date: Fri Feb 6 18:13:29 2015 New Revision: 278324 URL: https://svnweb.freebsd.org/changeset/base/278324 Log: MFC 277714: natd(8) will work with an unconfigured interface and effectively not do anything until the interface is assigned an address. This fixes ipfw_nat to do the same by using an IP of INADDR_ANY instead of aborting the nat setup if the requested interface is not yet configured. Modified: stable/9/sbin/ipfw/nat.c Directory Properties: stable/9/sbin/ipfw/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sbin/ipfw/nat.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sbin/ipfw/nat.c ============================================================================== --- stable/9/sbin/ipfw/nat.c Fri Feb 6 17:54:53 2015 (r278323) +++ stable/9/sbin/ipfw/nat.c Fri Feb 6 18:13:29 2015 (r278324) @@ -156,9 +156,9 @@ set_addr_dynamic(const char *ifn, struct } } if (sin == NULL) - errx(1, "%s: cannot get interface address", ifn); - - n->ip = sin->sin_addr; + n->ip.s_addr = htonl(INADDR_ANY); + else + n->ip = sin->sin_addr; strncpy(n->if_name, ifn, IF_NAMESIZE); free(buf); From owner-svn-src-stable@FreeBSD.ORG Fri Feb 6 18:13:30 2015 Return-Path: Delivered-To: svn-src-stable@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 A40D974E; Fri, 6 Feb 2015 18:13:30 +0000 (UTC) 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 8FA7A86D; Fri, 6 Feb 2015 18:13:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t16IDUD5052040; Fri, 6 Feb 2015 18:13:30 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t16IDUDq052039; Fri, 6 Feb 2015 18:13:30 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201502061813.t16IDUDq052039@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 6 Feb 2015 18: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: r278324 - in stable: 10/sbin/ipfw 9/sbin/ipfw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Feb 2015 18:13:30 -0000 Author: jhb Date: Fri Feb 6 18:13:29 2015 New Revision: 278324 URL: https://svnweb.freebsd.org/changeset/base/278324 Log: MFC 277714: natd(8) will work with an unconfigured interface and effectively not do anything until the interface is assigned an address. This fixes ipfw_nat to do the same by using an IP of INADDR_ANY instead of aborting the nat setup if the requested interface is not yet configured. Modified: stable/10/sbin/ipfw/nat.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sbin/ipfw/nat.c Directory Properties: stable/9/sbin/ipfw/ (props changed) Modified: stable/10/sbin/ipfw/nat.c ============================================================================== --- stable/10/sbin/ipfw/nat.c Fri Feb 6 17:54:53 2015 (r278323) +++ stable/10/sbin/ipfw/nat.c Fri Feb 6 18:13:29 2015 (r278324) @@ -156,9 +156,9 @@ set_addr_dynamic(const char *ifn, struct } } if (sin == NULL) - errx(1, "%s: cannot get interface address", ifn); - - n->ip = sin->sin_addr; + n->ip.s_addr = htonl(INADDR_ANY); + else + n->ip = sin->sin_addr; strncpy(n->if_name, ifn, IF_NAMESIZE); free(buf); From owner-svn-src-stable@FreeBSD.ORG Fri Feb 6 18:42:00 2015 Return-Path: Delivered-To: svn-src-stable@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 57F6CFBC; Fri, 6 Feb 2015 18:42:00 +0000 (UTC) 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 29DCDB55; Fri, 6 Feb 2015 18:42:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t16Ig0HA066073; Fri, 6 Feb 2015 18:42:00 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t16Ig02G066071; Fri, 6 Feb 2015 18:42:00 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201502061842.t16Ig02G066071@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 6 Feb 2015 18:42:00 +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: r278326 - in stable: 10/sys/dev/ipmi 8/sys/dev/ipmi 9/sys/dev/ipmi 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Feb 2015 18:42:00 -0000 Author: jhb Date: Fri Feb 6 18:41:57 2015 New Revision: 278326 URL: https://svnweb.freebsd.org/changeset/base/278326 Log: MFC 276065: Explicitly treat timeouts when waiting for IBF or OBF to change state as an error. This fixes occasional hangs in the IPMI kcs thread when using ipmitool locally. Modified: stable/9/sys/dev/ipmi/ipmi_kcs.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/ipmi/ipmi_kcs.c stable/8/sys/dev/ipmi/ipmi_kcs.c Directory Properties: stable/10/ (props changed) stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/ipmi/ (props changed) Modified: stable/9/sys/dev/ipmi/ipmi_kcs.c ============================================================================== --- stable/9/sys/dev/ipmi/ipmi_kcs.c Fri Feb 6 18:19:59 2015 (r278325) +++ stable/9/sys/dev/ipmi/ipmi_kcs.c Fri Feb 6 18:41:57 2015 (r278326) @@ -184,6 +184,8 @@ kcs_start_write(struct ipmi_softc *sc) for (retry = 0; retry < 10; retry++) { /* Wait for IBF = 0 */ status = kcs_wait_for_ibf(sc, 0); + if (status & KCS_STATUS_IBF) + return (0); /* Clear OBF */ kcs_clear_obf(sc, status); @@ -193,6 +195,9 @@ kcs_start_write(struct ipmi_softc *sc) /* Wait for IBF = 0 */ status = kcs_wait_for_ibf(sc, 0); + if (status & KCS_STATUS_IBF) + return (0); + if (KCS_STATUS_STATE(status) == KCS_STATUS_STATE_WRITE) break; DELAY(1000000); @@ -222,6 +227,8 @@ kcs_write_byte(struct ipmi_softc *sc, u_ /* Wait for IBF = 0 */ status = kcs_wait_for_ibf(sc, 0); + if (status & KCS_STATUS_IBF) + return (0); if (KCS_STATUS_STATE(status) != KCS_STATUS_STATE_WRITE) return (0); @@ -244,6 +251,8 @@ kcs_write_last_byte(struct ipmi_softc *s /* Wait for IBF = 0 */ status = kcs_wait_for_ibf(sc, 0); + if (status & KCS_STATUS_IBF) + return (0); if (KCS_STATUS_STATE(status) != KCS_STATUS_STATE_WRITE) /* error state */ @@ -274,6 +283,8 @@ kcs_read_byte(struct ipmi_softc *sc, u_c /* Wait for OBF = 1 */ status = kcs_wait_for_obf(sc, 1); + if ((status & KCS_STATUS_OBF) == 0) + return (0); /* Read Data_out */ *data = INB(sc, KCS_DATA); @@ -288,6 +299,8 @@ kcs_read_byte(struct ipmi_softc *sc, u_c /* Wait for OBF = 1*/ status = kcs_wait_for_obf(sc, 1); + if ((status & KCS_STATUS_OBF) == 0) + return (0); /* Read Dummy */ dummy = INB(sc, KCS_DATA); From owner-svn-src-stable@FreeBSD.ORG Fri Feb 6 18:41:59 2015 Return-Path: Delivered-To: svn-src-stable@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 1A38BFBA; Fri, 6 Feb 2015 18:41:59 +0000 (UTC) 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 DFB8DB53; Fri, 6 Feb 2015 18:41:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t16Ifw9o066060; Fri, 6 Feb 2015 18:41:58 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t16IfwcS066059; Fri, 6 Feb 2015 18:41:58 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201502061841.t16IfwcS066059@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 6 Feb 2015 18:41: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: r278326 - in stable: 10/sys/dev/ipmi 8/sys/dev/ipmi 9/sys/dev/ipmi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Feb 2015 18:41:59 -0000 Author: jhb Date: Fri Feb 6 18:41:57 2015 New Revision: 278326 URL: https://svnweb.freebsd.org/changeset/base/278326 Log: MFC 276065: Explicitly treat timeouts when waiting for IBF or OBF to change state as an error. This fixes occasional hangs in the IPMI kcs thread when using ipmitool locally. Modified: stable/10/sys/dev/ipmi/ipmi_kcs.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/8/sys/dev/ipmi/ipmi_kcs.c stable/9/sys/dev/ipmi/ipmi_kcs.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/ipmi/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/10/sys/dev/ipmi/ipmi_kcs.c ============================================================================== --- stable/10/sys/dev/ipmi/ipmi_kcs.c Fri Feb 6 18:19:59 2015 (r278325) +++ stable/10/sys/dev/ipmi/ipmi_kcs.c Fri Feb 6 18:41:57 2015 (r278326) @@ -184,6 +184,8 @@ kcs_start_write(struct ipmi_softc *sc) for (retry = 0; retry < 10; retry++) { /* Wait for IBF = 0 */ status = kcs_wait_for_ibf(sc, 0); + if (status & KCS_STATUS_IBF) + return (0); /* Clear OBF */ kcs_clear_obf(sc, status); @@ -193,6 +195,9 @@ kcs_start_write(struct ipmi_softc *sc) /* Wait for IBF = 0 */ status = kcs_wait_for_ibf(sc, 0); + if (status & KCS_STATUS_IBF) + return (0); + if (KCS_STATUS_STATE(status) == KCS_STATUS_STATE_WRITE) break; DELAY(1000000); @@ -222,6 +227,8 @@ kcs_write_byte(struct ipmi_softc *sc, u_ /* Wait for IBF = 0 */ status = kcs_wait_for_ibf(sc, 0); + if (status & KCS_STATUS_IBF) + return (0); if (KCS_STATUS_STATE(status) != KCS_STATUS_STATE_WRITE) return (0); @@ -244,6 +251,8 @@ kcs_write_last_byte(struct ipmi_softc *s /* Wait for IBF = 0 */ status = kcs_wait_for_ibf(sc, 0); + if (status & KCS_STATUS_IBF) + return (0); if (KCS_STATUS_STATE(status) != KCS_STATUS_STATE_WRITE) /* error state */ @@ -274,6 +283,8 @@ kcs_read_byte(struct ipmi_softc *sc, u_c /* Wait for OBF = 1 */ status = kcs_wait_for_obf(sc, 1); + if ((status & KCS_STATUS_OBF) == 0) + return (0); /* Read Data_out */ *data = INB(sc, KCS_DATA); @@ -288,6 +299,8 @@ kcs_read_byte(struct ipmi_softc *sc, u_c /* Wait for OBF = 1*/ status = kcs_wait_for_obf(sc, 1); + if ((status & KCS_STATUS_OBF) == 0) + return (0); /* Read Dummy */ dummy = INB(sc, KCS_DATA); From owner-svn-src-stable@FreeBSD.ORG Fri Feb 6 18:41:59 2015 Return-Path: Delivered-To: svn-src-stable@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 B22AFFBB; Fri, 6 Feb 2015 18:41:59 +0000 (UTC) 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 83CBFB54; Fri, 6 Feb 2015 18:41:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t16IfxZW066066; Fri, 6 Feb 2015 18:41:59 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t16IfxKL066065; Fri, 6 Feb 2015 18:41:59 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201502061841.t16IfxKL066065@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 6 Feb 2015 18:41:59 +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: r278326 - in stable: 10/sys/dev/ipmi 8/sys/dev/ipmi 9/sys/dev/ipmi X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Feb 2015 18:41:59 -0000 Author: jhb Date: Fri Feb 6 18:41:57 2015 New Revision: 278326 URL: https://svnweb.freebsd.org/changeset/base/278326 Log: MFC 276065: Explicitly treat timeouts when waiting for IBF or OBF to change state as an error. This fixes occasional hangs in the IPMI kcs thread when using ipmitool locally. Modified: stable/8/sys/dev/ipmi/ipmi_kcs.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/ipmi/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/ipmi/ipmi_kcs.c stable/9/sys/dev/ipmi/ipmi_kcs.c Directory Properties: stable/10/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/8/sys/dev/ipmi/ipmi_kcs.c ============================================================================== --- stable/8/sys/dev/ipmi/ipmi_kcs.c Fri Feb 6 18:19:59 2015 (r278325) +++ stable/8/sys/dev/ipmi/ipmi_kcs.c Fri Feb 6 18:41:57 2015 (r278326) @@ -184,6 +184,8 @@ kcs_start_write(struct ipmi_softc *sc) for (retry = 0; retry < 10; retry++) { /* Wait for IBF = 0 */ status = kcs_wait_for_ibf(sc, 0); + if (status & KCS_STATUS_IBF) + return (0); /* Clear OBF */ kcs_clear_obf(sc, status); @@ -193,6 +195,9 @@ kcs_start_write(struct ipmi_softc *sc) /* Wait for IBF = 0 */ status = kcs_wait_for_ibf(sc, 0); + if (status & KCS_STATUS_IBF) + return (0); + if (KCS_STATUS_STATE(status) == KCS_STATUS_STATE_WRITE) break; DELAY(1000000); @@ -222,6 +227,8 @@ kcs_write_byte(struct ipmi_softc *sc, u_ /* Wait for IBF = 0 */ status = kcs_wait_for_ibf(sc, 0); + if (status & KCS_STATUS_IBF) + return (0); if (KCS_STATUS_STATE(status) != KCS_STATUS_STATE_WRITE) return (0); @@ -244,6 +251,8 @@ kcs_write_last_byte(struct ipmi_softc *s /* Wait for IBF = 0 */ status = kcs_wait_for_ibf(sc, 0); + if (status & KCS_STATUS_IBF) + return (0); if (KCS_STATUS_STATE(status) != KCS_STATUS_STATE_WRITE) /* error state */ @@ -274,6 +283,8 @@ kcs_read_byte(struct ipmi_softc *sc, u_c /* Wait for OBF = 1 */ status = kcs_wait_for_obf(sc, 1); + if ((status & KCS_STATUS_OBF) == 0) + return (0); /* Read Data_out */ *data = INB(sc, KCS_DATA); @@ -288,6 +299,8 @@ kcs_read_byte(struct ipmi_softc *sc, u_c /* Wait for OBF = 1*/ status = kcs_wait_for_obf(sc, 1); + if ((status & KCS_STATUS_OBF) == 0) + return (0); /* Read Dummy */ dummy = INB(sc, KCS_DATA); From owner-svn-src-stable@FreeBSD.ORG Fri Feb 6 19:01:00 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from hub.FreeBSD.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CA3258C6; Fri, 6 Feb 2015 19:00:59 +0000 (UTC) Date: Fri, 6 Feb 2015 19:00:55 +0000 From: Glen Barber To: Adam Weinberger Subject: Re: svn commit: r278258 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <20150206190055.GE1300@hub.FreeBSD.org> References: <201502051307.t15D7f3C013141@svn.freebsd.org> <346B0A61-964A-4009-9D5D-A5B79970182B@adamw.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="UnaWdueM1EBWVRzC" Content-Disposition: inline In-Reply-To: <346B0A61-964A-4009-9D5D-A5B79970182B@adamw.org> X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Feb 2015 19:01:00 -0000 --UnaWdueM1EBWVRzC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 06, 2015 at 06:35:06AM -0700, Adam Weinberger wrote: > > On 5 Feb, 2015, at 6:07, Glen Barber wrote: > It also notes: >=20 > > + Source-based upgrades (those based on recompiling the &os; > > + base system from source code) from previous versions are > > + supported, according to the instructions in > > + /usr/src/UPDATING. >=20 > Any chance something similar can happen for /usr/src/UPDATING? > In the stable/* and releng/* branches, the how-to-upgrade information > appears nearly 2,000 lines down. Maybe: >=20 > - Everything from most recent branch, (or most recent - 1?) onward > - "COMMON ITEMS" > - Everything else >=20 I like this idea. I've also been kicking around the idea of moving the 'COMMON ITEMS' and everything else to a separate file, since they tend to change less regularly. Thoughts on which approach would be more beneficial for the end-user? Glen --UnaWdueM1EBWVRzC Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJU1Q9nAAoJEAMUWKVHj+KTH2YQAJoidJPd1MmN28jX9g26oDnZ Wd/qJz6F50/s8sbO3OyMi0cMy2YUAPWBxgz7uzkwVRgEs6uTQzzoYx4Mrnxq/0i0 Ak6zW/RHGlrE39QhT5QDkKo4jSM4IqQsXME1QkSr0X6EucjgMwb3Cg/i6dKB4kqj mQd81Z2ENMRv7pkb+XiYoY5yha+h0hl1sySmQG9EVj6vkFSZu4c1wtlQS3IYyRpW jJsNFOL8gR5TF2rflqhOy+gdINFwbpQfy0zW2qx3qwcCROMorl81G5G9hS0ejAwI 8SgJ/4h3rngIy19T27HMPloZO/TCoiGqeWctmcwuGlzrngEg1sQqF+kLoeFxeIjy 5LDAyJ2TBohPmW0xFJfdTUC9D5gjmGChjmBmp2HspUwDYSzhziGaM8o+D/8nz2jy H+EafoTYGk6pb6uLjQ1gAgaa/9LOs7MTV1nl5eT/6Zq5MS4mLSrOnqtmS0OUgUJK bQ8gdVj6djVKAv7SJPODis1AR2yRxJOEpusDldHuf9ZZwSttJ0w5nnTngm5UGXSx 4ES0R2Ir6kH+G0h1thKaS1k1XzHpv8G15X9HRhAzMDnB9dlyN1m4ntIwTeeitaF5 JW6Vkdq22/uSdCnH076Yc0jxYgxnBUEIh6MVYZeoBSFGJSSznEnUxzOE96iz5DDs UjCghqKyPiTCoYcqxGaW =sEFd -----END PGP SIGNATURE----- --UnaWdueM1EBWVRzC-- From owner-svn-src-stable@FreeBSD.ORG Fri Feb 6 19:44:27 2015 Return-Path: Delivered-To: svn-src-stable@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 D11F43CD; Fri, 6 Feb 2015 19:44:27 +0000 (UTC) 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 BCCC71FA; Fri, 6 Feb 2015 19:44:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t16JiRt9094388; Fri, 6 Feb 2015 19:44:27 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t16JiRSV094387; Fri, 6 Feb 2015 19:44:27 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201502061944.t16JiRSV094387@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 6 Feb 2015 19:44: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: r278328 - stable/10/release/doc/en_US.ISO8859-1/errata X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Feb 2015 19:44:27 -0000 Author: gjb Date: Fri Feb 6 19:44:26 2015 New Revision: 278328 URL: https://svnweb.freebsd.org/changeset/base/278328 Log: Document a failure case when using freebsd-update to upgrade systems that use nss_ldap. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Fri Feb 6 19:41:23 2015 (r278327) +++ stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Fri Feb 6 19:44:26 2015 (r278328) @@ -212,6 +212,26 @@ boot &prompt.root; pkg bootstrap &prompt.root; pkg install xorg-server xorg gnome2 [...] + + + [2015-02-06] Affects binary upgrade + users: The second phase of + freebsd-update install, the phase where + the running userland is upgraded, fails on systems deployed + with nss_ldap enabled in + &man.nsswitch.conf.5; when upgrading from 10.0-RELEASE to + 10.1-RELEASE. + + A workaround is to disable nss_ldap + in &man.nsswitch.conf.5; prior to running + freebsd-update install to upgrade the + userland, after which it can be enabled again when the + upgrade process is completed. + + The problem is being investigated, and an Errata Notice + is expected to be issued when a solution to the problem is + identified. + From owner-svn-src-stable@FreeBSD.ORG Fri Feb 6 21:35:01 2015 Return-Path: Delivered-To: svn-src-stable@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 10A17738; Fri, 6 Feb 2015 21:35:01 +0000 (UTC) Received: from apnoea.adamw.org (apnoea.adamw.org [204.109.59.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DCBE7D3; Fri, 6 Feb 2015 21:35:00 +0000 (UTC) Received: from [192.168.192.25] (67-0-108-129.albq.qwest.net [67.0.108.129]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by apnoea.adamw.org (Postfix) with ESMTPSA id B6BD41257BA; Fri, 6 Feb 2015 14:34:58 -0700 (MST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r278258 - stable/10/release/doc/en_US.ISO8859-1/relnotes From: Adam Weinberger In-Reply-To: <20150206190055.GE1300@hub.FreeBSD.org> Date: Fri, 6 Feb 2015 14:34:57 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201502051307.t15D7f3C013141@svn.freebsd.org> <346B0A61-964A-4009-9D5D-A5B79970182B@adamw.org> <20150206190055.GE1300@hub.FreeBSD.org> To: Glen Barber X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Feb 2015 21:35:01 -0000 > On 6 Feb, 2015, at 12:00, Glen Barber wrote: >=20 > On Fri, Feb 06, 2015 at 06:35:06AM -0700, Adam Weinberger wrote: >>> On 5 Feb, 2015, at 6:07, Glen Barber wrote: >> It also notes: >>=20 >>> + Source-based upgrades (those based on recompiling the = &os; >>> + base system from source code) from previous versions are >>> + supported, according to the instructions in >>> + /usr/src/UPDATING. >>=20 >> Any chance something similar can happen for /usr/src/UPDATING? >> In the stable/* and releng/* branches, the how-to-upgrade information >> appears nearly 2,000 lines down. Maybe: >>=20 >> - Everything from most recent branch, (or most recent - 1?) onward >> - "COMMON ITEMS" >> - Everything else >>=20 >=20 > I like this idea. >=20 > I've also been kicking around the idea of moving the 'COMMON ITEMS' = and > everything else to a separate file, since they tend to change less > regularly. >=20 > Thoughts on which approach would be more beneficial for the end-user? If I were an end-user, the first place I'd want to look for build = instructions would be a file called BUILD_INSTRUCTIONS. :-) # Adam --=20 Adam Weinberger adamw@adamw.org http://www.adamw.org From owner-svn-src-stable@FreeBSD.ORG Sat Feb 7 08:14:21 2015 Return-Path: Delivered-To: svn-src-stable@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 33505ED3; Sat, 7 Feb 2015 08:14:21 +0000 (UTC) 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 1D6A4891; Sat, 7 Feb 2015 08:14:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t178EKkk047432; Sat, 7 Feb 2015 08:14:20 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t178EKZC047430; Sat, 7 Feb 2015 08:14:20 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201502070814.t178EKZC047430@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 7 Feb 2015 08: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: r278344 - 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-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Feb 2015 08:14:21 -0000 Author: kib Date: Sat Feb 7 08:14:20 2015 New Revision: 278344 URL: https://svnweb.freebsd.org/changeset/base/278344 Log: MFC r277642: Provide individual prototype and generate macros for the red-black tree. Modified: stable/10/share/man/man3/tree.3 stable/10/sys/sys/tree.h Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man3/tree.3 ============================================================================== --- stable/10/share/man/man3/tree.3 Sat Feb 7 05:02:10 2015 (r278343) +++ stable/10/share/man/man3/tree.3 Sat Feb 7 08:14:20 2015 (r278344) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 4, 2013 +.Dd January 24, 2015 .Dt TREE 3 .Os .Sh NAME @@ -53,8 +53,26 @@ .Nm SPLAY_REMOVE , .Nm RB_PROTOTYPE , .Nm RB_PROTOTYPE_STATIC , +.Nm RB_PROTOTYPE_INSERT , +.Nm RB_PROTOTYPE_INSERT_COLOR , +.Nm RB_PROTOTYPE_REMOVE , +.Nm RB_PROTOTYPE_REMOVE_COLOR , +.Nm RB_PROTOTYPE_FIND , +.Nm RB_PROTOTYPE_NFIND , +.Nm RB_PROTOTYPE_NEXT , +.Nm RB_PROTOTYPE_PREV , +.Nm RB_PROTOTYPE_MINMAX , .Nm RB_GENERATE , .Nm RB_GENERATE_STATIC , +.Nm RB_GENERATE_INSERT , +.Nm RB_GENERATE_INSERT_COLOR , +.Nm RB_GENERATE_REMOVE , +.Nm RB_GENERATE_REMOVE_COLOR , +.Nm RB_GENERATE_FIND , +.Nm RB_GENERATE_NFIND , +.Nm RB_GENERATE_NEXT , +.Nm RB_GENERATE_PREV , +.Nm RB_GENERATE_MINMAX , .Nm RB_ENTRY , .Nm RB_HEAD , .Nm RB_INITIALIZER , @@ -109,8 +127,26 @@ .Fn SPLAY_REMOVE NAME "SPLAY_HEAD *head" "struct TYPE *elm" .Fn RB_PROTOTYPE NAME TYPE FIELD CMP .Fn RB_PROTOTYPE_STATIC NAME TYPE FIELD CMP +.Fn RB_PROTOTYPE_INSERT NAME TYPE ATTR +.Fn RB_PROTOTYPE_INSERT_COLOR NAME TYPE ATTR +.Fn RB_PROTOTYPE_REMOVE NAME TYPE ATTR +.Fn RB_PROTOTYPE_REMOVE_COLOR NAME TYPE ATTR +.Fn RB_PROTOTYPE_FIND NAME TYPE ATTR +.Fn RB_PROTOTYPE_NFIND NAME TYPE ATTR +.Fn RB_PROTOTYPE_NEXT NAME TYPE ATTR +.Fn RB_PROTOTYPE_PREV NAME TYPE ATTR +.Fn RB_PROTOTYPE_MINMAX NAME TYPE ATTR .Fn RB_GENERATE NAME TYPE FIELD CMP .Fn RB_GENERATE_STATIC NAME TYPE FIELD CMP +.Fn RB_GENERATE_INSERT NAME TYPE FIELD CMP ATTR +.Fn RB_GENERATE_INSERT_COLOR NAME TYPE FIELD ATTR +.Fn RB_GENERATE_REMOVE NAME TYPE FIELD ATTR +.Fn RB_GENERATE_REMOVE_COLOR NAME TYPE FIELD ATTR +.Fn RB_GENERATE_FIND NAME TYPE FIELD CMP ATTR +.Fn RB_GENERATE_NFIND NAME TYPE FIELD CMP ATTR +.Fn RB_GENERATE_NEXT NAME TYPE FIELD ATTR +.Fn RB_GENERATE_PREV NAME TYPE FIELD ATTR +.Fn RB_GENERATE_MINMAX NAME TYPE FIELD ATTR .Fn RB_ENTRY TYPE .Fn RB_HEAD HEADNAME TYPE .Fn RB_INITIALIZER "RB_HEAD *head" @@ -373,6 +409,27 @@ The .Fa FIELD argument is the name of the element defined by .Fn RB_ENTRY . +Individual prototypes can be declared with +.Fn RB_PROTOTYPE_INSERT , +.Fn RB_PROTOTYPE_INSERT_COLOR , +.Fn RB_PROTOTYPE_REMOVE , +.Fn RB_PROTOTYPE_REMOVE_COLOR , +.Fn RB_PROTOTYPE_FIND , +.Fn RB_PROTOTYPE_NFIND , +.Fn RB_PROTOTYPE_NEXT , +.Fn RB_PROTOTYPE_PREV , +and +.Fn RB_PROTOTYPE_MINMAX +in case not all functions are required. The individual prototype macros expect +.Fa NAME , +.Fa TYPE , +and +.Fa ATTR +arguments. The +.Fa ATTR +argument must be empty for global functions or +.Fa static +for static functions. .Pp The function bodies are generated with the .Fn RB_GENERATE @@ -384,6 +441,18 @@ These macros take the same arguments as and .Fn RB_PROTOTYPE_STATIC macros, but should be used only once. +As an alternative individual function bodies are generated with the +.Fn RB_GENERATE_INSERT , +.Fn RB_GENERATE_INSERT_COLOR , +.Fn RB_GENERATE_REMOVE , +.Fn RB_GENERATE_REMOVE_COLOR , +.Fn RB_GENERATE_FIND , +.Fn RB_GENERATE_NFIND , +.Fn RB_GENERATE_NEXT , +.Fn RB_GENERATE_PREV , +and +.Fn RB_GENERATE_MINMAX +macros. .Pp Finally, the Modified: stable/10/sys/sys/tree.h ============================================================================== --- stable/10/sys/sys/tree.h Sat Feb 7 05:02:10 2015 (r278343) +++ stable/10/sys/sys/tree.h Sat Feb 7 08:14:20 2015 (r278344) @@ -383,16 +383,33 @@ struct { \ #define RB_PROTOTYPE_STATIC(name, type, field, cmp) \ RB_PROTOTYPE_INTERNAL(name, type, field, cmp, __unused static) #define RB_PROTOTYPE_INTERNAL(name, type, field, cmp, attr) \ -attr void name##_RB_INSERT_COLOR(struct name *, struct type *); \ -attr void name##_RB_REMOVE_COLOR(struct name *, struct type *, struct type *);\ -attr struct type *name##_RB_REMOVE(struct name *, struct type *); \ -attr struct type *name##_RB_INSERT(struct name *, struct type *); \ -attr struct type *name##_RB_FIND(struct name *, struct type *); \ -attr struct type *name##_RB_NFIND(struct name *, struct type *); \ -attr struct type *name##_RB_NEXT(struct type *); \ -attr struct type *name##_RB_PREV(struct type *); \ -attr struct type *name##_RB_MINMAX(struct name *, int); \ - \ + RB_PROTOTYPE_INSERT_COLOR(name, type, attr); \ + RB_PROTOTYPE_REMOVE_COLOR(name, type, attr); \ + RB_PROTOTYPE_INSERT(name, type, attr); \ + RB_PROTOTYPE_REMOVE(name, type, attr); \ + RB_PROTOTYPE_FIND(name, type, attr); \ + RB_PROTOTYPE_NFIND(name, type, attr); \ + RB_PROTOTYPE_NEXT(name, type, attr); \ + RB_PROTOTYPE_PREV(name, type, attr); \ + RB_PROTOTYPE_MINMAX(name, type, attr); +#define RB_PROTOTYPE_INSERT_COLOR(name, type, attr) \ + attr void name##_RB_INSERT_COLOR(struct name *, struct type *) +#define RB_PROTOTYPE_REMOVE_COLOR(name, type, attr) \ + attr void name##_RB_REMOVE_COLOR(struct name *, struct type *, struct type *) +#define RB_PROTOTYPE_REMOVE(name, type, attr) \ + attr struct type *name##_RB_REMOVE(struct name *, struct type *) +#define RB_PROTOTYPE_INSERT(name, type, attr) \ + attr struct type *name##_RB_INSERT(struct name *, struct type *) +#define RB_PROTOTYPE_FIND(name, type, attr) \ + attr struct type *name##_RB_FIND(struct name *, struct type *) +#define RB_PROTOTYPE_NFIND(name, type, attr) \ + attr struct type *name##_RB_NFIND(struct name *, struct type *) +#define RB_PROTOTYPE_NEXT(name, type, attr) \ + attr struct type *name##_RB_NEXT(struct type *) +#define RB_PROTOTYPE_PREV(name, type, attr) \ + attr struct type *name##_RB_PREV(struct type *) +#define RB_PROTOTYPE_MINMAX(name, type, attr) \ + attr struct type *name##_RB_MINMAX(struct name *, int) /* Main rb operation. * Moves node close to the key of elm to top @@ -402,6 +419,17 @@ attr struct type *name##_RB_MINMAX(struc #define RB_GENERATE_STATIC(name, type, field, cmp) \ RB_GENERATE_INTERNAL(name, type, field, cmp, __unused static) #define RB_GENERATE_INTERNAL(name, type, field, cmp, attr) \ + RB_GENERATE_INSERT_COLOR(name, type, field, attr) \ + RB_GENERATE_REMOVE_COLOR(name, type, field, attr) \ + RB_GENERATE_INSERT(name, type, field, cmp, attr) \ + RB_GENERATE_REMOVE(name, type, field, attr) \ + RB_GENERATE_FIND(name, type, field, cmp, attr) \ + RB_GENERATE_NFIND(name, type, field, cmp, attr) \ + RB_GENERATE_NEXT(name, type, field, attr) \ + RB_GENERATE_PREV(name, type, field, attr) \ + RB_GENERATE_MINMAX(name, type, field, attr) + +#define RB_GENERATE_INSERT_COLOR(name, type, field, attr) \ attr void \ name##_RB_INSERT_COLOR(struct name *head, struct type *elm) \ { \ @@ -444,8 +472,9 @@ name##_RB_INSERT_COLOR(struct name *head } \ } \ RB_COLOR(head->rbh_root, field) = RB_BLACK; \ -} \ - \ +} + +#define RB_GENERATE_REMOVE_COLOR(name, type, field, attr) \ attr void \ name##_RB_REMOVE_COLOR(struct name *head, struct type *parent, struct type *elm) \ { \ @@ -522,8 +551,9 @@ name##_RB_REMOVE_COLOR(struct name *head } \ if (elm) \ RB_COLOR(elm, field) = RB_BLACK; \ -} \ - \ +} + +#define RB_GENERATE_REMOVE(name, type, field, attr) \ attr struct type * \ name##_RB_REMOVE(struct name *head, struct type *elm) \ { \ @@ -590,7 +620,8 @@ color: \ name##_RB_REMOVE_COLOR(head, parent, child); \ return (old); \ } \ - \ + +#define RB_GENERATE_INSERT(name, type, field, cmp, attr) \ /* Inserts a node into the RB tree */ \ attr struct type * \ name##_RB_INSERT(struct name *head, struct type *elm) \ @@ -620,8 +651,9 @@ name##_RB_INSERT(struct name *head, stru RB_ROOT(head) = elm; \ name##_RB_INSERT_COLOR(head, elm); \ return (NULL); \ -} \ - \ +} + +#define RB_GENERATE_FIND(name, type, field, cmp, attr) \ /* Finds the node with the same key as elm */ \ attr struct type * \ name##_RB_FIND(struct name *head, struct type *elm) \ @@ -638,8 +670,9 @@ name##_RB_FIND(struct name *head, struct return (tmp); \ } \ return (NULL); \ -} \ - \ +} + +#define RB_GENERATE_NFIND(name, type, field, cmp, attr) \ /* Finds the first node greater than or equal to the search key */ \ attr struct type * \ name##_RB_NFIND(struct name *head, struct type *elm) \ @@ -659,8 +692,9 @@ name##_RB_NFIND(struct name *head, struc return (tmp); \ } \ return (res); \ -} \ - \ +} + +#define RB_GENERATE_NEXT(name, type, field, attr) \ /* ARGSUSED */ \ attr struct type * \ name##_RB_NEXT(struct type *elm) \ @@ -681,8 +715,9 @@ name##_RB_NEXT(struct type *elm) \ } \ } \ return (elm); \ -} \ - \ +} + +#define RB_GENERATE_PREV(name, type, field, attr) \ /* ARGSUSED */ \ attr struct type * \ name##_RB_PREV(struct type *elm) \ @@ -703,8 +738,9 @@ name##_RB_PREV(struct type *elm) \ } \ } \ return (elm); \ -} \ - \ +} + +#define RB_GENERATE_MINMAX(name, type, field, attr) \ attr struct type * \ name##_RB_MINMAX(struct name *head, int val) \ { \ From owner-svn-src-stable@FreeBSD.ORG Sat Feb 7 08:35:19 2015 Return-Path: Delivered-To: svn-src-stable@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 4CB80664; Sat, 7 Feb 2015 08:35:19 +0000 (UTC) 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 1DAA3A9F; Sat, 7 Feb 2015 08:35:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t178ZI07057096; Sat, 7 Feb 2015 08:35:18 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t178ZI8p057095; Sat, 7 Feb 2015 08:35:18 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201502070835.t178ZI8p057095@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 7 Feb 2015 08:35: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: r278345 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Feb 2015 08:35:19 -0000 Author: kib Date: Sat Feb 7 08:35:18 2015 New Revision: 278345 URL: https://svnweb.freebsd.org/changeset/base/278345 Log: MFC r277970: Check for the cycle in the chain of dependency for priority-inheritance mutexes. Modified: stable/10/sys/kern/kern_umtx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_umtx.c ============================================================================== --- stable/10/sys/kern/kern_umtx.c Sat Feb 7 08:14:20 2015 (r278344) +++ stable/10/sys/kern/kern_umtx.c Sat Feb 7 08:35:18 2015 (r278345) @@ -1667,6 +1667,47 @@ umtx_pi_adjust_thread(struct umtx_pi *pi return (1); } +static struct umtx_pi * +umtx_pi_next(struct umtx_pi *pi) +{ + struct umtx_q *uq_owner; + + if (pi->pi_owner == NULL) + return (NULL); + uq_owner = pi->pi_owner->td_umtxq; + if (uq_owner == NULL) + return (NULL); + return (uq_owner->uq_pi_blocked); +} + +/* + * Floyd's Cycle-Finding Algorithm. + */ +static bool +umtx_pi_check_loop(struct umtx_pi *pi) +{ + struct umtx_pi *pi1; /* fast iterator */ + + mtx_assert(&umtx_lock, MA_OWNED); + if (pi == NULL) + return (false); + pi1 = pi; + for (;;) { + pi = umtx_pi_next(pi); + if (pi == NULL) + break; + pi1 = umtx_pi_next(pi1); + if (pi1 == NULL) + break; + pi1 = umtx_pi_next(pi1); + if (pi1 == NULL) + break; + if (pi == pi1) + return (true); + } + return (false); +} + /* * Propagate priority when a thread is blocked on POSIX * PI mutex. @@ -1684,6 +1725,8 @@ umtx_propagate_priority(struct thread *t pi = uq->uq_pi_blocked; if (pi == NULL) return; + if (umtx_pi_check_loop(pi)) + return; for (;;) { td = pi->pi_owner; @@ -1727,6 +1770,8 @@ umtx_repropagate_priority(struct umtx_pi mtx_assert(&umtx_lock, MA_OWNED); + if (umtx_pi_check_loop(pi)) + return; while (pi != NULL && pi->pi_owner != NULL) { pri = PRI_MAX; uq_owner = pi->pi_owner->td_umtxq; @@ -2059,8 +2104,7 @@ do_lock_pi(struct thread *td, struct umu continue; } - if ((flags & UMUTEX_ERROR_CHECK) != 0 && - (owner & ~UMUTEX_CONTESTED) == id) { + if ((owner & ~UMUTEX_CONTESTED) == id) { error = EDEADLK; break; } From owner-svn-src-stable@FreeBSD.ORG Sat Feb 7 08:42:12 2015 Return-Path: Delivered-To: svn-src-stable@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 901E7938; Sat, 7 Feb 2015 08:42:12 +0000 (UTC) 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 7B4F8BC1; Sat, 7 Feb 2015 08:42:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t178gCpx061367; Sat, 7 Feb 2015 08:42:12 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t178gC9T061366; Sat, 7 Feb 2015 08:42:12 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201502070842.t178gC9T061366@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 7 Feb 2015 08:42: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: r278346 - stable/10/sys/fs/tmpfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Feb 2015 08:42:12 -0000 Author: kib Date: Sat Feb 7 08:42:11 2015 New Revision: 278346 URL: https://svnweb.freebsd.org/changeset/base/278346 Log: MFC r278000: Update directory times immediately after an entry is created or removed. Modified: stable/10/sys/fs/tmpfs/tmpfs_subr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs_subr.c Sat Feb 7 08:35:18 2015 (r278345) +++ stable/10/sys/fs/tmpfs/tmpfs_subr.c Sat Feb 7 08:42:11 2015 (r278346) @@ -991,6 +991,7 @@ tmpfs_dir_attach(struct vnode *vp, struc dnode->tn_size += sizeof(struct tmpfs_dirent); dnode->tn_status |= TMPFS_NODE_ACCESSED | TMPFS_NODE_CHANGED | \ TMPFS_NODE_MODIFIED; + tmpfs_update(vp); } /* @@ -1036,6 +1037,7 @@ tmpfs_dir_detach(struct vnode *vp, struc dnode->tn_size -= sizeof(struct tmpfs_dirent); dnode->tn_status |= TMPFS_NODE_ACCESSED | TMPFS_NODE_CHANGED | \ TMPFS_NODE_MODIFIED; + tmpfs_update(vp); } void From owner-svn-src-stable@FreeBSD.ORG Sat Feb 7 08:47:18 2015 Return-Path: Delivered-To: svn-src-stable@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 DBBF6B6D; Sat, 7 Feb 2015 08:47:18 +0000 (UTC) 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 BBC9EBEE; Sat, 7 Feb 2015 08:47:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t178lIEr062065; Sat, 7 Feb 2015 08:47:18 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t178lGXI062055; Sat, 7 Feb 2015 08:47:16 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201502070847.t178lGXI062055@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 7 Feb 2015 08: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: r278347 - in stable/10/sys: amd64/amd64 amd64/ia32 arm/arm i386/i386 mips/mips powerpc/powerpc sparc64/sparc64 sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Feb 2015 08:47:19 -0000 Author: kib Date: Sat Feb 7 08:47:15 2015 New Revision: 278347 URL: https://svnweb.freebsd.org/changeset/base/278347 Log: MFC r278001: Do not qualify the mcontext_t *mcp argument for set_mcontext(9) as const. Modified: stable/10/sys/amd64/amd64/machdep.c stable/10/sys/amd64/ia32/ia32_signal.c stable/10/sys/arm/arm/machdep.c stable/10/sys/i386/i386/machdep.c stable/10/sys/mips/mips/freebsd32_machdep.c stable/10/sys/mips/mips/pm_machdep.c stable/10/sys/powerpc/powerpc/exec_machdep.c stable/10/sys/sparc64/sparc64/machdep.c stable/10/sys/sys/ucontext.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/machdep.c Sat Feb 7 08:42:11 2015 (r278346) +++ stable/10/sys/amd64/amd64/machdep.c Sat Feb 7 08:47:15 2015 (r278347) @@ -159,7 +159,7 @@ extern u_int64_t hammer_time(u_int64_t, static void cpu_startup(void *); static void get_fpcontext(struct thread *td, mcontext_t *mcp, char *xfpusave, size_t xfpusave_len); -static int set_fpcontext(struct thread *td, const mcontext_t *mcp, +static int set_fpcontext(struct thread *td, mcontext_t *mcp, char *xfpustate, size_t xfpustate_len); SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL); @@ -2411,7 +2411,7 @@ get_mcontext(struct thread *td, mcontext * touch the cs selector. */ int -set_mcontext(struct thread *td, const mcontext_t *mcp) +set_mcontext(struct thread *td, mcontext_t *mcp) { struct pcb *pcb; struct trapframe *tp; @@ -2498,7 +2498,7 @@ get_fpcontext(struct thread *td, mcontex } static int -set_fpcontext(struct thread *td, const mcontext_t *mcp, char *xfpustate, +set_fpcontext(struct thread *td, mcontext_t *mcp, char *xfpustate, size_t xfpustate_len) { struct savefpu *fpstate; Modified: stable/10/sys/amd64/ia32/ia32_signal.c ============================================================================== --- stable/10/sys/amd64/ia32/ia32_signal.c Sat Feb 7 08:42:11 2015 (r278346) +++ stable/10/sys/amd64/ia32/ia32_signal.c Sat Feb 7 08:47:15 2015 (r278347) @@ -118,7 +118,7 @@ ia32_get_fpcontext(struct thread *td, st } static int -ia32_set_fpcontext(struct thread *td, const struct ia32_mcontext *mcp, +ia32_set_fpcontext(struct thread *td, struct ia32_mcontext *mcp, char *xfpustate, size_t xfpustate_len) { int error; @@ -197,7 +197,7 @@ ia32_get_mcontext(struct thread *td, str * touch the cs selector. */ static int -ia32_set_mcontext(struct thread *td, const struct ia32_mcontext *mcp) +ia32_set_mcontext(struct thread *td, struct ia32_mcontext *mcp) { struct trapframe *tp; char *xfpustate; Modified: stable/10/sys/arm/arm/machdep.c ============================================================================== --- stable/10/sys/arm/arm/machdep.c Sat Feb 7 08:42:11 2015 (r278346) +++ stable/10/sys/arm/arm/machdep.c Sat Feb 7 08:47:15 2015 (r278347) @@ -697,7 +697,7 @@ get_mcontext(struct thread *td, mcontext * touch the cs selector. */ int -set_mcontext(struct thread *td, const mcontext_t *mcp) +set_mcontext(struct thread *td, mcontext_t *mcp) { struct trapframe *tf = td->td_frame; const __greg_t *gr = mcp->__gregs; Modified: stable/10/sys/i386/i386/machdep.c ============================================================================== --- stable/10/sys/i386/i386/machdep.c Sat Feb 7 08:42:11 2015 (r278346) +++ stable/10/sys/i386/i386/machdep.c Sat Feb 7 08:47:15 2015 (r278347) @@ -197,7 +197,7 @@ static void cpu_startup(void *); static void fpstate_drop(struct thread *td); static void get_fpcontext(struct thread *td, mcontext_t *mcp, char *xfpusave, size_t xfpusave_len); -static int set_fpcontext(struct thread *td, const mcontext_t *mcp, +static int set_fpcontext(struct thread *td, mcontext_t *mcp, char *xfpustate, size_t xfpustate_len); #ifdef CPU_ENABLE_SSE static void set_fpregs_xmm(struct save87 *, struct savexmm *); @@ -3839,7 +3839,7 @@ get_mcontext(struct thread *td, mcontext * touch the cs selector. */ int -set_mcontext(struct thread *td, const mcontext_t *mcp) +set_mcontext(struct thread *td, mcontext_t *mcp) { struct trapframe *tp; char *xfpustate; @@ -3917,7 +3917,7 @@ get_fpcontext(struct thread *td, mcontex } static int -set_fpcontext(struct thread *td, const mcontext_t *mcp, char *xfpustate, +set_fpcontext(struct thread *td, mcontext_t *mcp, char *xfpustate, size_t xfpustate_len) { union savefpu *fpstate; Modified: stable/10/sys/mips/mips/freebsd32_machdep.c ============================================================================== --- stable/10/sys/mips/mips/freebsd32_machdep.c Sat Feb 7 08:42:11 2015 (r278346) +++ stable/10/sys/mips/mips/freebsd32_machdep.c Sat Feb 7 08:47:15 2015 (r278347) @@ -68,7 +68,7 @@ static void freebsd32_exec_setregs(struct thread *, struct image_params *, u_long); static int get_mcontext32(struct thread *, mcontext32_t *, int); -static int set_mcontext32(struct thread *, const mcontext32_t *); +static int set_mcontext32(struct thread *, mcontext32_t *); static void freebsd32_sendsig(sig_t, ksiginfo_t *, sigset_t *); extern const char *freebsd32_syscallnames[]; @@ -227,7 +227,7 @@ get_mcontext32(struct thread *td, mconte } static int -set_mcontext32(struct thread *td, const mcontext32_t *mcp) +set_mcontext32(struct thread *td, mcontext32_t *mcp) { mcontext_t mcp64; unsigned i; Modified: stable/10/sys/mips/mips/pm_machdep.c ============================================================================== --- stable/10/sys/mips/mips/pm_machdep.c Sat Feb 7 08:42:11 2015 (r278346) +++ stable/10/sys/mips/mips/pm_machdep.c Sat Feb 7 08:47:15 2015 (r278347) @@ -396,7 +396,7 @@ get_mcontext(struct thread *td, mcontext } int -set_mcontext(struct thread *td, const mcontext_t *mcp) +set_mcontext(struct thread *td, mcontext_t *mcp) { struct trapframe *tp; Modified: stable/10/sys/powerpc/powerpc/exec_machdep.c ============================================================================== --- stable/10/sys/powerpc/powerpc/exec_machdep.c Sat Feb 7 08:42:11 2015 (r278346) +++ stable/10/sys/powerpc/powerpc/exec_machdep.c Sat Feb 7 08:47:15 2015 (r278347) @@ -442,7 +442,7 @@ get_mcontext(struct thread *td, mcontext } int -set_mcontext(struct thread *td, const mcontext_t *mcp) +set_mcontext(struct thread *td, mcontext_t *mcp) { struct pcb *pcb; struct trapframe *tf; @@ -739,7 +739,7 @@ get_mcontext32(struct thread *td, mconte } static int -set_mcontext32(struct thread *td, const mcontext32_t *mcp) +set_mcontext32(struct thread *td, mcontext32_t *mcp) { mcontext_t mcp64; int i, error; Modified: stable/10/sys/sparc64/sparc64/machdep.c ============================================================================== --- stable/10/sys/sparc64/sparc64/machdep.c Sat Feb 7 08:42:11 2015 (r278346) +++ stable/10/sys/sparc64/sparc64/machdep.c Sat Feb 7 08:47:15 2015 (r278347) @@ -815,7 +815,7 @@ get_mcontext(struct thread *td, mcontext } int -set_mcontext(struct thread *td, const mcontext_t *mc) +set_mcontext(struct thread *td, mcontext_t *mc) { struct trapframe *tf; struct pcb *pcb; Modified: stable/10/sys/sys/ucontext.h ============================================================================== --- stable/10/sys/sys/ucontext.h Sat Feb 7 08:42:11 2015 (r278346) +++ stable/10/sys/sys/ucontext.h Sat Feb 7 08:47:15 2015 (r278347) @@ -99,7 +99,7 @@ struct thread; /* Machine-dependent functions: */ int get_mcontext(struct thread *, mcontext_t *, int); -int set_mcontext(struct thread *, const mcontext_t *); +int set_mcontext(struct thread *, mcontext_t *); #endif /* !_KERNEL */