From owner-svn-src-stable-9@FreeBSD.ORG Sun Feb 1 01:42:39 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-9@FreeBSD.ORG Sun Feb 1 02:30:03 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-9@FreeBSD.ORG Mon Feb 2 07:30:01 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-9@FreeBSD.ORG Mon Feb 2 07:37:26 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-9@FreeBSD.ORG Mon Feb 2 07:42:04 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-9@FreeBSD.ORG Mon Feb 2 08:04:40 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-9@FreeBSD.ORG Mon Feb 2 08:05:13 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-9@FreeBSD.ORG Mon Feb 2 08:37:46 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-9@FreeBSD.ORG Mon Feb 2 09:23:19 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-9@FreeBSD.ORG Mon Feb 2 10:00:46 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-9@FreeBSD.ORG Mon Feb 2 12:10:26 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-9@FreeBSD.ORG Mon Feb 2 15:53:04 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-9@FreeBSD.ORG Mon Feb 2 18:48:50 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-9@FreeBSD.ORG Tue Feb 3 07:59:34 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-9@FreeBSD.ORG Tue Feb 3 08:03:20 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-9@FreeBSD.ORG Tue Feb 3 08:07:00 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-9@FreeBSD.ORG Tue Feb 3 14:37:39 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-9@FreeBSD.ORG Wed Feb 4 00:45:29 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-9@FreeBSD.ORG Wed Feb 4 00:52:27 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-9@FreeBSD.ORG Wed Feb 4 09:23:41 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-9@FreeBSD.ORG Wed Feb 4 10:36:12 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-9@FreeBSD.ORG Wed Feb 4 11:51:47 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-9@FreeBSD.ORG Wed Feb 4 19:40:32 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-9@FreeBSD.ORG Thu Feb 5 09:55:01 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-9@FreeBSD.ORG Thu Feb 5 10:06:45 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-9@FreeBSD.ORG Thu Feb 5 10:26:26 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-9@FreeBSD.ORG Thu Feb 5 10:50:52 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-9@FreeBSD.ORG Thu Feb 5 11:54:56 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-9@FreeBSD.ORG Thu Feb 5 17:46:15 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-9@FreeBSD.ORG Thu Feb 5 20:15:50 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-9@FreeBSD.ORG Thu Feb 5 20:59:22 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-9@FreeBSD.ORG Thu Feb 5 21:25:13 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-9@FreeBSD.ORG Thu Feb 5 21:38:01 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-9@FreeBSD.ORG Fri Feb 6 15:53:15 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-9@FreeBSD.ORG Fri Feb 6 18:13:31 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-9@FreeBSD.ORG Fri Feb 6 18:42:00 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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);