From owner-svn-src-stable@FreeBSD.ORG Sun Dec 22 00:45:13 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3AE72415; Sun, 22 Dec 2013 00:45: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 22EBA1FAD; Sun, 22 Dec 2013 00:45:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBM0jDqr088664; Sun, 22 Dec 2013 00:45:13 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBM0j86D088640; Sun, 22 Dec 2013 00:45:08 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312220045.rBM0j86D088640@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 22 Dec 2013 00:45:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259705 - in stable/9/contrib: binutils/binutils gcc gcc/cp gcc/doc gcclibs/libiberty gcclibs/libiberty/testsuite libstdc++/include/bits libstdc++/include/ext libstdc++/libsupc++ libstd... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Dec 2013 00:45:13 -0000 Author: pfg Date: Sun Dec 22 00:45:08 2013 New Revision: 259705 URL: http://svnweb.freebsd.org/changeset/base/259705 Log: MFC r258017, r258429, r258748, r258817: Merge updates from FSF pre4.3 GCC inspired on Apple's gcc: Updates to libiberty and mangling. New align attribute. Merge Apple updates to libstdc++. Added: stable/9/contrib/gcclibs/libiberty/ChangeLog.gcc43 - copied unchanged from r258817, head/contrib/gcclibs/libiberty/ChangeLog.gcc43 Modified: stable/9/contrib/binutils/binutils/cxxfilt.c stable/9/contrib/gcc/ChangeLog.gcc43 stable/9/contrib/gcc/builtins.c stable/9/contrib/gcc/c-common.c stable/9/contrib/gcc/c-decl.c stable/9/contrib/gcc/cp/decl.c stable/9/contrib/gcc/cp/mangle.c stable/9/contrib/gcc/cp/typeck.c stable/9/contrib/gcc/doc/extend.texi stable/9/contrib/gcc/flags.h stable/9/contrib/gcc/print-tree.c stable/9/contrib/gcc/toplev.c stable/9/contrib/gcc/tree.c stable/9/contrib/gcc/tree.h stable/9/contrib/gcc/varasm.c stable/9/contrib/gcclibs/libiberty/choose-temp.c stable/9/contrib/gcclibs/libiberty/cp-demangle.c stable/9/contrib/gcclibs/libiberty/cp-demangle.h stable/9/contrib/gcclibs/libiberty/floatformat.c stable/9/contrib/gcclibs/libiberty/functions.texi stable/9/contrib/gcclibs/libiberty/pex-unix.c stable/9/contrib/gcclibs/libiberty/strsignal.c stable/9/contrib/gcclibs/libiberty/testsuite/demangle-expected stable/9/contrib/gcclibs/libiberty/testsuite/test-demangle.c stable/9/contrib/libstdc++/include/bits/basic_string.h stable/9/contrib/libstdc++/include/bits/basic_string.tcc stable/9/contrib/libstdc++/include/bits/stl_algobase.h stable/9/contrib/libstdc++/include/bits/stl_tree.h stable/9/contrib/libstdc++/include/bits/stl_vector.h stable/9/contrib/libstdc++/include/ext/mt_allocator.h stable/9/contrib/libstdc++/include/ext/throw_allocator.h stable/9/contrib/libstdc++/libsupc++/eh_alloc.cc stable/9/contrib/libstdc++/src/mt_allocator.cc Directory Properties: stable/9/ (props changed) stable/9/contrib/binutils/ (props changed) stable/9/contrib/gcc/ (props changed) stable/9/contrib/gcclibs/ (props changed) stable/9/contrib/libstdc++/ (props changed) Modified: stable/9/contrib/binutils/binutils/cxxfilt.c ============================================================================== --- stable/9/contrib/binutils/binutils/cxxfilt.c Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/binutils/binutils/cxxfilt.c Sun Dec 22 00:45:08 2013 (r259705) @@ -63,12 +63,12 @@ demangle_it (char *mangled_name) result = cplus_demangle (mangled_name + skip_first, flags); if (result == NULL) - printf (mangled_name); + printf ("%s",mangled_name); else { if (mangled_name[0] == '.') putchar ('.'); - printf (result); + printf ("%s",result); free (result); } } Modified: stable/9/contrib/gcc/ChangeLog.gcc43 ============================================================================== --- stable/9/contrib/gcc/ChangeLog.gcc43 Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcc/ChangeLog.gcc43 Sun Dec 22 00:45:08 2013 (r259705) @@ -4,6 +4,47 @@ * config/arm/unwind-arm.h (__gnu_Unwind_Backtrace): New. * config/arm/unwind-arm.c (__gnu_Unwind_Backtrace): New. +2007-07-12 Geoffrey Keating (r126588) + + * builtins.c (get_pointer_alignment): Honor DECL_ALIGN on a + FUNCTION_DECL. + * tree.c (build_decl_stat): Move code from here... + (make_node_stat): ... to here. Don't uselessly clear DECL_USER_ALIGN. + (expr_align): Honor DECL_ALIGN on a FUNCTION_DECL. Add comment + about using DECL_ALIGN of LABEL_DECL and CONST_DECL. + * tree.h (DECL_USER_ALIGN): Fix misplaced comment. + * varasm.c (assemble_start_function): Use DECL_ALIGN instead of + FUNCTION_BOUNDARY. + +2007-07-09 Geoffrey Keating (r126529) + + PR 32617 + * c-common.c (c_alignof_expr): Look at DECL_ALIGN of + FUNCTION_DECLs. + (handle_aligned_attribute): Allow use on FUNCTION_DECLs. + * varasm.c (assemble_start_function): Honor DECL_ALIGN + for FUNCTION_DECLs. Don't use align_functions_log if + DECL_USER_ALIGN. + * print-tree.c (print_node): Print DECL_ALIGN and DECL_USER_ALIGN + even for FUNCTION_DECLs. + * c-decl.c (merge_decls): Propagate DECL_ALIGN even for + FUNCTION_DECLs. + * tree.h (DECL_ALIGN): Update for new location of 'align'. + (DECL_FUNCTION_CODE): Update for new location and name of + 'function_code'. + (DECL_OFFSET_ALIGN): Update for new location of 'off_align'. + (struct tree_decl_common): Move 'align' and 'off_align' out + of union, ensure they're still on a 32-bit boundary. Remove + other fields in union 'u1'. + (struct tree_function_decl): Add field 'function_code' replacing + 'u1.f' in tree_decl_common. + * tree.c (build_decl_stat): Set initial value of DECL_ALIGN. + * doc/extend.texi (Function Attributes): Add 'aligned' attribute. + (Variable Attributes): Cross-reference 'aligned' attribute + to Function Attributes. + * flags.h (force_align_functions_log): Delete. + * toplev.c (force_align_functions_log): Delete. + 2007-06-05 Joerg Wunsch (r125346) PR preprocessor/23479 @@ -48,7 +89,7 @@ alignment for amdfam10 architecture. Increasing the max loop alignment to 24 bytes. -2007-04-16 Lawrence Crowl +2007-04-16 Lawrence Crowl (r123909) * doc/invoke.texi (Debugging Options): Add documentation for the -femit-struct-debug options -femit-struct-debug-baseonly, @@ -121,7 +162,7 @@ * config/i386/i386.c (override_options): Likewise. * doc/invoke.texi: Likewise. -2007-03-12 Seongbae Park +2007-03-12 Seongbae Park (r122851) * c-decl.c (warn_variable_length_array): New function. Refactored from grokdeclarator to handle warn_vla @@ -322,7 +363,7 @@ * config.gcc: Support core2 processor. -2007-01-05 Manuel Lopez-Ibanez +2007-01-05 Manuel Lopez-Ibanez (r120505) PR c/19978 * tree.h (TREE_OVERFLOW_P): New. Modified: stable/9/contrib/gcc/builtins.c ============================================================================== --- stable/9/contrib/gcc/builtins.c Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcc/builtins.c Sun Dec 22 00:45:08 2013 (r259705) @@ -315,9 +315,7 @@ get_pointer_alignment (tree exp, unsigne else if (offset) inner = MIN (inner, BITS_PER_UNIT); } - if (TREE_CODE (exp) == FUNCTION_DECL) - align = FUNCTION_BOUNDARY; - else if (DECL_P (exp)) + if (DECL_P (exp)) align = MIN (inner, DECL_ALIGN (exp)); #ifdef CONSTANT_ALIGNMENT else if (CONSTANT_CLASS_P (exp)) Modified: stable/9/contrib/gcc/c-common.c ============================================================================== --- stable/9/contrib/gcc/c-common.c Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcc/c-common.c Sun Dec 22 00:45:08 2013 (r259705) @@ -2995,16 +2995,16 @@ c_sizeof_or_alignof_type (tree type, boo } /* Implement the __alignof keyword: Return the minimum required - alignment of EXPR, measured in bytes. For VAR_DECL's and - FIELD_DECL's return DECL_ALIGN (which can be set from an - "aligned" __attribute__ specification). */ + alignment of EXPR, measured in bytes. For VAR_DECLs, + FUNCTION_DECLs and FIELD_DECLs return DECL_ALIGN (which can be set + from an "aligned" __attribute__ specification). */ tree c_alignof_expr (tree expr) { tree t; - if (TREE_CODE (expr) == VAR_DECL) + if (VAR_OR_FUNCTION_DECL_P (expr)) t = size_int (DECL_ALIGN_UNIT (expr)); else if (TREE_CODE (expr) == COMPONENT_REF @@ -4809,12 +4809,24 @@ handle_aligned_attribute (tree *node, tr TYPE_ALIGN (*type) = (1 << i) * BITS_PER_UNIT; TYPE_USER_ALIGN (*type) = 1; } - else if (TREE_CODE (decl) != VAR_DECL + else if (! VAR_OR_FUNCTION_DECL_P (decl) && TREE_CODE (decl) != FIELD_DECL) { error ("alignment may not be specified for %q+D", decl); *no_add_attrs = true; } + else if (TREE_CODE (decl) == FUNCTION_DECL + && DECL_ALIGN (decl) > (1 << i) * BITS_PER_UNIT) + { + if (DECL_USER_ALIGN (decl)) + error ("alignment for %q+D was previously specified as %d " + "and may not be decreased", decl, + DECL_ALIGN (decl) / BITS_PER_UNIT); + else + error ("alignment for %q+D must be at least %d", decl, + DECL_ALIGN (decl) / BITS_PER_UNIT); + *no_add_attrs = true; + } else { DECL_ALIGN (decl) = (1 << i) * BITS_PER_UNIT; Modified: stable/9/contrib/gcc/c-decl.c ============================================================================== --- stable/9/contrib/gcc/c-decl.c Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcc/c-decl.c Sun Dec 22 00:45:08 2013 (r259705) @@ -1690,12 +1690,11 @@ merge_decls (tree newdecl, tree olddecl, DECL_SIZE (newdecl) = DECL_SIZE (olddecl); DECL_SIZE_UNIT (newdecl) = DECL_SIZE_UNIT (olddecl); DECL_MODE (newdecl) = DECL_MODE (olddecl); - if (TREE_CODE (olddecl) != FUNCTION_DECL) - if (DECL_ALIGN (olddecl) > DECL_ALIGN (newdecl)) - { - DECL_ALIGN (newdecl) = DECL_ALIGN (olddecl); - DECL_USER_ALIGN (newdecl) |= DECL_ALIGN (olddecl); - } + if (DECL_ALIGN (olddecl) > DECL_ALIGN (newdecl)) + { + DECL_ALIGN (newdecl) = DECL_ALIGN (olddecl); + DECL_USER_ALIGN (newdecl) |= DECL_ALIGN (olddecl); + } } Modified: stable/9/contrib/gcc/cp/decl.c ============================================================================== --- stable/9/contrib/gcc/cp/decl.c Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcc/cp/decl.c Sun Dec 22 00:45:08 2013 (r259705) @@ -3158,12 +3158,6 @@ cxx_init_decl_processing (void) if (flag_inline_functions) flag_inline_trees = 2; - /* Force minimum function alignment if using the least significant - bit of function pointers to store the virtual bit. */ - if (TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_pfn - && force_align_functions_log < 1) - force_align_functions_log = 1; - /* Initially, C. */ current_lang_name = lang_name_c; @@ -6065,6 +6059,14 @@ grokfndecl (tree ctype, if (TYPE_VOLATILE (type)) TREE_THIS_VOLATILE (decl) = 1; + /* If pointers to member functions use the least significant bit to + indicate whether a function is virtual, ensure a pointer + to this function will have that bit clear. */ + if (TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_pfn + && TREE_CODE (type) == METHOD_TYPE + && DECL_ALIGN (decl) < 2 * BITS_PER_UNIT) + DECL_ALIGN (decl) = 2 * BITS_PER_UNIT; + if (friendp && TREE_CODE (orig_declarator) == TEMPLATE_ID_EXPR) { Modified: stable/9/contrib/gcc/cp/mangle.c ============================================================================== --- stable/9/contrib/gcc/cp/mangle.c Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcc/cp/mangle.c Sun Dec 22 00:45:08 2013 (r259705) @@ -688,7 +688,8 @@ write_mangled_name (const tree decl, boo } } else if (TREE_CODE (decl) == VAR_DECL - /* The names of global variables aren't mangled. */ + /* The names of non-static global variables aren't mangled. */ + && DECL_EXTERNAL_LINKAGE_P (decl) && (CP_DECL_CONTEXT (decl) == global_namespace /* And neither are `extern "C"' variables. */ || DECL_EXTERN_C_P (decl))) @@ -1086,7 +1087,10 @@ write_template_prefix (const tree node) ::= ::= - ::= */ + ::= + ::= + + ::= L */ static void write_unqualified_name (const tree decl) @@ -1126,6 +1130,16 @@ write_unqualified_name (const tree decl) write_string (oni[DECL_OVERLOADED_OPERATOR_P (decl)].mangled_name); } + else if (VAR_OR_FUNCTION_DECL_P (decl) && ! TREE_PUBLIC (decl) + && DECL_NAMESPACE_SCOPE_P (decl) + && decl_linkage (decl) == lk_internal) + { + MANGLE_TRACE_TREE ("local-source-name", decl); + write_char ('L'); + write_source_name (DECL_NAME (decl)); + /* The default discriminator is 1, and that's all we ever use, + so there's no code to output one here. */ + } else write_source_name (DECL_NAME (decl)); } Modified: stable/9/contrib/gcc/cp/typeck.c ============================================================================== --- stable/9/contrib/gcc/cp/typeck.c Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcc/cp/typeck.c Sun Dec 22 00:45:08 2013 (r259705) @@ -1358,7 +1358,10 @@ cxx_alignof_expr (tree e) { pedwarn ("ISO C++ forbids applying %<__alignof%> to an expression of " "function type"); - t = size_one_node; + if (TREE_CODE (e) == FUNCTION_DECL) + t = size_int (DECL_ALIGN_UNIT (e)); + else + t = size_one_node; } else if (type_unknown_p (e)) { Modified: stable/9/contrib/gcc/doc/extend.texi ============================================================================== --- stable/9/contrib/gcc/doc/extend.texi Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcc/doc/extend.texi Sun Dec 22 00:45:08 2013 (r259705) @@ -1577,6 +1577,7 @@ The keyword @code{__attribute__} allows attributes when making a declaration. This keyword is followed by an attribute specification inside double parentheses. The following attributes are currently defined for functions on all targets: +@code{aligned}, @code{noreturn}, @code{returns_twice}, @code{noinline}, @code{always_inline}, @code{flatten}, @code{pure}, @code{const}, @code{nothrow}, @code{sentinel}, @code{format}, @code{format_arg}, @code{no_instrument_function}, @@ -1615,6 +1616,27 @@ is not defined in the same translation u Not all target machines support this attribute. +@item aligned (@var{alignment}) +@cindex @code{aligned} attribute +This attribute specifies a minimum alignment for the function, +measured in bytes. + +You cannot use this attribute to decrease the alignment of a function, +only to increase it. However, when you explicitly specify a function +alignment this will override the effect of the +@option{-falign-functions} (@pxref{Optimize Options}) option for this +function. + +Note that the effectiveness of @code{aligned} attributes may be +limited by inherent limitations in your linker. On many systems, the +linker is only able to arrange for functions to be aligned up to a +certain maximum alignment. (For some linkers, the maximum supported +alignment may be very very small.) See your linker documentation for +further information. + +The @code{aligned} attribute can also be used for variables and fields +(@pxref{Variable Attributes}.) + @item always_inline @cindex @code{always_inline} function attribute Generally, functions are not inlined unless optimization is specified. @@ -3044,6 +3066,9 @@ up to a maximum of 8 byte alignment, the in an @code{__attribute__} will still only provide you with 8 byte alignment. See your linker documentation for further information. +The @code{aligned} attribute can also be used for functions +(@pxref{Function Attributes}.) + @item cleanup (@var{cleanup_function}) @cindex @code{cleanup} attribute The @code{cleanup} attribute runs a function when the variable goes Modified: stable/9/contrib/gcc/flags.h ============================================================================== --- stable/9/contrib/gcc/flags.h Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcc/flags.h Sun Dec 22 00:45:08 2013 (r259705) @@ -261,10 +261,6 @@ extern int align_labels_log; extern int align_labels_max_skip; extern int align_functions_log; -/* Like align_functions_log above, but used by front-ends to force the - minimum function alignment. Zero means no alignment is forced. */ -extern int force_align_functions_log; - /* Nonzero if we dump in VCG format, not plain text. */ extern int dump_for_graph; Modified: stable/9/contrib/gcc/print-tree.c ============================================================================== --- stable/9/contrib/gcc/print-tree.c Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcc/print-tree.c Sun Dec 22 00:45:08 2013 (r259705) @@ -439,17 +439,15 @@ print_node (FILE *file, const char *pref || DECL_INLINE (node) || DECL_BUILT_IN (node)) indent_to (file, indent + 3); - if (TREE_CODE (node) != FUNCTION_DECL) - { - if (DECL_USER_ALIGN (node)) - fprintf (file, " user"); - - fprintf (file, " align %d", DECL_ALIGN (node)); - if (TREE_CODE (node) == FIELD_DECL) - fprintf (file, " offset_align " HOST_WIDE_INT_PRINT_UNSIGNED, - DECL_OFFSET_ALIGN (node)); - } - else if (DECL_BUILT_IN (node)) + if (DECL_USER_ALIGN (node)) + fprintf (file, " user"); + + fprintf (file, " align %d", DECL_ALIGN (node)); + if (TREE_CODE (node) == FIELD_DECL) + fprintf (file, " offset_align " HOST_WIDE_INT_PRINT_UNSIGNED, + DECL_OFFSET_ALIGN (node)); + + if (TREE_CODE (node) == FUNCTION_DECL && DECL_BUILT_IN (node)) { if (DECL_BUILT_IN_CLASS (node) == BUILT_IN_MD) fprintf (file, " built-in BUILT_IN_MD %d", DECL_FUNCTION_CODE (node)); Modified: stable/9/contrib/gcc/toplev.c ============================================================================== --- stable/9/contrib/gcc/toplev.c Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcc/toplev.c Sun Dec 22 00:45:08 2013 (r259705) @@ -369,10 +369,6 @@ int align_labels_log; int align_labels_max_skip; int align_functions_log; -/* Like align_functions_log above, but used by front-ends to force the - minimum function alignment. Zero means no alignment is forced. */ -int force_align_functions_log; - typedef struct { const char *const string; Modified: stable/9/contrib/gcc/tree.c ============================================================================== --- stable/9/contrib/gcc/tree.c Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcc/tree.c Sun Dec 22 00:45:08 2013 (r259705) @@ -541,9 +541,13 @@ make_node_stat (enum tree_code code MEM_ DECL_IN_SYSTEM_HEADER (t) = in_system_header; if (CODE_CONTAINS_STRUCT (code, TS_DECL_COMMON)) { - if (code != FUNCTION_DECL) + if (code == FUNCTION_DECL) + { + DECL_ALIGN (t) = FUNCTION_BOUNDARY; + DECL_MODE (t) = FUNCTION_MODE; + } + else DECL_ALIGN (t) = 1; - DECL_USER_ALIGN (t) = 0; /* We have not yet computed the alias set for this declaration. */ DECL_POINTER_ALIAS_SET (t) = -1; } @@ -1881,14 +1885,13 @@ expr_align (tree t) align1 = expr_align (TREE_OPERAND (t, 2)); return MIN (align0, align1); + /* FIXME: LABEL_DECL and CONST_DECL never have DECL_ALIGN set + meaningfully, it's always 1. */ case LABEL_DECL: case CONST_DECL: case VAR_DECL: case PARM_DECL: case RESULT_DECL: - if (DECL_ALIGN (t) != 0) - return DECL_ALIGN (t); - break; - case FUNCTION_DECL: - return FUNCTION_BOUNDARY; + gcc_assert (DECL_ALIGN (t) != 0); + return DECL_ALIGN (t); default: break; @@ -3174,8 +3177,6 @@ build_decl_stat (enum tree_code code, tr if (code == VAR_DECL || code == PARM_DECL || code == RESULT_DECL) layout_decl (t, 0); - else if (code == FUNCTION_DECL) - DECL_MODE (t) = FUNCTION_MODE; return t; } Modified: stable/9/contrib/gcc/tree.h ============================================================================== --- stable/9/contrib/gcc/tree.h Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcc/tree.h Sun Dec 22 00:45:08 2013 (r259705) @@ -2426,13 +2426,11 @@ struct tree_struct_field_tag GTY(()) /* Likewise for the size in bytes. */ #define DECL_SIZE_UNIT(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.size_unit) /* Holds the alignment required for the datum, in bits. */ -#define DECL_ALIGN(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.u1.a.align) +#define DECL_ALIGN(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.align) /* The alignment of NODE, in bytes. */ #define DECL_ALIGN_UNIT(NODE) (DECL_ALIGN (NODE) / BITS_PER_UNIT) -/* For FIELD_DECLs, off_align holds the number of low-order bits of - DECL_FIELD_OFFSET which are known to be always zero. - DECL_OFFSET_ALIGN thus returns the alignment that DECL_FIELD_OFFSET - has. */ +/* Set if the alignment of this DECL has been set by the user, for + example with an 'aligned' attribute. */ #define DECL_USER_ALIGN(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.user_align) /* Holds the machine mode corresponding to the declaration of a variable or field. Always equal to TYPE_MODE (TREE_TYPE (decl)) except for a @@ -2443,7 +2441,8 @@ struct tree_struct_field_tag GTY(()) operation it is. Note, however, that this field is overloaded, with DECL_BUILT_IN_CLASS as the discriminant, so the latter must always be checked before any access to the former. */ -#define DECL_FUNCTION_CODE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl_common.u1.f) +#define DECL_FUNCTION_CODE(NODE) \ + (FUNCTION_DECL_CHECK (NODE)->function_decl.function_code) #define DECL_DEBUG_EXPR_IS_FROM(NODE) \ (DECL_COMMON_CHECK (NODE)->decl_common.debug_expr_is_from) @@ -2581,20 +2580,9 @@ struct tree_decl_common GTY(()) unsigned gimple_reg_flag : 1; unsigned call_clobbered_flag : 1; - union tree_decl_u1 { - /* In a FUNCTION_DECL for which DECL_BUILT_IN holds, this is - DECL_FUNCTION_CODE. */ - enum built_in_function f; - /* In a FUNCTION_DECL for which DECL_BUILT_IN does not hold, this - is used by language-dependent code. */ - HOST_WIDE_INT i; - /* DECL_ALIGN and DECL_OFFSET_ALIGN. (These are not used for - FUNCTION_DECLs). */ - struct tree_decl_u1_a { - unsigned int align : 24; - unsigned int off_align : 8; - } a; - } GTY ((skip)) u1; + unsigned int align : 24; + /* DECL_OFFSET_ALIGN, used only for FIELD_DECLs. */ + unsigned int off_align : 8; tree size_unit; tree initial; @@ -2679,11 +2667,11 @@ struct tree_decl_with_rtl GTY(()) DECL_OFFSET_ALIGN thus returns the alignment that DECL_FIELD_OFFSET has. */ #define DECL_OFFSET_ALIGN(NODE) \ - (((unsigned HOST_WIDE_INT)1) << FIELD_DECL_CHECK (NODE)->decl_common.u1.a.off_align) + (((unsigned HOST_WIDE_INT)1) << FIELD_DECL_CHECK (NODE)->decl_common.off_align) /* Specify that DECL_ALIGN(NODE) is a multiple of X. */ #define SET_DECL_OFFSET_ALIGN(NODE, X) \ - (FIELD_DECL_CHECK (NODE)->decl_common.u1.a.off_align = exact_log2 ((X) & -(X))) + (FIELD_DECL_CHECK (NODE)->decl_common.off_align = exact_log2 ((X) & -(X))) /* 1 if the alignment for this type was requested by "aligned" attribute, 0 if it is the default for this type. */ @@ -3096,6 +3084,10 @@ struct tree_function_decl GTY(()) { struct tree_decl_non_common common; + /* In a FUNCTION_DECL for which DECL_BUILT_IN holds, this is + DECL_FUNCTION_CODE. Otherwise unused. */ + enum built_in_function function_code; + unsigned static_ctor_flag : 1; unsigned static_dtor_flag : 1; unsigned uninlinable : 1; Modified: stable/9/contrib/gcc/varasm.c ============================================================================== --- stable/9/contrib/gcc/varasm.c Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcc/varasm.c Sun Dec 22 00:45:08 2013 (r259705) @@ -1383,7 +1383,7 @@ assemble_start_function (tree decl, cons if (flag_reorder_blocks_and_partition) { switch_to_section (unlikely_text_section ()); - assemble_align (FUNCTION_BOUNDARY); + assemble_align (DECL_ALIGN (decl)); ASM_OUTPUT_LABEL (asm_out_file, cfun->cold_section_label); /* When the function starts with a cold section, we need to explicitly @@ -1393,7 +1393,7 @@ assemble_start_function (tree decl, cons && BB_PARTITION (ENTRY_BLOCK_PTR->next_bb) == BB_COLD_PARTITION) { switch_to_section (text_section); - assemble_align (FUNCTION_BOUNDARY); + assemble_align (DECL_ALIGN (decl)); ASM_OUTPUT_LABEL (asm_out_file, cfun->hot_section_label); hot_label_written = true; first_function_block_is_cold = true; @@ -1424,18 +1424,17 @@ assemble_start_function (tree decl, cons ASM_OUTPUT_LABEL (asm_out_file, cfun->hot_section_label); /* Tell assembler to move to target machine's alignment for functions. */ - align = floor_log2 (FUNCTION_BOUNDARY / BITS_PER_UNIT); - if (align < force_align_functions_log) - align = force_align_functions_log; + align = floor_log2 (DECL_ALIGN (decl) / BITS_PER_UNIT); if (align > 0) { ASM_OUTPUT_ALIGN (asm_out_file, align); } /* Handle a user-specified function alignment. - Note that we still need to align to FUNCTION_BOUNDARY, as above, + Note that we still need to align to DECL_ALIGN, as above, because ASM_OUTPUT_MAX_SKIP_ALIGN might not do any alignment at all. */ - if (align_functions_log > align + if (! DECL_USER_ALIGN (decl) + && align_functions_log > align && cfun->function_frequency != FUNCTION_FREQUENCY_UNLIKELY_EXECUTED) { #ifdef ASM_OUTPUT_MAX_SKIP_ALIGN Copied: stable/9/contrib/gcclibs/libiberty/ChangeLog.gcc43 (from r258817, head/contrib/gcclibs/libiberty/ChangeLog.gcc43) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/gcclibs/libiberty/ChangeLog.gcc43 Sun Dec 22 00:45:08 2013 (r259705, copy of r258817, head/contrib/gcclibs/libiberty/ChangeLog.gcc43) @@ -0,0 +1,60 @@ +2007-05-05 Geoffrey Keating (r124467) + + PR 31775 + * mangle.c (write_mangled_name): Mangle static variable names. + (write_unqualified_name): Use local-source-name for + namespace-scope static variables. + +2007-03-15 Geoffrey Keating (r122972) + + * cp-demangle.c (d_encoding): Exit early on error. + (d_pointer_to_member_type): Exit early if cplus_demangle_type + returns NULL. + (cplus_demangle_type): Likewise. + * testsuite/demangle-expected: New testcase. + +2007-01-31 Ben Elliston (r121364) + + * strsignal.c (psignal): Change type of signo to int. + * functions.texi: Regenerate. + +2007-01-12 Ben Elliston (r120702) + + * pex-unix.c (writeerr): Cast write result to void. + + * choose-temp.c (choose_temp_base): Check the result of the call + to mktemp rather than testing the length of the modified string. + +2006-12-20 Geoffrey Keating (r120097) + + * cp-demangle.h: Add comment explaining what to do to avoid + overrunning string. + (d_check_char): New. + (d_next_char): Don't advance past trailing '\0'. + * cp-demangle.c (cplus_demangle_mangled_name): Use d_check_char. + (d_nested_name): Likewise. + (d_special_name): Likewise. + (d_call_offset): Likewise. + (d_function_type): Likewise. + (d_array_type): Likewise. + (d_pointer_to_member_type): Likewise. + (d_template_param): Likewise. + (d_template_args): Likewise. + (d_template_arg): Likewise. + (d_expr_primary): Likewise. + (d_local_name): Likewise. + (d_substitution): Likewise. + (d_ctor_dtor_name): Use d_advance rather than d_next_char. + * testsuite/test-demangle.c: Include sys/mman.h. + (MAP_ANONYMOUS): Define. + (protect_end): New. + (main): Use protect_end. + * testsuite/demangle-expected: Add testcases for overrunning + the end of the string. + +2006-11-07 Julian Brown (r118552) + + * floatformat.c (get_field): Fix segfault with little-endian word + order on 64-bit hosts. + (put_field): Likewise. + (min): Move definition. Modified: stable/9/contrib/gcclibs/libiberty/choose-temp.c ============================================================================== --- stable/9/contrib/gcclibs/libiberty/choose-temp.c Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcclibs/libiberty/choose-temp.c Sun Dec 22 00:45:08 2013 (r259705) @@ -65,8 +65,7 @@ choose_temp_base (void) strcpy (temp_filename, base); strcpy (temp_filename + len, TEMP_FILE); - mktemp (temp_filename); - if (strlen (temp_filename) == 0) + if (mktemp (temp_filename) == 0) abort (); return temp_filename; } Modified: stable/9/contrib/gcclibs/libiberty/cp-demangle.c ============================================================================== --- stable/9/contrib/gcclibs/libiberty/cp-demangle.c Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcclibs/libiberty/cp-demangle.c Sun Dec 22 00:45:08 2013 (r259705) @@ -913,9 +913,9 @@ CP_STATIC_IF_GLIBCPP_V3 struct demangle_component * cplus_demangle_mangled_name (struct d_info *di, int top_level) { - if (d_next_char (di) != '_') + if (! d_check_char (di, '_')) return NULL; - if (d_next_char (di) != 'Z') + if (! d_check_char (di, 'Z')) return NULL; return d_encoding (di, top_level); } @@ -1021,7 +1021,7 @@ d_encoding (struct d_info *di, int top_l } peek = d_peek_char (di); - if (peek == '\0' || peek == 'E') + if (dc == NULL || peek == '\0' || peek == 'E') return dc; return d_make_comp (di, DEMANGLE_COMPONENT_TYPED_NAME, dc, d_bare_function_type (di, has_return_type (dc))); @@ -1054,6 +1054,9 @@ d_name (struct d_info *di) case 'Z': return d_local_name (di); + case 'L': + return d_unqualified_name (di); + case 'S': { int subst; @@ -1123,7 +1126,7 @@ d_nested_name (struct d_info *di) struct demangle_component *ret; struct demangle_component **pret; - if (d_next_char (di) != 'N') + if (! d_check_char (di, 'N')) return NULL; pret = d_cv_qualifiers (di, &ret, 1); @@ -1134,7 +1137,7 @@ d_nested_name (struct d_info *di) if (*pret == NULL) return NULL; - if (d_next_char (di) != 'E') + if (! d_check_char (di, 'E')) return NULL; return ret; @@ -1174,7 +1177,8 @@ d_prefix (struct d_info *di) if (IS_DIGIT (peek) || IS_LOWER (peek) || peek == 'C' - || peek == 'D') + || peek == 'D' + || peek == 'L') dc = d_unqualified_name (di); else if (peek == 'S') dc = d_substitution (di, 1); @@ -1208,6 +1212,9 @@ d_prefix (struct d_info *di) /* ::= ::= ::= + ::= + + ::= L */ static struct demangle_component * @@ -1229,6 +1236,19 @@ d_unqualified_name (struct d_info *di) } else if (peek == 'C' || peek == 'D') return d_ctor_dtor_name (di); + else if (peek == 'L') + { + struct demangle_component * ret; + + d_advance (di, 1); + + ret = d_source_name (di); + if (ret == NULL) + return NULL; + if (! d_discriminator (di)) + return NULL; + return ret; + } else return NULL; } @@ -1449,11 +1469,8 @@ d_operator_name (struct d_info *di) static struct demangle_component * d_special_name (struct d_info *di) { - char c; - di->expansion += 20; - c = d_next_char (di); - if (c == 'T') + if (d_check_char (di, 'T')) { switch (d_next_char (di)) { @@ -1502,7 +1519,7 @@ d_special_name (struct d_info *di) offset = d_number (di); if (offset < 0) return NULL; - if (d_next_char (di) != '_') + if (! d_check_char (di, '_')) return NULL; base_type = cplus_demangle_type (di); /* We don't display the offset. FIXME: We should display @@ -1523,7 +1540,7 @@ d_special_name (struct d_info *di) return NULL; } } - else if (c == 'G') + else if (d_check_char (di, 'G')) { switch (d_next_char (di)) { @@ -1570,14 +1587,14 @@ d_call_offset (struct d_info *di, int c) else if (c == 'v') { d_number (di); - if (d_next_char (di) != '_') + if (! d_check_char (di, '_')) return 0; d_number (di); } else return 0; - if (d_next_char (di) != '_') + if (! d_check_char (di, '_')) return 0; return 1; @@ -1601,13 +1618,13 @@ d_ctor_dtor_name (struct d_info *di) else if (di->last_name->type == DEMANGLE_COMPONENT_SUB_STD) di->expansion += di->last_name->u.s_string.len; } - switch (d_next_char (di)) + switch (d_peek_char (di)) { case 'C': { enum gnu_v3_ctor_kinds kind; - switch (d_next_char (di)) + switch (d_peek_next_char (di)) { case '1': kind = gnu_v3_complete_object_ctor; @@ -1621,6 +1638,7 @@ d_ctor_dtor_name (struct d_info *di) default: return NULL; } + d_advance (di, 2); return d_make_ctor (di, kind, di->last_name); } @@ -1628,7 +1646,7 @@ d_ctor_dtor_name (struct d_info *di) { enum gnu_v3_dtor_kinds kind; - switch (d_next_char (di)) + switch (d_peek_next_char (di)) { case '0': kind = gnu_v3_deleting_dtor; @@ -1642,6 +1660,7 @@ d_ctor_dtor_name (struct d_info *di) default: return NULL; } + d_advance (di, 2); return d_make_dtor (di, kind, di->last_name); } @@ -1735,7 +1754,7 @@ cplus_demangle_type (struct d_info *di) if (pret == NULL) return NULL; *pret = cplus_demangle_type (di); - if (! d_add_substitution (di, ret)) + if (! *pret || ! d_add_substitution (di, ret)) return NULL; return ret; } @@ -1925,7 +1944,7 @@ d_function_type (struct d_info *di) { struct demangle_component *ret; - if (d_next_char (di) != 'F') + if (! d_check_char (di, 'F')) return NULL; if (d_peek_char (di) == 'Y') { @@ -1934,7 +1953,7 @@ d_function_type (struct d_info *di) d_advance (di, 1); } ret = d_bare_function_type (di, 1); - if (d_next_char (di) != 'E') + if (! d_check_char (di, 'E')) return NULL; return ret; } @@ -2021,7 +2040,7 @@ d_array_type (struct d_info *di) char peek; struct demangle_component *dim; - if (d_next_char (di) != 'A') + if (! d_check_char (di, 'A')) return NULL; peek = d_peek_char (di); @@ -2049,7 +2068,7 @@ d_array_type (struct d_info *di) return NULL; } - if (d_next_char (di) != '_') + if (! d_check_char (di, '_')) return NULL; return d_make_comp (di, DEMANGLE_COMPONENT_ARRAY_TYPE, dim, @@ -2065,7 +2084,7 @@ d_pointer_to_member_type (struct d_info struct demangle_component *mem; struct demangle_component **pmem; - if (d_next_char (di) != 'M') + if (! d_check_char (di, 'M')) return NULL; cl = cplus_demangle_type (di); @@ -2090,6 +2109,8 @@ d_pointer_to_member_type (struct d_info if (pmem == NULL) return NULL; *pmem = cplus_demangle_type (di); + if (*pmem == NULL) + return NULL; if (pmem != &mem && (*pmem)->type != DEMANGLE_COMPONENT_FUNCTION_TYPE) { @@ -2109,7 +2130,7 @@ d_template_param (struct d_info *di) { long param; - if (d_next_char (di) != 'T') + if (! d_check_char (di, 'T')) return NULL; if (d_peek_char (di) == '_') @@ -2122,7 +2143,7 @@ d_template_param (struct d_info *di) param += 1; } - if (d_next_char (di) != '_') + if (! d_check_char (di, '_')) return NULL; ++di->did_subs; @@ -2144,7 +2165,7 @@ d_template_args (struct d_info *di) constructor or destructor. */ hold_last_name = di->last_name; - if (d_next_char (di) != 'I') + if (! d_check_char (di, 'I')) return NULL; al = NULL; @@ -2189,7 +2210,7 @@ d_template_arg (struct d_info *di) case 'X': d_advance (di, 1); ret = d_expression (di); - if (d_next_char (di) != 'E') + if (! d_check_char (di, 'E')) return NULL; return ret; @@ -2316,7 +2337,7 @@ d_expr_primary (struct d_info *di) { struct demangle_component *ret; - if (d_next_char (di) != 'L') + if (! d_check_char (di, 'L')) return NULL; if (d_peek_char (di) == '_') ret = cplus_demangle_mangled_name (di, 0); @@ -2362,7 +2383,7 @@ d_expr_primary (struct d_info *di) } ret = d_make_comp (di, t, type, d_make_name (di, s, d_str (di) - s)); } - if (d_next_char (di) != 'E') + if (! d_check_char (di, 'E')) return NULL; return ret; } @@ -2376,12 +2397,12 @@ d_local_name (struct d_info *di) { struct demangle_component *function; - if (d_next_char (di) != 'Z') + if (! d_check_char (di, 'Z')) return NULL; function = d_encoding (di, 0); - if (d_next_char (di) != 'E') + if (! d_check_char (di, 'E')) return NULL; if (d_peek_char (di) == 's') @@ -2486,7 +2507,7 @@ d_substitution (struct d_info *di, int p { char c; - if (d_next_char (di) != 'S') + if (! d_check_char (di, 'S')) return NULL; c = d_next_char (di); Modified: stable/9/contrib/gcclibs/libiberty/cp-demangle.h ============================================================================== --- stable/9/contrib/gcclibs/libiberty/cp-demangle.h Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcclibs/libiberty/cp-demangle.h Sun Dec 22 00:45:08 2013 (r259705) @@ -123,10 +123,16 @@ struct d_info int expansion; }; +/* To avoid running past the ending '\0', don't: + - call d_peek_next_char if d_peek_char returned '\0' + - call d_advance with an 'i' that is too large + - call d_check_char(di, '\0') + Everything else is safe. */ #define d_peek_char(di) (*((di)->n)) #define d_peek_next_char(di) ((di)->n[1]) #define d_advance(di, i) ((di)->n += (i)) -#define d_next_char(di) (*((di)->n++)) +#define d_check_char(di, c) (d_peek_char(di) == c ? ((di)->n++, 1) : 0) +#define d_next_char(di) (d_peek_char(di) == '\0' ? '\0' : *((di)->n++)) #define d_str(di) ((di)->n) /* Functions and arrays in cp-demangle.c which are referenced by Modified: stable/9/contrib/gcclibs/libiberty/floatformat.c ============================================================================== --- stable/9/contrib/gcclibs/libiberty/floatformat.c Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcclibs/libiberty/floatformat.c Sun Dec 22 00:45:08 2013 (r259705) @@ -249,53 +249,51 @@ const struct floatformat floatformat_ia6 floatformat_always_valid }; + +#ifndef min +#define min(a, b) ((a) < (b) ? (a) : (b)) +#endif + /* Extract a field which starts at START and is LEN bits long. DATA and TOTAL_LEN are the thing we are extracting it from, in byteorder ORDER. */ static unsigned long get_field (const unsigned char *data, enum floatformat_byteorders order, unsigned int total_len, unsigned int start, unsigned int len) { - unsigned long result; + unsigned long result = 0; unsigned int cur_byte; - int cur_bitshift; + int lo_bit, hi_bit, cur_bitshift = 0; + int nextbyte = (order == floatformat_little) ? 1 : -1; + + /* Start is in big-endian bit order! Fix that first. */ + start = total_len - (start + len); /* Start at the least significant part of the field. */ - cur_byte = (start + len) / FLOATFORMAT_CHAR_BIT; if (order == floatformat_little) - cur_byte = (total_len / FLOATFORMAT_CHAR_BIT) - cur_byte - 1; - cur_bitshift = - ((start + len) % FLOATFORMAT_CHAR_BIT) - FLOATFORMAT_CHAR_BIT; - result = *(data + cur_byte) >> (-cur_bitshift); - cur_bitshift += FLOATFORMAT_CHAR_BIT; - if (order == floatformat_little) - ++cur_byte; + cur_byte = start / FLOATFORMAT_CHAR_BIT; else - --cur_byte; + cur_byte = (total_len - start - 1) / FLOATFORMAT_CHAR_BIT; - /* Move towards the most significant part of the field. */ - while ((unsigned int) cur_bitshift < len) + lo_bit = start % FLOATFORMAT_CHAR_BIT; + hi_bit = min (lo_bit + len, FLOATFORMAT_CHAR_BIT); + + do { - if (len - cur_bitshift < FLOATFORMAT_CHAR_BIT) - /* This is the last byte; zero out the bits which are not part of - this field. */ - result |= *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sun Dec 22 01:00:01 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F69A7DA; Sun, 22 Dec 2013 01:00: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2FCE410A2; Sun, 22 Dec 2013 01:00:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBM101E9092779; Sun, 22 Dec 2013 01:00:01 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBM100vr092765; Sun, 22 Dec 2013 01:00:00 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312220100.rBM100vr092765@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 22 Dec 2013 01:00: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: r259707 - in stable/9/contrib/gcc: . config/rs6000 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Dec 2013 01:00:01 -0000 Author: pfg Date: Sun Dec 22 01:00:00 2013 New Revision: 259707 URL: http://svnweb.freebsd.org/changeset/base/259707 Log: MFC r258651, r258943: gcc: Altivec register adjustments from Apple. gcc: On rs6000 update sp_offset depending only on size. Tested by: Justin Hibbits Obtained from: gcc pre-4.3 (rev. 124763, 125116; GPLv2) Modified: stable/9/contrib/gcc/ChangeLog.gcc43 stable/9/contrib/gcc/config/rs6000/rs6000.c Directory Properties: stable/9/ (props changed) stable/9/contrib/gcc/ (props changed) Modified: stable/9/contrib/gcc/ChangeLog.gcc43 ============================================================================== --- stable/9/contrib/gcc/ChangeLog.gcc43 Sun Dec 22 00:56:05 2013 (r259706) +++ stable/9/contrib/gcc/ChangeLog.gcc43 Sun Dec 22 01:00:00 2013 (r259707) @@ -51,6 +51,14 @@ * doc/extend.texi: Document the 0b-prefixed binary integer constant extension. +2007-05-27 Eric Christopher (r125116) + + * config/rs6000/rs6000.c (rs6000_emit_prologue): Update + sp_offset depending on stack size. Save r12 depending + on registers we're saving later. + (rs6000_emit_epilogue): Update sp_offset depending only + on stack size. + 2007-05-24 Richard Sandiford (r125037) * postreload-gcse.c (reg_changed_after_insn_p): New function. @@ -66,6 +74,12 @@ regs_invalidated_by_call, rather than just checking the membership of REGNO (REG). +2007-05-16 Eric Christopher (r124763) + + * config/rs6000/rs6000.c (rs6000_emit_prologue): Move altivec register + saving after stack push. Set sp_offset whenever we push. + (rs6000_emit_epilogue): Move altivec register restore before stack push. + 2007-05-03 Ian Lance Taylor (r124381) * config/rs6000/rs6000.c (rs6000_override_options): Don't set Modified: stable/9/contrib/gcc/config/rs6000/rs6000.c ============================================================================== --- stable/9/contrib/gcc/config/rs6000/rs6000.c Sun Dec 22 00:56:05 2013 (r259706) +++ stable/9/contrib/gcc/config/rs6000/rs6000.c Sun Dec 22 01:00:00 2013 (r259707) @@ -14466,77 +14466,6 @@ rs6000_emit_prologue (void) sp_offset = info->total_size; } - /* Save AltiVec registers if needed. */ - if (!WORLD_SAVE_P (info) && TARGET_ALTIVEC_ABI && info->altivec_size != 0) - { - int i; - - /* There should be a non inline version of this, for when we - are saving lots of vector registers. */ - for (i = info->first_altivec_reg_save; i <= LAST_ALTIVEC_REGNO; ++i) - if (info->vrsave_mask & ALTIVEC_REG_BIT (i)) - { - rtx areg, savereg, mem; - int offset; - - offset = info->altivec_save_offset + sp_offset - + 16 * (i - info->first_altivec_reg_save); - - savereg = gen_rtx_REG (V4SImode, i); - - areg = gen_rtx_REG (Pmode, 0); - emit_move_insn (areg, GEN_INT (offset)); - - /* AltiVec addressing mode is [reg+reg]. */ - mem = gen_frame_mem (V4SImode, - gen_rtx_PLUS (Pmode, frame_reg_rtx, areg)); - - insn = emit_move_insn (mem, savereg); - - rs6000_frame_related (insn, frame_ptr_rtx, info->total_size, - areg, GEN_INT (offset)); - } - } - - /* VRSAVE is a bit vector representing which AltiVec registers - are used. The OS uses this to determine which vector - registers to save on a context switch. We need to save - VRSAVE on the stack frame, add whatever AltiVec registers we - used in this function, and do the corresponding magic in the - epilogue. */ - - if (TARGET_ALTIVEC && TARGET_ALTIVEC_VRSAVE - && info->vrsave_mask != 0) - { - rtx reg, mem, vrsave; - int offset; - - /* Get VRSAVE onto a GPR. Note that ABI_V4 might be using r12 - as frame_reg_rtx and r11 as the static chain pointer for - nested functions. */ - reg = gen_rtx_REG (SImode, 0); - vrsave = gen_rtx_REG (SImode, VRSAVE_REGNO); - if (TARGET_MACHO) - emit_insn (gen_get_vrsave_internal (reg)); - else - emit_insn (gen_rtx_SET (VOIDmode, reg, vrsave)); - - if (!WORLD_SAVE_P (info)) - { - /* Save VRSAVE. */ - offset = info->vrsave_save_offset + sp_offset; - mem = gen_frame_mem (SImode, - gen_rtx_PLUS (Pmode, frame_reg_rtx, - GEN_INT (offset))); - insn = emit_move_insn (mem, reg); - } - - /* Include the registers in the mask. */ - emit_insn (gen_iorsi3 (reg, reg, GEN_INT ((int) info->vrsave_mask))); - - insn = emit_insn (generate_set_vrsave (reg, info, 0)); - } - /* If we use the link register, get it into r0. */ if (!WORLD_SAVE_P (info) && info->lr_save_p) { @@ -14774,7 +14703,19 @@ rs6000_emit_prologue (void) for which it was done previously. */ if (!WORLD_SAVE_P (info) && info->push_p && !(DEFAULT_ABI == ABI_V4 || current_function_calls_eh_return)) - rs6000_emit_allocate_stack (info->total_size, FALSE); + { + if (info->total_size < 32767) + sp_offset = info->total_size; + else + frame_reg_rtx = frame_ptr_rtx; + rs6000_emit_allocate_stack (info->total_size, + (frame_reg_rtx != sp_reg_rtx + && ((info->altivec_size != 0) + || (info->vrsave_mask != 0) + ))); + if (frame_reg_rtx != sp_reg_rtx) + rs6000_emit_stack_tie (); + } /* Set frame pointer, if needed. */ if (frame_pointer_needed) @@ -14784,6 +14725,78 @@ rs6000_emit_prologue (void) RTX_FRAME_RELATED_P (insn) = 1; } + /* Save AltiVec registers if needed. Save here because the red zone does + not include AltiVec registers. */ + if (!WORLD_SAVE_P (info) && TARGET_ALTIVEC_ABI && info->altivec_size != 0) + { + int i; + + /* There should be a non inline version of this, for when we + are saving lots of vector registers. */ + for (i = info->first_altivec_reg_save; i <= LAST_ALTIVEC_REGNO; ++i) + if (info->vrsave_mask & ALTIVEC_REG_BIT (i)) + { + rtx areg, savereg, mem; + int offset; + + offset = info->altivec_save_offset + sp_offset + + 16 * (i - info->first_altivec_reg_save); + + savereg = gen_rtx_REG (V4SImode, i); + + areg = gen_rtx_REG (Pmode, 0); + emit_move_insn (areg, GEN_INT (offset)); + + /* AltiVec addressing mode is [reg+reg]. */ + mem = gen_frame_mem (V4SImode, + gen_rtx_PLUS (Pmode, frame_reg_rtx, areg)); + + insn = emit_move_insn (mem, savereg); + + rs6000_frame_related (insn, frame_ptr_rtx, info->total_size, + areg, GEN_INT (offset)); + } + } + + /* VRSAVE is a bit vector representing which AltiVec registers + are used. The OS uses this to determine which vector + registers to save on a context switch. We need to save + VRSAVE on the stack frame, add whatever AltiVec registers we + used in this function, and do the corresponding magic in the + epilogue. */ + + if (TARGET_ALTIVEC && TARGET_ALTIVEC_VRSAVE + && info->vrsave_mask != 0) + { + rtx reg, mem, vrsave; + int offset; + + /* Get VRSAVE onto a GPR. Note that ABI_V4 might be using r12 + as frame_reg_rtx and r11 as the static chain pointer for + nested functions. */ + reg = gen_rtx_REG (SImode, 0); + vrsave = gen_rtx_REG (SImode, VRSAVE_REGNO); + if (TARGET_MACHO) + emit_insn (gen_get_vrsave_internal (reg)); + else + emit_insn (gen_rtx_SET (VOIDmode, reg, vrsave)); + + if (!WORLD_SAVE_P (info)) + { + /* Save VRSAVE. */ + offset = info->vrsave_save_offset + sp_offset; + mem = gen_frame_mem (SImode, + gen_rtx_PLUS (Pmode, frame_reg_rtx, + GEN_INT (offset))); + insn = emit_move_insn (mem, reg); + } + + /* Include the registers in the mask. */ + emit_insn (gen_iorsi3 (reg, reg, GEN_INT ((int) info->vrsave_mask))); + + insn = emit_insn (generate_set_vrsave (reg, info, 0)); + } + /* If we are using RS6000_PIC_OFFSET_TABLE_REGNUM, we need to set it up. */ if ((TARGET_TOC && TARGET_MINIMAL_TOC && get_pool_size () != 0) || (DEFAULT_ABI == ABI_V4 @@ -15041,33 +15054,9 @@ rs6000_emit_epilogue (int sibcall) return; } - /* If we have a frame pointer, a call to alloca, or a large stack - frame, restore the old stack pointer using the backchain. Otherwise, - we know what size to update it with. */ - if (use_backchain_to_restore_sp) - { - /* Under V.4, don't reset the stack pointer until after we're done - loading the saved registers. */ - if (DEFAULT_ABI == ABI_V4) - frame_reg_rtx = gen_rtx_REG (Pmode, 11); - - emit_move_insn (frame_reg_rtx, - gen_rtx_MEM (Pmode, sp_reg_rtx)); - } - else if (info->push_p) - { - if (DEFAULT_ABI == ABI_V4 - || current_function_calls_eh_return) - sp_offset = info->total_size; - else - { - emit_insn (TARGET_32BIT - ? gen_addsi3 (sp_reg_rtx, sp_reg_rtx, - GEN_INT (info->total_size)) - : gen_adddi3 (sp_reg_rtx, sp_reg_rtx, - GEN_INT (info->total_size))); - } - } + /* Set sp_offset based on the stack push from the prologue. */ + if (info->total_size < 32767) + sp_offset = info->total_size; /* Restore AltiVec registers if needed. */ if (TARGET_ALTIVEC_ABI && info->altivec_size != 0) @@ -15108,6 +15097,36 @@ rs6000_emit_epilogue (int sibcall) emit_insn (generate_set_vrsave (reg, info, 1)); } + sp_offset = 0; + + /* If we have a frame pointer, a call to alloca, or a large stack + frame, restore the old stack pointer using the backchain. Otherwise, + we know what size to update it with. */ + if (use_backchain_to_restore_sp) + { + /* Under V.4, don't reset the stack pointer until after we're done + loading the saved registers. */ + if (DEFAULT_ABI == ABI_V4) + frame_reg_rtx = gen_rtx_REG (Pmode, 11); + + emit_move_insn (frame_reg_rtx, + gen_rtx_MEM (Pmode, sp_reg_rtx)); + } + else if (info->push_p) + { + if (DEFAULT_ABI == ABI_V4 + || current_function_calls_eh_return) + sp_offset = info->total_size; + else + { + emit_insn (TARGET_32BIT + ? gen_addsi3 (sp_reg_rtx, sp_reg_rtx, + GEN_INT (info->total_size)) + : gen_adddi3 (sp_reg_rtx, sp_reg_rtx, + GEN_INT (info->total_size))); + } + } + /* Get the old lr if we saved it. */ if (info->lr_save_p) { From owner-svn-src-stable@FreeBSD.ORG Sun Dec 22 13:02:35 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0CA90E5B; Sun, 22 Dec 2013 13:02:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ECBD91B26; Sun, 22 Dec 2013 13:02:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBMD2Y2u053419; Sun, 22 Dec 2013 13:02:34 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBMD2YYR053418; Sun, 22 Dec 2013 13:02:34 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201312221302.rBMD2YYR053418@svn.freebsd.org> From: Alexander Motin Date: Sun, 22 Dec 2013 13:02:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259721 - stable/10/sys/cam/scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Dec 2013 13:02:35 -0000 Author: mav Date: Sun Dec 22 13:02:34 2013 New Revision: 259721 URL: http://svnweb.freebsd.org/changeset/base/259721 Log: MFC r259108: When comparing device IDs, make sure that they have the same type (like NAA assigned) and identify the same entity (like device or port). Otherwise there can be false positives since at least some models of Seagate disks use same IDs for the whole device and one of its ports. Modified: stable/10/sys/cam/scsi/scsi_all.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_all.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.c Sun Dec 22 12:53:56 2013 (r259720) +++ stable/10/sys/cam/scsi/scsi_all.c Sun Dec 22 13:02:34 2013 (r259721) @@ -6509,7 +6509,11 @@ scsi_devid_match(uint8_t *lhs, size_t lh while (rhs_id <= rhs_last && (rhs_id->identifier + rhs_id->length) <= rhs_end) { - if (rhs_id->length == lhs_id->length + if ((rhs_id->id_type & + (SVPD_ID_ASSOC_MASK | SVPD_ID_TYPE_MASK)) == + (lhs_id->id_type & + (SVPD_ID_ASSOC_MASK | SVPD_ID_TYPE_MASK)) + && rhs_id->length == lhs_id->length && memcmp(rhs_id->identifier, lhs_id->identifier, rhs_id->length) == 0) return (0); From owner-svn-src-stable@FreeBSD.ORG Sun Dec 22 13:03:34 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5152FF91; Sun, 22 Dec 2013 13:03: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3D29D1B2B; Sun, 22 Dec 2013 13:03:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBMD3YkE053604; Sun, 22 Dec 2013 13:03:34 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBMD3YMu053603; Sun, 22 Dec 2013 13:03:34 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201312221303.rBMD3YMu053603@svn.freebsd.org> From: Alexander Motin Date: Sun, 22 Dec 2013 13:03: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: r259722 - stable/9/sys/cam/scsi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Dec 2013 13:03:34 -0000 Author: mav Date: Sun Dec 22 13:03:33 2013 New Revision: 259722 URL: http://svnweb.freebsd.org/changeset/base/259722 Log: MFC r259108: When comparing device IDs, make sure that they have the same type (like NAA assigned) and identify the same entity (like device or port). Otherwise there can be false positives since at least some models of Seagate disks use same IDs for the whole device and one of its ports. Modified: stable/9/sys/cam/scsi/scsi_all.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_all.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_all.c Sun Dec 22 13:02:34 2013 (r259721) +++ stable/9/sys/cam/scsi/scsi_all.c Sun Dec 22 13:03:33 2013 (r259722) @@ -6509,7 +6509,11 @@ scsi_devid_match(uint8_t *lhs, size_t lh while (rhs_id <= rhs_last && (rhs_id->identifier + rhs_id->length) <= rhs_end) { - if (rhs_id->length == lhs_id->length + if ((rhs_id->id_type & + (SVPD_ID_ASSOC_MASK | SVPD_ID_TYPE_MASK)) == + (lhs_id->id_type & + (SVPD_ID_ASSOC_MASK | SVPD_ID_TYPE_MASK)) + && rhs_id->length == lhs_id->length && memcmp(rhs_id->identifier, lhs_id->identifier, rhs_id->length) == 0) return (0); From owner-svn-src-stable@FreeBSD.ORG Sun Dec 22 19:36:09 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 11364B49; Sun, 22 Dec 2013 19:36:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F120E134D; Sun, 22 Dec 2013 19:36:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBMJa8Rc096185; Sun, 22 Dec 2013 19:36:08 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBMJa8lS096184; Sun, 22 Dec 2013 19:36:08 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201312221936.rBMJa8lS096184@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sun, 22 Dec 2013 19:36:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259734 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Dec 2013 19:36:09 -0000 Author: pjd Date: Sun Dec 22 19:36:08 2013 New Revision: 259734 URL: http://svnweb.freebsd.org/changeset/base/259734 Log: MFC r259576: MFV r258923: 4188 assertion failed in dmu_tx_hold_free(): dn_datablkshift != 0 illumos/illumos-gate@bb411a08b05466bfe0c7095b6373bbc1587e259a Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Sun Dec 22 19:33:15 2013 (r259733) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Sun Dec 22 19:36:08 2013 (r259734) @@ -635,9 +635,16 @@ dmu_tx_hold_free(dmu_tx_t *tx, uint64_t uint64_t start = off >> shift; uint64_t end = (off + len) >> shift; - ASSERT(dn->dn_datablkshift != 0); ASSERT(dn->dn_indblkshift != 0); + /* + * dnode_reallocate() can result in an object with indirect + * blocks having an odd data block size. In this case, + * just check the single block. + */ + if (dn->dn_datablkshift == 0) + start = end = 0; + zio = zio_root(tx->tx_pool->dp_spa, NULL, NULL, ZIO_FLAG_CANFAIL); for (uint64_t i = start; i <= end; i++) { From owner-svn-src-stable@FreeBSD.ORG Sun Dec 22 21:09:44 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 34D4364E; Sun, 22 Dec 2013 21:09:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1503C18E7; Sun, 22 Dec 2013 21:09:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBML9hXA029764; Sun, 22 Dec 2013 21:09:43 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBML9hiE029763; Sun, 22 Dec 2013 21:09:43 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201312222109.rBML9hiE029763@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 22 Dec 2013 21:09:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259741 - stable/10/sys/dev/pci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Dec 2013 21:09:44 -0000 Author: dumbbell Date: Sun Dec 22 21:09:43 2013 New Revision: 259741 URL: http://svnweb.freebsd.org/changeset/base/259741 Log: MFC r259679: vga_pci: Improve boot display detection The previous code was checking the "VGA Enable" bit on the video card's parent PCI-to-PCI bridge only. This didn't work for the case where the video card is attached to the root PCI bus (ie. the card has no parent PCI-to-PCI bridge). Now, the new code: 1. checks the "VGA Enable" bit on the parent bridge only if it's a PCI-to-PCI bridge; 2. always checks the "I/O" and "Memory address space decoding" bits on the video card itself. However, vendor-specific bits are not used. This fixes the use of many integrated Radeon cards: without this patch, we fail to detect them as the boot display and, when radeonkms looks for the Video BIOS, it skips the shadow copy made by the System BIOS. It then fails to fully initialize the card, because the shadow copy is the only way to read the Video BIOS in these situations. A workaround was to force the boot display selection using the "hw.pci.default_vgapci_unit" tunable. A previous version of this patch added a new function doing the checks. Now, the vga_pci_is_boot_display() function is used to perform the checks (only until the boot display is found) and return if the given device is the boot display or not. Furthermore, vga_pci_attach() logs "Boot video device" if the card being attached it the Chosen One: vgapci0: [...] vgapci0: Boot video device Reviewed by: kib@, jhb@ (both a previous version) Tested by: lunatic_ (#freebsd-xorg, integrated Radeon card, xmj (#freebsd-xorg, i915+NVIDIA cards) Modified: stable/10/sys/dev/pci/vga_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/pci/vga_pci.c ============================================================================== --- stable/10/sys/dev/pci/vga_pci.c Sun Dec 22 20:46:31 2013 (r259740) +++ stable/10/sys/dev/pci/vga_pci.c Sun Dec 22 21:09:43 2013 (r259741) @@ -81,16 +81,58 @@ SYSCTL_INT(_hw_pci, OID_AUTO, default_vg int vga_pci_is_boot_display(device_t dev) { + int unit; + device_t pcib; + uint16_t config; + + /* Check that the given device is a video card */ + if ((pci_get_class(dev) != PCIC_DISPLAY && + (pci_get_class(dev) != PCIC_OLD || + pci_get_subclass(dev) != PCIS_OLD_VGA))) + return (0); + + unit = device_get_unit(dev); + + if (vga_pci_default_unit >= 0) { + /* + * The boot display device was determined by a previous + * call to this function, or the user forced it using + * the hw.pci.default_vgapci_unit tunable. + */ + return (vga_pci_default_unit == unit); + } /* - * Return true if the given device is the default display used - * at boot time. + * The primary video card used as a boot display must have the + * "I/O" and "Memory Address Space Decoding" bits set in its + * Command register. + * + * Furthermore, if the card is attached to a bridge, instead of + * the root PCI bus, the bridge must have the "VGA Enable" bit + * set in its Control register. */ - return ( - (pci_get_class(dev) == PCIC_DISPLAY || - (pci_get_class(dev) == PCIC_OLD && - pci_get_subclass(dev) == PCIS_OLD_VGA)) && - device_get_unit(dev) == vga_pci_default_unit); + + pcib = device_get_parent(device_get_parent(dev)); + if (device_get_devclass(device_get_parent(pcib)) == + devclass_find("pci")) { + /* + * The parent bridge is a PCI-to-PCI bridge: check the + * value of the "VGA Enable" bit. + */ + config = pci_read_config(pcib, PCIR_BRIDGECTL_1, 2); + if ((config & PCIB_BCR_VGA_ENABLE) == 0) + return (0); + } + + config = pci_read_config(dev, PCIR_COMMAND, 2); + if ((config & (PCIM_CMD_PORTEN | PCIM_CMD_MEMEN)) == 0) + return (0); + + /* This video card is the boot display: record its unit number. */ + vga_pci_default_unit = unit; + device_set_flags(dev, 1); + + return (1); } void * @@ -159,9 +201,6 @@ vga_pci_unmap_bios(device_t dev, void *b static int vga_pci_probe(device_t dev) { - device_t bdev; - int unit; - uint16_t bctl; switch (pci_get_class(dev)) { case PCIC_DISPLAY: @@ -175,13 +214,7 @@ vga_pci_probe(device_t dev) } /* Probe default display. */ - unit = device_get_unit(dev); - bdev = device_get_parent(device_get_parent(dev)); - bctl = pci_read_config(bdev, PCIR_BRIDGECTL_1, 2); - if (vga_pci_default_unit < 0 && (bctl & PCIB_BCR_VGA_ENABLE) != 0) - vga_pci_default_unit = unit; - if (vga_pci_default_unit == unit) - device_set_flags(dev, 1); + vga_pci_is_boot_display(dev); device_set_desc(dev, "VGA-compatible display"); return (BUS_PROBE_GENERIC); @@ -197,6 +230,10 @@ vga_pci_attach(device_t dev) device_add_child(dev, "drm", -1); device_add_child(dev, "drmn", -1); bus_generic_attach(dev); + + if (vga_pci_is_boot_display(dev)) + device_printf(dev, "Boot video device\n"); + return (0); } From owner-svn-src-stable@FreeBSD.ORG Sun Dec 22 21:18:22 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0D2C82A; Sun, 22 Dec 2013 21:18: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7FCA0196A; Sun, 22 Dec 2013 21:18:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBMLIMqb033327; Sun, 22 Dec 2013 21:18:22 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBMLILG9033323; Sun, 22 Dec 2013 21:18:21 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201312222118.rBMLILG9033323@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 22 Dec 2013 21:18:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259742 - in stable/10/sys/dev/drm2: radeon ttm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Dec 2013 21:18:22 -0000 Author: dumbbell Date: Sun Dec 22 21:18:21 2013 New Revision: 259742 URL: http://svnweb.freebsd.org/changeset/base/259742 Log: MFC r259684: drm/ttm, drm/radeon: Replace EINTR/ERESTART by ERESTARTSYS... ... for msleep/cv_*wait() return values, where wait_event*() is used on Linux. ERESTARTSYS is the return code expected by callers when the operation was interrupted. For instance, this is the case of radeon_cs_ioctl() (radeon_cs.c): if an error occurs, and the code isn't ERESTARTSYS (eg. EINTR), it logs an error. Note that ERESTARTSYS is defined as ERESTART, but this keeps callers' code close to Linux. Submitted by: avg@ (previous version) Modified: stable/10/sys/dev/drm2/radeon/radeon_fence.c stable/10/sys/dev/drm2/radeon/radeon_sa.c stable/10/sys/dev/drm2/ttm/ttm_bo.c stable/10/sys/dev/drm2/ttm/ttm_lock.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/drm2/radeon/radeon_fence.c ============================================================================== --- stable/10/sys/dev/drm2/radeon/radeon_fence.c Sun Dec 22 21:09:43 2013 (r259741) +++ stable/10/sys/dev/drm2/radeon/radeon_fence.c Sun Dec 22 21:18:21 2013 (r259742) @@ -321,6 +321,8 @@ static int radeon_fence_wait_seq(struct &rdev->fence_queue_mtx, timeout); } + if (r == EINTR) + r = ERESTARTSYS; if (r != 0) { if (r == EWOULDBLOCK) { signaled = @@ -334,7 +336,7 @@ static int radeon_fence_wait_seq(struct mtx_unlock(&rdev->fence_queue_mtx); } radeon_irq_kms_sw_irq_put(rdev, ring); - if (unlikely(r == EINTR || r == ERESTART)) { + if (unlikely(r == ERESTARTSYS)) { return -r; } CTR2(KTR_DRM, "radeon fence: wait end (ring=%d, seq=%d)", @@ -514,6 +516,8 @@ static int radeon_fence_wait_any_seq(str &rdev->fence_queue_mtx, timeout); } + if (r == EINTR) + r = ERESTARTSYS; if (r != 0) { if (r == EWOULDBLOCK) { signaled = @@ -531,7 +535,7 @@ static int radeon_fence_wait_any_seq(str radeon_irq_kms_sw_irq_put(rdev, i); } } - if (unlikely(r == EINTR || r == ERESTART)) { + if (unlikely(r == ERESTARTSYS)) { return -r; } CTR2(KTR_DRM, "radeon fence: wait end (ring=%d, target_seq=%d)", Modified: stable/10/sys/dev/drm2/radeon/radeon_sa.c ============================================================================== --- stable/10/sys/dev/drm2/radeon/radeon_sa.c Sun Dec 22 21:09:43 2013 (r259741) +++ stable/10/sys/dev/drm2/radeon/radeon_sa.c Sun Dec 22 21:18:21 2013 (r259742) @@ -363,6 +363,8 @@ int radeon_sa_bo_new(struct radeon_devic while (!radeon_sa_event(sa_manager, size, align)) { r = -cv_wait_sig(&sa_manager->wq, &sa_manager->wq_lock); + if (r == -EINTR) + r = -ERESTARTSYS; if (r != 0) break; } Modified: stable/10/sys/dev/drm2/ttm/ttm_bo.c ============================================================================== --- stable/10/sys/dev/drm2/ttm/ttm_bo.c Sun Dec 22 21:09:43 2013 (r259741) +++ stable/10/sys/dev/drm2/ttm/ttm_bo.c Sun Dec 22 21:18:21 2013 (r259742) @@ -147,6 +147,8 @@ ttm_bo_wait_unreserved_locked(struct ttm } while (ttm_bo_is_reserved(bo)) { ret = -msleep(bo, &bo->glob->lru_lock, flags, wmsg, 0); + if (ret == -EINTR) + ret = -ERESTARTSYS; if (ret != 0) break; } Modified: stable/10/sys/dev/drm2/ttm/ttm_lock.c ============================================================================== --- stable/10/sys/dev/drm2/ttm/ttm_lock.c Sun Dec 22 21:09:43 2013 (r259741) +++ stable/10/sys/dev/drm2/ttm/ttm_lock.c Sun Dec 22 21:18:21 2013 (r259742) @@ -107,6 +107,8 @@ ttm_read_lock(struct ttm_lock *lock, boo mtx_lock(&lock->lock); while (!__ttm_read_lock(lock)) { ret = msleep(lock, &lock->lock, flags, wmsg, 0); + if (ret == EINTR) + ret = ERESTARTSYS; if (ret != 0) break; } @@ -151,6 +153,8 @@ int ttm_read_trylock(struct ttm_lock *lo mtx_lock(&lock->lock); while (!__ttm_read_trylock(lock, &locked)) { ret = msleep(lock, &lock->lock, flags, wmsg, 0); + if (ret == EINTR) + ret = ERESTARTSYS; if (ret != 0) break; } @@ -204,6 +208,8 @@ ttm_write_lock(struct ttm_lock *lock, bo /* XXXKIB: linux uses __ttm_read_lock for uninterruptible sleeps */ while (!__ttm_write_lock(lock)) { ret = msleep(lock, &lock->lock, flags, wmsg, 0); + if (ret == EINTR) + ret = ERESTARTSYS; if (interruptible && ret != 0) { lock->flags &= ~TTM_WRITE_LOCK_PENDING; wakeup(lock); @@ -280,6 +286,8 @@ int ttm_vt_lock(struct ttm_lock *lock, mtx_lock(&lock->lock); while (!__ttm_vt_lock(lock)) { ret = msleep(lock, &lock->lock, flags, wmsg, 0); + if (ret == EINTR) + ret = ERESTARTSYS; if (interruptible && ret != 0) { lock->flags &= ~TTM_VT_LOCK_PENDING; wakeup(lock); From owner-svn-src-stable@FreeBSD.ORG Sun Dec 22 21:53:09 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D63BD7; Sun, 22 Dec 2013 21:53:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 688001B6D; Sun, 22 Dec 2013 21:53:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBMLr9BG046625; Sun, 22 Dec 2013 21:53:09 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBMLr9me046624; Sun, 22 Dec 2013 21:53:09 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201312222153.rBMLr9me046624@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 22 Dec 2013 21:53:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259745 - stable/10/sys/dev/drm2 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Dec 2013 21:53:09 -0000 Author: dumbbell Date: Sun Dec 22 21:53:08 2013 New Revision: 259745 URL: http://svnweb.freebsd.org/changeset/base/259745 Log: MFC r259717: drm: Lower priority of "EDID checksum is invalid" message The priority goes from "error" to "debug". Connectors are polled every 10 seconds. Reading EDID is part of this polling. However, when an invalid EDID is returned, this error message is logged. When using Newcons for instance, having a kernel message every 10 seconds is getting annoying. Now that it's a debug message, it'll be logged only if hw.dri.debug is enabled. This fix console spamming for some users. Tested by: Larry Rosenman Modified: stable/10/sys/dev/drm2/drm_edid.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/drm2/drm_edid.c ============================================================================== --- stable/10/sys/dev/drm2/drm_edid.c Sun Dec 22 21:44:32 2013 (r259744) +++ stable/10/sys/dev/drm2/drm_edid.c Sun Dec 22 21:53:08 2013 (r259745) @@ -171,7 +171,7 @@ drm_edid_block_valid(u8 *raw_edid) for (i = 0; i < EDID_LENGTH; i++) csum += raw_edid[i]; if (csum) { - DRM_ERROR("EDID checksum is invalid, remainder is %d\n", csum); + DRM_DEBUG("EDID checksum is invalid, remainder is %d\n", csum); /* allow CEA to slide through, switches mangle this */ if (raw_edid[0] != 0x02) From owner-svn-src-stable@FreeBSD.ORG Sun Dec 22 23:08:34 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 49EB3334; Sun, 22 Dec 2013 23:08: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 34F4A104A; Sun, 22 Dec 2013 23:08:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBMN8Y4b072668; Sun, 22 Dec 2013 23:08:34 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBMN8YUm072667; Sun, 22 Dec 2013 23:08:34 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201312222308.rBMN8YUm072667@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 22 Dec 2013 23:08:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259751 - stable/10/usr.sbin/kldxref X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Dec 2013 23:08:34 -0000 Author: jilles Date: Sun Dec 22 23:08:33 2013 New Revision: 259751 URL: http://svnweb.freebsd.org/changeset/base/259751 Log: MFC r256650: kldxref: Add static keyword to the new function only used in the same file. The WARNS level is not such that the omission broke the build. Modified: stable/10/usr.sbin/kldxref/kldxref.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/kldxref/kldxref.c ============================================================================== --- stable/10/usr.sbin/kldxref/kldxref.c Sun Dec 22 23:03:29 2013 (r259750) +++ stable/10/usr.sbin/kldxref/kldxref.c Sun Dec 22 23:08:33 2013 (r259751) @@ -274,7 +274,7 @@ usage(void) exit(1); } -int +static int compare(const FTSENT *const *a, const FTSENT *const *b) { if ((*a)->fts_info == FTS_D && (*b)->fts_info != FTS_D) From owner-svn-src-stable@FreeBSD.ORG Sun Dec 22 23:33:27 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E16F7A8B; Sun, 22 Dec 2013 23:33: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B1A5D11EB; Sun, 22 Dec 2013 23:33:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBMNXRqe082889; Sun, 22 Dec 2013 23:33:27 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBMNXRIr082888; Sun, 22 Dec 2013 23:33:27 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201312222333.rBMNXRIr082888@svn.freebsd.org> From: Warner Losh Date: Sun, 22 Dec 2013 23:33: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: r259753 - stable/9/sys/arm/at91 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Dec 2013 23:33:28 -0000 Author: imp Date: Sun Dec 22 23:33:27 2013 New Revision: 259753 URL: http://svnweb.freebsd.org/changeset/base/259753 Log: Direct Commit of mountroot> prompt fix r259748 (since there's no sane branching relationship between that branch and this one and since the more general fix in head may be too risky for a stbale branch this mature): Fix mountroot> prompt eating most of the characters by not enabling RXRDY interrupts in the attach routine. Instead, defer this until the first interrupt we see after the device is opened. Given the console use case, we're guaranteed to get a TXRDY interrupt before any reads are posted due to boot messages, which makes this work. The real fix is to use cngrab/cnungrab function pointers to disable RXRDY interrupts while grabbed. However, that touches the MI uart code, so was disallowed for 10.0 due to the lateness of the hour this fix was proposed. It works for mountroot, the most common atmel kernel prompt use cases, but wouldn't work for GELI since it prompts later in the boot process. Modified: stable/9/sys/arm/at91/uart_dev_at91usart.c Modified: stable/9/sys/arm/at91/uart_dev_at91usart.c ============================================================================== --- stable/9/sys/arm/at91/uart_dev_at91usart.c Sun Dec 22 23:31:04 2013 (r259752) +++ stable/9/sys/arm/at91/uart_dev_at91usart.c Sun Dec 22 23:33:27 2013 (r259753) @@ -63,7 +63,8 @@ struct at91_usart_softc { bus_dma_tag_t tx_tag; bus_dmamap_t tx_map; uint32_t flags; -#define HAS_TIMEOUT 1 +#define HAS_TIMEOUT 0x1 +#define NEEDS_RXRDY 0x4 bus_dma_tag_t rx_tag; struct at91_usart_rx ping_pong[2]; struct at91_usart_rx *ping; @@ -425,7 +426,13 @@ at91_usart_bus_attach(struct uart_softc WR4(&sc->sc_bas, USART_IER, USART_CSR_TIMEOUT | USART_CSR_RXBUFF | USART_CSR_ENDRX); } else { - WR4(&sc->sc_bas, USART_IER, USART_CSR_RXRDY); + /* + * Defer turning on the RXRDY bit until we're opened. This is to make the + * mountroot prompt work before we've opened the console. This is a workaround + * for not being able to change the UART interface for the 10.0 release. + */ + atsc->flags |= NEEDS_RXRDY; + /* WR4(&sc->sc_bas, USART_IER, USART_CSR_RXRDY); */ } WR4(&sc->sc_bas, USART_IER, USART_CSR_RXBRK); errout: @@ -530,6 +537,13 @@ at91_usart_bus_ipend(struct uart_softc * ipend = 0; atsc = (struct at91_usart_softc *)sc; uart_lock(sc->sc_hwmtx); + + /* Kludge -- Enable the RXRDY we deferred in attach */ + if (sc->sc_opened && (atsc->flags & NEEDS_RXRDY)) { + WR4(&sc->sc_bas, USART_IER, USART_CSR_RXRDY); + atsc->flags &= ~NEEDS_RXRDY; + } + csr = RD4(&sc->sc_bas, USART_CSR); if (csr & USART_CSR_ENDTX) { bus_dmamap_sync(atsc->tx_tag, atsc->tx_map, From owner-svn-src-stable@FreeBSD.ORG Mon Dec 23 01:24:33 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 120FFA8F; Mon, 23 Dec 2013 01:24:33 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F22EA188E; Mon, 23 Dec 2013 01:24:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBN1OWQc023385; Mon, 23 Dec 2013 01:24:32 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBN1OWUE023379; Mon, 23 Dec 2013 01:24:32 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201312230124.rBN1OWUE023379@svn.freebsd.org> From: Warner Losh Date: Mon, 23 Dec 2013 01:24:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259759 - in stable/10/sys: arm/at91 dev/uart X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Dec 2013 01:24:33 -0000 Author: imp Date: Mon Dec 23 01:24:32 2013 New Revision: 259759 URL: http://svnweb.freebsd.org/changeset/base/259759 Log: MFC r259685: Plumb the cn_grab and cn_ungrab routines down into the uart clients. Mask RX interrupts while grabbed on the atmel serial driver. This UART interrupts every character. When interrupts are enabled at the mountroot> prompt, this means the ISR eats the characters. Rather than try to create a cooperative buffering system for the low level kernel console, instead just mask out the ISR. For NS8250 and decsendents this isn't needed, since interrupts only happen after 14 or more characters (depending on the fifo settings). Plumb such that these are optional so there's no change in behavior for all the other UART clients. ddb worked on this platform because all interrupts were disabled while it was running, so this problem wasn't noticed. The mountroot> issue has been around for a very very long time. Approved by: re@ (gjb@) Modified: stable/10/sys/arm/at91/uart_dev_at91usart.c stable/10/sys/dev/uart/uart_cpu.h stable/10/sys/dev/uart/uart_tty.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/at91/uart_dev_at91usart.c ============================================================================== --- stable/10/sys/arm/at91/uart_dev_at91usart.c Mon Dec 23 01:24:21 2013 (r259758) +++ stable/10/sys/arm/at91/uart_dev_at91usart.c Mon Dec 23 01:24:32 2013 (r259759) @@ -219,6 +219,20 @@ at91_usart_param(struct uart_bas *bas, i return (0); } +static void +at91_usart_grab(struct uart_bas *bas) +{ + + WR4(bas, USART_IDR, USART_CSR_RXRDY); +} + +static void +at91_usart_ungrab(struct uart_bas *bas) +{ + + WR4(bas, USART_IER, USART_CSR_RXRDY); +} + static struct uart_ops at91_usart_ops = { .probe = at91_usart_probe, .init = at91_usart_init, @@ -226,6 +240,8 @@ static struct uart_ops at91_usart_ops = .putc = at91_usart_putc, .rxready = at91_usart_rxready, .getc = at91_usart_getc, + .grab = at91_usart_grab, + .ungrab = at91_usart_ungrab, }; static int Modified: stable/10/sys/dev/uart/uart_cpu.h ============================================================================== --- stable/10/sys/dev/uart/uart_cpu.h Mon Dec 23 01:24:21 2013 (r259758) +++ stable/10/sys/dev/uart/uart_cpu.h Mon Dec 23 01:24:32 2013 (r259759) @@ -43,6 +43,8 @@ struct uart_ops { void (*putc)(struct uart_bas *, int); int (*rxready)(struct uart_bas *); int (*getc)(struct uart_bas *, struct mtx *); + void (*grab)(struct uart_bas *); + void (*ungrab)(struct uart_bas *); }; extern bus_space_tag_t uart_bus_space_io; @@ -135,6 +137,27 @@ uart_putc(struct uart_devinfo *di, int c uart_unlock(di->hwmtx); } +static __inline void +uart_grab(struct uart_devinfo *di) +{ + + uart_lock(di->hwmtx); + if (di->ops->grab) + di->ops->grab(&di->bas); + uart_unlock(di->hwmtx); +} + +static __inline void +uart_ungrab(struct uart_devinfo *di) +{ + + uart_lock(di->hwmtx); + if (di->ops->ungrab) + di->ops->ungrab(&di->bas); + uart_unlock(di->hwmtx); +} + + static __inline int uart_rxready(struct uart_devinfo *di) { Modified: stable/10/sys/dev/uart/uart_tty.c ============================================================================== --- stable/10/sys/dev/uart/uart_tty.c Mon Dec 23 01:24:21 2013 (r259758) +++ stable/10/sys/dev/uart/uart_tty.c Mon Dec 23 01:24:32 2013 (r259759) @@ -112,11 +112,15 @@ uart_cnterm(struct consdev *cp) static void uart_cngrab(struct consdev *cp) { + + uart_grab(cp->cn_arg); } static void uart_cnungrab(struct consdev *cp) { + + uart_ungrab(cp->cn_arg); } static void From owner-svn-src-stable@FreeBSD.ORG Mon Dec 23 11:48:22 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EBFB7771; Mon, 23 Dec 2013 11:48: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D53201603; Mon, 23 Dec 2013 11:48:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBNBmMBq041064; Mon, 23 Dec 2013 11:48:22 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBNBmMuB041063; Mon, 23 Dec 2013 11:48:22 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201312231148.rBNBmMuB041063@svn.freebsd.org> From: Craig Rodrigues Date: Mon, 23 Dec 2013 11:48:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259768 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Dec 2013 11:48:23 -0000 Author: rodrigc Date: Mon Dec 23 11:48:22 2013 New Revision: 259768 URL: http://svnweb.freebsd.org/changeset/base/259768 Log: MFC: Merge release note updates. Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Directory Properties: stable/10/ (props changed) Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Dec 23 11:03:37 2013 (r259767) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Dec 23 11:48:22 2013 (r259768) @@ -120,7 +120,12 @@ Kernel Changes - The maximum amount of memory the &os; kernel + The use of unmapped VMIO buffers eliminates the need to perform + TLB shootdown for mapping on buffer creation and reuse, greatly reducing the + amount of IPIs for shootdown on big-SMP machines and eliminating up to 25-30% + of the system time on i/o intensive workloads. + + The maximum amount of memory the &os; kernel can address has been increased from 1TB to 4TB. A new &man.cpuset.2; API has been added @@ -172,6 +177,73 @@ scheduler is now the default process scheduler in GENERIC kernels. + Support was added for + the new Intel on-CPU Bull Mountain random number + generator, found on IvyBridge and supposedly later CPUs, + accessible with RDRAND instruction. + + + Virtualization support + The BSD Hypervisor, &man.bhyve.8; is included + with &os;. &man.bhyve.8; requires Intel CPUs with VT-x and Extended Page Table (EPT) + support. These features are on all Nehalem models and beyond + (e.g. Nehalem and newer), but not on the lower-end Atom CPUs. + + &man.virtio.4; support has been added. &man.virtio.4; is the + name for the paravirtualization interface developed for the Linux KVM, but + since adopted to other virtual machine hypervisors (with the notable exception of Xen). + This work brings in a BSD-licensed clean-room implementation of the virtio kernel drivers + for disk IO (&man.virtio_blk.4; and &man.virtio_scsi.4;), network IO (&man.vtnet.4;), + memory ballooning (&man.virtio_balloon.4;), and PCI. + Tested with on Qemu/KVM, VirtualBox, and &man.bhyve.4;. + + Paravirtualized drivers which + support Microsoft Hyper-V have been imported and made + part of the amd64 GENERIC kernel. For i386, these drivers are not part of + GENERIC, so the following lines must be added to + /boot/loader.conf to load these drivers: + hv_ata_pci_disengage_load="YES" +hv_netsvc_load="YES" +hv_utils_load="YES" +hv_vmbus_load="YES" Alternatively, the Hyper-V drivers can be added to the i386 + kernel by adding device hyperv to the kernel config, and then + recompiling the kernel. + + The &man.vmx.4; driver has been added. + &man.vmx.4; is a VMware VMXNET3 ethernet driver ported from + OpenBSD. + + Xen PVHVM virtualization is now + part of the GENERIC kernel. + + + + + ARM support + + Raspberry PI support has been added. + Refer to these setup instructions + and quick start + guide. + + The default ABI on ARM is now the ARM EABI. This brings a number of + improvements and allows future support for VFP and Thumb-2. + + ARM support has been greatly improved, including support + for ARMv6 and ARMv7, SMP and thread-local storage (TLS). + Additionally support for some newer SoC like the MV78x60 and OMAP4 was added. + See this announcement + for further details. + + Superpages support on ARM has been added. Superpages support + provides improved performance and scalability by allowing TLB + translations to dynamically cover large physical memory regions. + All ARMv6 and ARMv7-based platforms can take advantage of this feature. + See this page + for further details. + + + Boot Loader Changes @@ -204,7 +276,7 @@ Multimedia Support - Support for version 2.0 of the USB Audio reference design + Support for version 2.0 of the USB Audio reference design has been added. New devices should support higher bandwidth, increased sampling frequency and wider dynamic range. @@ -265,27 +337,38 @@ for dynamically loading kernel modules for Infiniband core (ibcore) and IP over Infiniband (ipoib). + &man.netmap.4; has been added. &man.netmap.4; is a framework for + high-performance direct-to-hardware packet IO, offering low latency and high PPS + rates to userland applications while bypassing any kernel-side packet processing. + With &man.netmap.4; it is trivially possible to fully saturate a 10 Gbps network interface with + minimal packet sizes. For more information, see: + Netmap Project. + Network Protocols - &man.carp.4; has been rewritten to make addresses + &man.carp.4; has been rewritten to make addresses more sane from the viewpoint of routing daemons such as quagga/zebra. It also brings support for a single redundant address on the subnet (carpdev), switching state with - ifconfig, better locking and using modern kernel - interfaces to allocate multicast memberships. + &man.ifconfig.8;, better locking and using modern kernel + interfaces to allocate multicast memberships. + Configuration of the CARP protocol via &man.ifconfig.8; has changed, as well as format + of CARP events submitted to &man.devd.8; has changed. See &man.carp.4; + for more information. The arpbalance feature of &man.carp.4; is currently + not supported anymore. - The &man.pf.4; firewall now supports fine-grain locking + The &man.pf.4; firewall now supports fine-grain locking and better utilization on multi-cpu machines resulting in significant improvements in performance. - Support for up to 65536 routing tables has been + Support for up to 65536 routing tables has been introduced. - Support for setting/matching differentiated services + Support for setting/matching differentiated services codepoints (DSCP) in IP header has been added to &man.ipfw.8;. @@ -307,36 +390,64 @@ The &man.hptrr.4; driver has been updated to version 1.2 from Highpoint. + &man.nvme.4; has been added and provides NVM Express support. + NVM Express is an optimized register interface, command set and feature set of + PCI Express (PCIe)-based Solid-State Drives (SSDs). For more information, + see nvmexpress.org. + File Systems - A new kernel-based iSCSI target and initiator has been + A new kernel-based iSCSI target and initiator has been added - UFS filesystems can now be enlarged with &man.growfs.8; while + UFS filesystems can now be enlarged with &man.growfs.8; while mounted read-write. This is especially useful for virtual machines, allowing the addition of more harddrive space without interruption of service. - A state of the art FUSE implementation is now part of the + A state of the art FUSE implementation is now part of the base system. It allows the use of nearly all fusefs file systems - Support for the high performance LZ4 compression algorithm - has been added to ZFS. LZ4 is usually faster and can achieve a - higher compression ratio than LZJB, the default compression - algorithm - - Support for L2ARC compression has been added to ZFS. - - ZFS will now compare the checksums of incoming writes to - the checksum of the existing on-disk data and avoid issuing any - write I/O for data that has not changed. This will reduce I/O - as well as space usage because if the old block is referenced - by a snapshot, both copies of the block are kept even though - both contain the same data. + + ZFS + + &man.bsdinstall.8; now supports installing + ZFS on the root file system. It includes a single configuration menu + that allows you to select all of the required details, including + which drives to use, what ZFS RAID level to use (taking into consideration + the selected number of drives), GPT or MBR, GELI encryption, forcing 4K sectors, + pool name, etc. + + TRIM support has been added for + ZFS. + + Support for the high performance LZ4 compression algorithm + has been added to ZFS. LZ4 is usually faster and can achieve a + higher compression ratio than LZJB, the default compression + algorithm + + Support for L2ARC compression has been added to ZFS. + + The zio nop-write improvement from Illumos + was imported into &os;. To reduce I/O, nop-write skips overwriting + data if the checksum (cryptographically secure) of new data + matches the checksum of existing data. It also saves space if + snapshots are in use. This improvement only works only on + datasets with enabled compression, disabled deduplication and + sha256 checksums. + + ZFS will now compare the checksums of incoming writes to + the checksum of the existing on-disk data and avoid issuing any + write I/O for data that has not changed. This will reduce I/O + as well as space usage because if the old block is referenced + by a snapshot, both copies of the block are kept even though + both contain the same data. + + @@ -345,13 +456,51 @@ Userland Changes - BIND has been replaced by &man.unbound.8; for + On platforms where &man.clang.1; is the default + system compiler, (such as i386, amd64, arm) GCC and GNU libstdc++ are no + longer built by default. &man.clang.1; and libc++ from LLVM are used on + these platforms by instead. GCC 4.2.1 and libstdc++ are still built + and used by default on pc98 and all other platforms where &man.clang.1; + is not the default system compiler. + + + &man.clang.1; and llvm have been updated to + version 3.3 release. Please refer to + + Clang 3.3 Release Notes. + + BIND has been replaced by &man.unbound.8; for local dns resolution in the base system. With this change, nslookup and dig are no longer a part of the base system. Users should instead use &man.host.1; and &man.drill.1; Alternatively, nslookup and dig can be obtained by installing the dns/bind-tools port. + sysinstall has been removed from the base system. + Auxiliary libraries and tools used by sysinstall such as libdisk, libftpio, + and sade have also been removed. sysinstall has been replaced by + &man.bsdinstall.8; and &man.bsdconfig.8;. + + &man.freebsd-version.1; has been added. This tool + makes a best effort to determine the version and patch level of + the installed kernel and userland. + + GNU patch has been removed from the base system, and replaced + by a BSD-licensed &man.patch.1; program. + + GNU sort has been removed from the base system, and replaced + by a BSD-licensed &man.sort.1; program. + + Berkely yacc (byacc) has been imported + from invisible island. + This brings bison compatibilities to &man.yacc.1; while preserving full + backwards compatibility with previous version of &man.yacc.1;. + + &man.lex.1; has been replaced by flex 2.5.37 + + &man.make.1; has been replaced with the + "Portable" BSD make tool (bmake) from NetBSD. + The &man.adduser.8; utility now supports a option to set the mode of a new user's home directory. @@ -484,29 +633,32 @@ bzip2 has been updated from 1.0.4 to 1.0.5. - CVS has been removed from the + CVS has been removed from the base system, but is still available from ports - FILE has been updated from 4.23 - to 5.03. + Subversion has been imported into the base system and + is installed as svnlite. svnlite + should only be used for checking out &os; source and committing, and does not + replace the full Subversion port. + + file has been updated to 5.11. - hostapd has been + hostapd has been updated from 0.5.8 to 0.5.10. - IPFilter has been updated from - 4.1.23 to 4.1.28. + IPFilter has been updated to 5.1.2. - less has been updated from - v408 to v429. + less has been updated to + v458. ncurses has been updated from - 5.6-20061217 to 5.6-20080503. + to 5.7-20081102. OpenSSH has been updated - from 4.5p1 to 5.1p1. + to 6.4. - OpenPAM has been updated from the - Figwort release to the Hydrangea release. + OpenPAM has been updated to + the Micrampelis release. sendmail has been updated from 8.14.1 to 8.14.7. @@ -522,29 +674,25 @@ then please run &man.tzsetup.8; to install a new /etc/localtime. - WPA Supplicant has been - updated from 0.5.8 to 0.5.10. + WPA Supplicant has been + updated to 2.0. xz has been updated from snapshot as of 12 April 2010 to 5.0.0. + &man.nvi.1; has been updated to 2.1.2. + + &man.nvi.1; supports wide character locales. + Ports/Packages Collection Infrastructure - The &man.pkg.create.1; utility now supports - . When this option is specified and a - package tarball exists, it will not be overwritten. This is - useful when multiple packages are saved with several consecutive - runs of &man.pkg.create.1; with the - options. - - The pkg_sign and pkg_check utilities for cryptographically - signing &os; packages have been removed. They were only useful - for packages compressed using &man.gzip.1;; however - &man.bzip2.1; compression has been the norm for some time - now. + The pkg_add, pkg_create, pkg_delete, pkg_info, + pkg_updating, and pkg_version utilities have been removed. + &man.pkg.7; must now be used to install binary packages. &man.pkg.7; + is the next generation &os; package manager, also referred to as "pkgng". From owner-svn-src-stable@FreeBSD.ORG Mon Dec 23 19:51:31 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43684361; Mon, 23 Dec 2013 19:51: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2DDDE1A5C; Mon, 23 Dec 2013 19:51:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBNJpVar017854; Mon, 23 Dec 2013 19:51:31 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBNJpVUf017853; Mon, 23 Dec 2013 19:51:31 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201312231951.rBNJpVUf017853@svn.freebsd.org> From: Craig Rodrigues Date: Mon, 23 Dec 2013 19:51:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259783 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Dec 2013 19:51:31 -0000 Author: rodrigc Date: Mon Dec 23 19:51:30 2013 New Revision: 259783 URL: http://svnweb.freebsd.org/changeset/base/259783 Log: MFC r259781: Mention jemalloc upgrade to 3.4.0 Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Directory Properties: stable/10/ (props changed) Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Dec 23 19:48:22 2013 (r259782) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Dec 23 19:51:30 2013 (r259783) @@ -624,6 +624,10 @@ hv_vmbus_load="YES" Al Contributed Software + &man.jemalloc.3; has been updated to 3.4.0. + See this link. + for more details. + AMD has been updated from 6.0.10 to 6.1.5. From owner-svn-src-stable@FreeBSD.ORG Mon Dec 23 20:16:54 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE9F7B50; Mon, 23 Dec 2013 20:16:54 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D9B031CFF; Mon, 23 Dec 2013 20:16:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBNKGsKF026273; Mon, 23 Dec 2013 20:16:54 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBNKGsAA026272; Mon, 23 Dec 2013 20:16:54 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201312232016.rBNKGsAA026272@svn.freebsd.org> From: Xin LI Date: Mon, 23 Dec 2013 20:16:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259784 - stable/10/cddl/contrib/opensolaris/cmd/zpool X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Dec 2013 20:16:55 -0000 Author: delphij Date: Mon Dec 23 20:16:54 2013 New Revision: 259784 URL: http://svnweb.freebsd.org/changeset/base/259784 Log: MFC r259131: Don't panic when we get ZPOOL_STATUS_NON_NATIVE_ASHIFT while listing importable pools. Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Mon Dec 23 19:51:30 2013 (r259783) +++ stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Mon Dec 23 20:16:54 2013 (r259784) @@ -1702,6 +1702,12 @@ show_import(nvlist_t *config) "resilvered.\n")); break; + case ZPOOL_STATUS_NON_NATIVE_ASHIFT: + (void) printf(gettext("status: One or more devices were " + "configured to use a non-native block size.\n" + "\tExpect reduced performance.\n")); + break; + default: /* * No other status can be seen when importing pools. From owner-svn-src-stable@FreeBSD.ORG Mon Dec 23 20:20:46 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D1C4ED3E; Mon, 23 Dec 2013 20:20: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BD7111D68; Mon, 23 Dec 2013 20:20:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBNKKkw2028861; Mon, 23 Dec 2013 20:20:46 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBNKKkoC028859; Mon, 23 Dec 2013 20:20:46 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201312232020.rBNKKkoC028859@svn.freebsd.org> From: Xin LI Date: Mon, 23 Dec 2013 20:20:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259785 - stable/10/usr.bin/bc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Dec 2013 20:20:46 -0000 Author: delphij Date: Mon Dec 23 20:20:46 2013 New Revision: 259785 URL: http://svnweb.freebsd.org/changeset/base/259785 Log: MFC r259058,r259060: Remove -q from usage. Document -q and --quiet as discouraged compatibility option. Modified: stable/10/usr.bin/bc/bc.1 stable/10/usr.bin/bc/bc.y Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/bc/bc.1 ============================================================================== --- stable/10/usr.bin/bc/bc.1 Mon Dec 23 20:16:54 2013 (r259784) +++ stable/10/usr.bin/bc/bc.1 Mon Dec 23 20:20:46 2013 (r259785) @@ -35,7 +35,7 @@ .\" .\" @(#)bc.1 6.8 (Berkeley) 8/8/91 .\" -.Dd January 22, 2010 +.Dd December 6, 2013 .Dt BC 1 .Os .Sh NAME @@ -43,7 +43,7 @@ .Nd arbitrary-precision arithmetic language and calculator .Sh SYNOPSIS .Nm bc -.Op Fl chlqv +.Op Fl chlv .Op Fl e Ar expression .Op Ar file ... .Sh DESCRIPTION @@ -349,6 +349,14 @@ math library, read when the .Fl l option is specified on the command line. .El +.Sh COMPATIBILITY +The +.Fl q +and +.Fl Fl quiet +options are no-ops for compatibility with some other implementations of +.Nm +and their use is discouraged. .Sh SEE ALSO .Xr dc 1 .Pp Modified: stable/10/usr.bin/bc/bc.y ============================================================================== --- stable/10/usr.bin/bc/bc.y Mon Dec 23 20:16:54 2013 (r259784) +++ stable/10/usr.bin/bc/bc.y Mon Dec 23 20:20:46 2013 (r259785) @@ -1023,7 +1023,7 @@ static void usage(void) { - fprintf(stderr, "usage: %s [-chlqv] [-e expression] [file ...]\n", + fprintf(stderr, "usage: %s [-chlv] [-e expression] [file ...]\n", __progname); exit(1); } From owner-svn-src-stable@FreeBSD.ORG Mon Dec 23 20:52:29 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C5BDA93B; Mon, 23 Dec 2013 20:52: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B0EC51F18; Mon, 23 Dec 2013 20:52:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBNKqTbW040142; Mon, 23 Dec 2013 20:52:29 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBNKqT2C040141; Mon, 23 Dec 2013 20:52:29 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312232052.rBNKqT2C040141@svn.freebsd.org> From: Glen Barber Date: Mon, 23 Dec 2013 20:52:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259788 - stable/10/release/doc/share/xml X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Dec 2013 20:52:29 -0000 Author: gjb Date: Mon Dec 23 20:52:29 2013 New Revision: 259788 URL: http://svnweb.freebsd.org/changeset/base/259788 Log: Update FreeBSD version entity values. This is a direct commit to stable/10/, because the values differ between stable/10/ and head/. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/share/xml/release.ent Modified: stable/10/release/doc/share/xml/release.ent ============================================================================== --- stable/10/release/doc/share/xml/release.ent Mon Dec 23 20:39:54 2013 (r259787) +++ stable/10/release/doc/share/xml/release.ent Mon Dec 23 20:52:29 2013 (r259788) @@ -6,23 +6,23 @@ - + - + - + - + - + From owner-svn-src-stable@FreeBSD.ORG Mon Dec 23 21:07:02 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D4D75E43; Mon, 23 Dec 2013 21:07:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A672B1FD4; Mon, 23 Dec 2013 21:07:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBNL72xu044805; Mon, 23 Dec 2013 21:07:02 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBNL7251044804; Mon, 23 Dec 2013 21:07:02 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312232107.rBNL7251044804@svn.freebsd.org> From: Glen Barber Date: Mon, 23 Dec 2013 21:07:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259789 - stable/10/release/doc/en_US.ISO8859-1/readme X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Dec 2013 21:07:02 -0000 Author: gjb Date: Mon Dec 23 21:07:02 2013 New Revision: 259789 URL: http://svnweb.freebsd.org/changeset/base/259789 Log: Switch references to -CURRENT to -STABLE. This is a direct commit to stable/10/. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/readme/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/readme/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/readme/article.xml Mon Dec 23 20:52:29 2013 (r259788) +++ stable/10/release/doc/en_US.ISO8859-1/readme/article.xml Mon Dec 23 21:07:02 2013 (r259789) @@ -112,7 +112,7 @@ The basic requirements for using this &release.type; are technical proficiency with &os; and an understanding of the ongoing development process of &os; &release.branch; (as - discussed on the &a.current;). + discussed on the &a.stable;). For those more interested in doing business with &os; than in experimenting with new &os; technology, formal releases @@ -130,7 +130,7 @@ The basic requirements for using this &release.type; are technical proficiency with &os; and an understanding of the ongoing development process of &os; &release.branch; (as - discussed on the &a.current;). + discussed on the &a.stable;). For those more interested in doing business with &os; than in experimenting with new &os; technology, formal releases @@ -208,7 +208,7 @@ please send mail to the &a.questions;. If you're tracking the &release.branch; development efforts, you - must join the &a.current;, in order to + must join the &a.stable;, in order to keep abreast of recent developments and changes that may affect the way you use and maintain the system. From owner-svn-src-stable@FreeBSD.ORG Mon Dec 23 22:38:41 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8B31A42; Mon, 23 Dec 2013 22:38: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 93FE915AC; Mon, 23 Dec 2013 22:38:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBNMcfqm078009; Mon, 23 Dec 2013 22:38:41 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBNMcf11078008; Mon, 23 Dec 2013 22:38:41 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201312232238.rBNMcf11078008@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 23 Dec 2013 22:38: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: r259799 - stable/9/usr.sbin/kldxref X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Dec 2013 22:38:41 -0000 Author: jilles Date: Mon Dec 23 22:38:41 2013 New Revision: 259799 URL: http://svnweb.freebsd.org/changeset/base/259799 Log: MFC r256060,r256650: kldxref: Do not depend on the directory order. Sort the filenames to get a consistent result between machines of the same architecture. Also, sort FTS_D entries after other entries so kldxref -R works properly in the uncommon case that a directory contains both subdirectories and modules. Previously, this may have happened to work, depending on the order of files in the directory. PR: bin/182098 Submitted by: Derek Schrock (original version) Tested by: Derek Schrock Modified: stable/9/usr.sbin/kldxref/kldxref.c Directory Properties: stable/9/usr.sbin/kldxref/ (props changed) Modified: stable/9/usr.sbin/kldxref/kldxref.c ============================================================================== --- stable/9/usr.sbin/kldxref/kldxref.c Mon Dec 23 22:37:59 2013 (r259798) +++ stable/9/usr.sbin/kldxref/kldxref.c Mon Dec 23 22:38:41 2013 (r259799) @@ -274,6 +274,16 @@ usage(void) exit(1); } +static int +compare(const FTSENT *const *a, const FTSENT *const *b) +{ + if ((*a)->fts_info == FTS_D && (*b)->fts_info != FTS_D) + return 1; + if ((*a)->fts_info != FTS_D && (*b)->fts_info == FTS_D) + return -1; + return strcmp((*a)->fts_name, (*b)->fts_name); +} + int main(int argc, char *argv[]) { @@ -315,7 +325,7 @@ main(int argc, char *argv[]) err(1, "%s", argv[0]); } - ftsp = fts_open(argv, fts_options, 0); + ftsp = fts_open(argv, fts_options, compare); if (ftsp == NULL) exit(1); From owner-svn-src-stable@FreeBSD.ORG Tue Dec 24 02:10:13 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A15EFB7; Tue, 24 Dec 2013 02:10: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3B8B11292; Tue, 24 Dec 2013 02:10:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBO2AD7I054393; Tue, 24 Dec 2013 02:10:13 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBO2ACrS054391; Tue, 24 Dec 2013 02:10:12 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201312240210.rBO2ACrS054391@svn.freebsd.org> From: Navdeep Parhar Date: Tue, 24 Dec 2013 02:10:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259804 - stable/10/sys/dev/cxgbe/tom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 02:10:13 -0000 Author: np Date: Tue Dec 24 02:10:12 2013 New Revision: 259804 URL: http://svnweb.freebsd.org/changeset/base/259804 Log: MFC r259527: Do not create a hardware IPv6 server if the listen address is not in6addr_any and is not in the CLIP table either. This fixes a reported TOE+IPv6 NULL-dereference panic in do_pass_open_rpl(). While here, stop creating hardware servers for any loopback address. It's just a waste of server tids. Modified: stable/10/sys/dev/cxgbe/tom/t4_listen.c stable/10/sys/dev/cxgbe/tom/t4_tom.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_listen.c Tue Dec 24 02:07:22 2013 (r259803) +++ stable/10/sys/dev/cxgbe/tom/t4_listen.c Tue Dec 24 02:10:12 2013 (r259804) @@ -203,6 +203,17 @@ alloc_lctx(struct adapter *sc, struct in return (NULL); } + if (inp->inp_vflag & INP_IPV6 && + !IN6_ARE_ADDR_EQUAL(&in6addr_any, &inp->in6p_laddr)) { + struct tom_data *td = sc->tom_softc; + + lctx->ce = hold_lip(td, &inp->in6p_laddr); + if (lctx->ce == NULL) { + free(lctx, M_CXGBE); + return (NULL); + } + } + lctx->ctrlq = &sc->sge.ctrlq[pi->port_id]; lctx->ofld_rxq = &sc->sge.ofld_rxq[pi->first_ofld_rxq]; refcount_init(&lctx->refcount, 1); @@ -219,6 +230,7 @@ static int free_lctx(struct adapter *sc, struct listen_ctx *lctx) { struct inpcb *inp = lctx->inp; + struct tom_data *td = sc->tom_softc; INP_WLOCK_ASSERT(inp); KASSERT(lctx->refcount == 0, @@ -230,6 +242,8 @@ free_lctx(struct adapter *sc, struct lis CTR4(KTR_CXGBE, "%s: stid %u, lctx %p, inp %p", __func__, lctx->stid, lctx, lctx->inp); + if (lctx->ce) + release_lip(td, lctx->ce); free_stid(sc, lctx); free(lctx, M_CXGBE); @@ -495,6 +509,12 @@ t4_listen_start(struct toedev *tod, stru INP_WLOCK_ASSERT(inp); + /* Don't start a hardware listener for any loopback address. */ + if (inp->inp_vflag & INP_IPV6 && IN6_IS_ADDR_LOOPBACK(&inp->in6p_laddr)) + return (0); + if (!(inp->inp_vflag & INP_IPV6) && + IN_LOOPBACK(ntohl(inp->inp_laddr.s_addr))) + return (0); #if 0 ADAPTER_LOCK(sc); if (IS_BUSY(sc)) { Modified: stable/10/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_tom.h Tue Dec 24 02:07:22 2013 (r259803) +++ stable/10/sys/dev/cxgbe/tom/t4_tom.h Tue Dec 24 02:10:12 2013 (r259804) @@ -176,6 +176,7 @@ struct listen_ctx { struct inpcb *inp; /* listening socket's inp */ struct sge_wrq *ctrlq; struct sge_ofld_rxq *ofld_rxq; + struct clip_entry *ce; TAILQ_HEAD(, synq_entry) synq; }; From owner-svn-src-stable@FreeBSD.ORG Tue Dec 24 05:17:25 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CE4BD77; Tue, 24 Dec 2013 05:17:25 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 07BC51DD4; Tue, 24 Dec 2013 05:17:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBO5HObC021954; Tue, 24 Dec 2013 05:17:24 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBO5HO8m021953; Tue, 24 Dec 2013 05:17:24 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201312240517.rBO5HO8m021953@svn.freebsd.org> From: Craig Rodrigues Date: Tue, 24 Dec 2013 05:17:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259809 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 05:17:25 -0000 Author: rodrigc Date: Tue Dec 24 05:17:24 2013 New Revision: 259809 URL: http://svnweb.freebsd.org/changeset/base/259809 Log: MFC r259808 Add pointer to wiki for Hyper-V information. Wiki content for Hyper-V in FreeBSD 10 was significantly updated by Abhishek Gupta . Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Directory Properties: stable/10/ (props changed) Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Dec 24 05:10:41 2013 (r259808) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Dec 24 05:17:24 2013 (r259809) @@ -207,7 +207,9 @@ hv_netsvc_load="YES" hv_utils_load="YES" hv_vmbus_load="YES" Alternatively, the Hyper-V drivers can be added to the i386 kernel by adding device hyperv to the kernel config, and then - recompiling the kernel. + recompiling the kernel. Please refer to: + FreeBSD and Microsoft Windows Server Hyper-V support + for full instructions on how to set up Hyper-V support under FreeBSD. The &man.vmx.4; driver has been added. &man.vmx.4; is a VMware VMXNET3 ethernet driver ported from From owner-svn-src-stable@FreeBSD.ORG Tue Dec 24 07:25:50 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5CC862F6; Tue, 24 Dec 2013 07:25: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 48B791639; Tue, 24 Dec 2013 07:25:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBO7PoJY068018; Tue, 24 Dec 2013 07:25:50 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBO7Po98068017; Tue, 24 Dec 2013 07:25:50 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201312240725.rBO7Po98068017@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 24 Dec 2013 07:25:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259814 - stable/10/sys/fs/fifofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 07:25:50 -0000 Author: kib Date: Tue Dec 24 07:25:49 2013 New Revision: 259814 URL: http://svnweb.freebsd.org/changeset/base/259814 Log: MFC r259521: Do not allow O_EXEC opens for fifo, return EINVAL. Modified: stable/10/sys/fs/fifofs/fifo_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/fifofs/fifo_vnops.c ============================================================================== --- stable/10/sys/fs/fifofs/fifo_vnops.c Tue Dec 24 07:14:25 2013 (r259813) +++ stable/10/sys/fs/fifofs/fifo_vnops.c Tue Dec 24 07:25:49 2013 (r259814) @@ -143,7 +143,7 @@ fifo_open(ap) fp = ap->a_fp; td = ap->a_td; ASSERT_VOP_ELOCKED(vp, "fifo_open"); - if (fp == NULL) + if (fp == NULL || (ap->a_mode & FEXEC) != 0) return (EINVAL); if ((fip = vp->v_fifoinfo) == NULL) { error = pipe_named_ctor(&fpipe, td); From owner-svn-src-stable@FreeBSD.ORG Tue Dec 24 07:26:44 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3E2B44A2; Tue, 24 Dec 2013 07:26:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2A5DE1644; Tue, 24 Dec 2013 07:26:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBO7QiS0068152; Tue, 24 Dec 2013 07:26:44 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBO7QiFh068151; Tue, 24 Dec 2013 07:26:44 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201312240726.rBO7QiFh068151@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 24 Dec 2013 07:26:44 +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: r259815 - stable/9/sys/fs/fifofs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 07:26:44 -0000 Author: kib Date: Tue Dec 24 07:26:43 2013 New Revision: 259815 URL: http://svnweb.freebsd.org/changeset/base/259815 Log: MFC r259521: Do not allow O_EXEC opens for fifo, return EINVAL. Modified: stable/9/sys/fs/fifofs/fifo_vnops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/fifofs/fifo_vnops.c ============================================================================== --- stable/9/sys/fs/fifofs/fifo_vnops.c Tue Dec 24 07:25:49 2013 (r259814) +++ stable/9/sys/fs/fifofs/fifo_vnops.c Tue Dec 24 07:26:43 2013 (r259815) @@ -194,7 +194,7 @@ fifo_open(ap) int error; ASSERT_VOP_ELOCKED(vp, "fifo_open"); - if (fp == NULL) + if (fp == NULL || (ap->a_mode & FEXEC) != 0) return (EINVAL); if ((fip = vp->v_fifoinfo) == NULL) { fip = malloc(sizeof(*fip), M_VNODE, M_WAITOK); From owner-svn-src-stable@FreeBSD.ORG Tue Dec 24 07:32:07 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 56BFE740; Tue, 24 Dec 2013 07:32:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4244016A0; Tue, 24 Dec 2013 07:32:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBO7W7nK071236; Tue, 24 Dec 2013 07:32:07 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBO7W7pv071235; Tue, 24 Dec 2013 07:32:07 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201312240732.rBO7W7pv071235@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 24 Dec 2013 07:32:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259817 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 07:32:07 -0000 Author: kib Date: Tue Dec 24 07:32:06 2013 New Revision: 259817 URL: http://svnweb.freebsd.org/changeset/base/259817 Log: MFC r259522: If vn_open_vnode() succeeded in opening the vnode, but subsequent advisory lock cannot be obtained, prevent double-close of the vnode in vn_close() called from the fdrop(), by resetting file' f_ops methods. Modified: stable/10/sys/kern/vfs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/vfs_vnops.c ============================================================================== --- stable/10/sys/kern/vfs_vnops.c Tue Dec 24 07:27:55 2013 (r259816) +++ stable/10/sys/kern/vfs_vnops.c Tue Dec 24 07:32:06 2013 (r259817) @@ -313,6 +313,9 @@ vn_open_vnode(struct vnode *vp, int fmod vn_lock(vp, lock_flags | LK_RETRY); (void)VOP_CLOSE(vp, fmode, cred, td); vn_finished_write(mp); + /* Prevent second close from fdrop()->vn_close(). */ + if (fp != NULL) + fp->f_ops= &badfileops; return (error); } fp->f_flag |= FHASLOCK; From owner-svn-src-stable@FreeBSD.ORG Tue Dec 24 13:46:54 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D577597C; Tue, 24 Dec 2013 13:46:54 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C0B8E123B; Tue, 24 Dec 2013 13:46:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBODksEi006334; Tue, 24 Dec 2013 13:46:54 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBODks3i006333; Tue, 24 Dec 2013 13:46:54 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201312241346.rBODks3i006333@svn.freebsd.org> From: Jilles Tjoelker Date: Tue, 24 Dec 2013 13:46:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259820 - stable/10/sbin/swapon X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 13:46:54 -0000 Author: jilles Date: Tue Dec 24 13:46:54 2013 New Revision: 259820 URL: http://svnweb.freebsd.org/changeset/base/259820 Log: MFC r259677: swapon: Fix buffer overflow when configuring swap on GBDE. PR: bin/184950 Modified: stable/10/sbin/swapon/swapon.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/swapon/swapon.c ============================================================================== --- stable/10/sbin/swapon/swapon.c Tue Dec 24 09:19:49 2013 (r259819) +++ stable/10/sbin/swapon/swapon.c Tue Dec 24 13:46:54 2013 (r259820) @@ -266,7 +266,8 @@ static const char * swap_on_off_gbde(const char *name, int doingall) { const char *ret; - char pass[64 * 2 + 1], bpass[64]; + char pass[64 * 2 + 1]; + unsigned char bpass[64]; char *dname; int i, error; From owner-svn-src-stable@FreeBSD.ORG Tue Dec 24 14:26:33 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B00994FE; Tue, 24 Dec 2013 14:26:33 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 98C8B14E2; Tue, 24 Dec 2013 14:26:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBOEQXNK020963; Tue, 24 Dec 2013 14:26:33 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBOEQVBf020950; Tue, 24 Dec 2013 14:26:31 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312241426.rBOEQVBf020950@svn.freebsd.org> From: Dimitry Andric Date: Tue, 24 Dec 2013 14:26: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: r259822 - in stable: 10/lib/clang 10/lib/clang/include 10/lib/clang/include/llvm/Config 10/lib/clang/libllvmpowerpcasmparser 10/usr.bin/clang/clang 10/usr.bin/clang/llc 10/usr.bin/clang... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 14:26:33 -0000 Author: dim Date: Tue Dec 24 14:26:31 2013 New Revision: 259822 URL: http://svnweb.freebsd.org/changeset/base/259822 Log: MFC r259473: Enable llvm's integrated assembler for PowerPC, since it should now be good enough for typical usage. Requested by: rdivacky Added: stable/9/lib/clang/include/PPCGenAsmMatcher.inc - copied unchanged from r259473, head/lib/clang/include/PPCGenAsmMatcher.inc stable/9/lib/clang/libllvmpowerpcasmparser/ - copied from r259473, head/lib/clang/libllvmpowerpcasmparser/ Modified: stable/9/lib/clang/Makefile stable/9/lib/clang/include/llvm/Config/AsmParsers.def stable/9/usr.bin/clang/clang/Makefile stable/9/usr.bin/clang/llc/Makefile stable/9/usr.bin/clang/llvm-mc/Makefile stable/9/usr.bin/clang/llvm-objdump/Makefile stable/9/usr.bin/clang/llvm-rtdyld/Makefile stable/9/usr.bin/clang/opt/Makefile Directory Properties: stable/9/lib/clang/ (props changed) stable/9/lib/clang/include/ (props changed) stable/9/usr.bin/ (props changed) stable/9/usr.bin/clang/ (props changed) Changes in other areas also in this revision: Added: stable/10/lib/clang/include/PPCGenAsmMatcher.inc - copied unchanged from r259473, head/lib/clang/include/PPCGenAsmMatcher.inc stable/10/lib/clang/libllvmpowerpcasmparser/ - copied from r259473, head/lib/clang/libllvmpowerpcasmparser/ Modified: stable/10/lib/clang/Makefile stable/10/lib/clang/include/llvm/Config/AsmParsers.def stable/10/usr.bin/clang/clang/Makefile stable/10/usr.bin/clang/llc/Makefile stable/10/usr.bin/clang/lldb/Makefile stable/10/usr.bin/clang/llvm-mc/Makefile stable/10/usr.bin/clang/llvm-objdump/Makefile stable/10/usr.bin/clang/llvm-rtdyld/Makefile stable/10/usr.bin/clang/opt/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/9/lib/clang/Makefile ============================================================================== --- stable/9/lib/clang/Makefile Tue Dec 24 14:14:05 2013 (r259821) +++ stable/9/lib/clang/Makefile Tue Dec 24 14:26:31 2013 (r259822) @@ -69,6 +69,7 @@ SUBDIR= libclanganalysis \ libllvmmipsdisassembler \ libllvmmipsinfo \ libllvmmipsinstprinter \ + libllvmpowerpcasmparser \ libllvmpowerpccodegen \ libllvmpowerpcdesc \ libllvmpowerpcinfo \ Copied: stable/9/lib/clang/include/PPCGenAsmMatcher.inc (from r259473, head/lib/clang/include/PPCGenAsmMatcher.inc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/lib/clang/include/PPCGenAsmMatcher.inc Tue Dec 24 14:26:31 2013 (r259822, copy of r259473, head/lib/clang/include/PPCGenAsmMatcher.inc) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "PPCGenAsmMatcher.inc.h" Modified: stable/9/lib/clang/include/llvm/Config/AsmParsers.def ============================================================================== --- stable/9/lib/clang/include/llvm/Config/AsmParsers.def Tue Dec 24 14:14:05 2013 (r259821) +++ stable/9/lib/clang/include/llvm/Config/AsmParsers.def Tue Dec 24 14:26:31 2013 (r259822) @@ -2,6 +2,7 @@ LLVM_ASM_PARSER(ARM) LLVM_ASM_PARSER(Mips) +LLVM_ASM_PARSER(PowerPC) LLVM_ASM_PARSER(X86) #undef LLVM_ASM_PARSER Modified: stable/9/usr.bin/clang/clang/Makefile ============================================================================== --- stable/9/usr.bin/clang/clang/Makefile Tue Dec 24 14:14:05 2013 (r259821) +++ stable/9/usr.bin/clang/clang/Makefile Tue Dec 24 14:26:31 2013 (r259822) @@ -85,8 +85,9 @@ LIBDEPS=clangfrontendtool \ llvmmipsinstprinter \ llvmpowerpccodegen \ llvmpowerpcdesc \ - llvmpowerpcinfo \ llvmpowerpcinstprinter \ + llvmpowerpcasmparser \ + llvmpowerpcinfo \ llvmx86disassembler \ llvmx86asmparser \ llvmx86codegen \ Modified: stable/9/usr.bin/clang/llc/Makefile ============================================================================== --- stable/9/usr.bin/clang/llc/Makefile Tue Dec 24 14:14:05 2013 (r259821) +++ stable/9/usr.bin/clang/llc/Makefile Tue Dec 24 14:26:31 2013 (r259822) @@ -24,8 +24,9 @@ LIBDEPS=llvmirreader \ llvmmipsinstprinter \ llvmpowerpccodegen \ llvmpowerpcdesc \ - llvmpowerpcinfo \ llvmpowerpcinstprinter \ + llvmpowerpcasmparser \ + llvmpowerpcinfo \ llvmx86disassembler \ llvmx86asmparser \ llvmx86codegen \ Modified: stable/9/usr.bin/clang/llvm-mc/Makefile ============================================================================== --- stable/9/usr.bin/clang/llvm-mc/Makefile Tue Dec 24 14:14:05 2013 (r259821) +++ stable/9/usr.bin/clang/llvm-mc/Makefile Tue Dec 24 14:26:31 2013 (r259822) @@ -24,8 +24,9 @@ LIBDEPS=llvmmcdisassembler \ llvmmipsinstprinter \ llvmpowerpccodegen \ llvmpowerpcdesc \ - llvmpowerpcinfo \ llvmpowerpcinstprinter \ + llvmpowerpcasmparser \ + llvmpowerpcinfo \ llvmx86disassembler \ llvmx86asmparser \ llvmx86codegen \ Modified: stable/9/usr.bin/clang/llvm-objdump/Makefile ============================================================================== --- stable/9/usr.bin/clang/llvm-objdump/Makefile Tue Dec 24 14:14:05 2013 (r259821) +++ stable/9/usr.bin/clang/llvm-objdump/Makefile Tue Dec 24 14:26:31 2013 (r259822) @@ -30,8 +30,9 @@ LIBDEPS=llvmmcdisassembler \ llvmmipsinstprinter \ llvmpowerpccodegen \ llvmpowerpcdesc \ - llvmpowerpcinfo \ llvmpowerpcinstprinter \ + llvmpowerpcasmparser \ + llvmpowerpcinfo \ llvmx86disassembler \ llvmx86asmparser \ llvmx86codegen \ Modified: stable/9/usr.bin/clang/llvm-rtdyld/Makefile ============================================================================== --- stable/9/usr.bin/clang/llvm-rtdyld/Makefile Tue Dec 24 14:14:05 2013 (r259821) +++ stable/9/usr.bin/clang/llvm-rtdyld/Makefile Tue Dec 24 14:26:31 2013 (r259822) @@ -28,8 +28,9 @@ LIBDEPS=llvmdebuginfo \ llvmmipsinstprinter \ llvmpowerpccodegen \ llvmpowerpcdesc \ - llvmpowerpcinfo \ llvmpowerpcinstprinter \ + llvmpowerpcasmparser \ + llvmpowerpcinfo \ llvmx86disassembler \ llvmx86asmparser \ llvmx86codegen \ Modified: stable/9/usr.bin/clang/opt/Makefile ============================================================================== --- stable/9/usr.bin/clang/opt/Makefile Tue Dec 24 14:14:05 2013 (r259821) +++ stable/9/usr.bin/clang/opt/Makefile Tue Dec 24 14:26:31 2013 (r259822) @@ -25,8 +25,9 @@ LIBDEPS=llvmarmdisassembler \ llvmmipsinstprinter \ llvmpowerpccodegen \ llvmpowerpcdesc \ - llvmpowerpcinfo \ llvmpowerpcinstprinter \ + llvmpowerpcasmparser \ + llvmpowerpcinfo \ llvmx86disassembler \ llvmx86asmparser \ llvmx86codegen \ From owner-svn-src-stable@FreeBSD.ORG Tue Dec 24 14:26:36 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F191C4FF; Tue, 24 Dec 2013 14:26:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DA01014E3; Tue, 24 Dec 2013 14:26:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBOEQZ0Q020978; Tue, 24 Dec 2013 14:26:35 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBOEQXiq020968; Tue, 24 Dec 2013 14:26:33 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312241426.rBOEQXiq020968@svn.freebsd.org> From: Dimitry Andric Date: Tue, 24 Dec 2013 14:26:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259822 - in stable: 10/lib/clang 10/lib/clang/include 10/lib/clang/include/llvm/Config 10/lib/clang/libllvmpowerpcasmparser 10/usr.bin/clang/clang 10/usr.bin/clang/llc 10/usr.bin/clang... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 14:26:36 -0000 Author: dim Date: Tue Dec 24 14:26:31 2013 New Revision: 259822 URL: http://svnweb.freebsd.org/changeset/base/259822 Log: MFC r259473: Enable llvm's integrated assembler for PowerPC, since it should now be good enough for typical usage. Requested by: rdivacky Added: stable/10/lib/clang/include/PPCGenAsmMatcher.inc - copied unchanged from r259473, head/lib/clang/include/PPCGenAsmMatcher.inc stable/10/lib/clang/libllvmpowerpcasmparser/ - copied from r259473, head/lib/clang/libllvmpowerpcasmparser/ Modified: stable/10/lib/clang/Makefile stable/10/lib/clang/include/llvm/Config/AsmParsers.def stable/10/usr.bin/clang/clang/Makefile stable/10/usr.bin/clang/llc/Makefile stable/10/usr.bin/clang/lldb/Makefile stable/10/usr.bin/clang/llvm-mc/Makefile stable/10/usr.bin/clang/llvm-objdump/Makefile stable/10/usr.bin/clang/llvm-rtdyld/Makefile stable/10/usr.bin/clang/opt/Makefile Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Added: stable/9/lib/clang/include/PPCGenAsmMatcher.inc - copied unchanged from r259473, head/lib/clang/include/PPCGenAsmMatcher.inc stable/9/lib/clang/libllvmpowerpcasmparser/ - copied from r259473, head/lib/clang/libllvmpowerpcasmparser/ Modified: stable/9/lib/clang/Makefile stable/9/lib/clang/include/llvm/Config/AsmParsers.def stable/9/usr.bin/clang/clang/Makefile stable/9/usr.bin/clang/llc/Makefile stable/9/usr.bin/clang/llvm-mc/Makefile stable/9/usr.bin/clang/llvm-objdump/Makefile stable/9/usr.bin/clang/llvm-rtdyld/Makefile stable/9/usr.bin/clang/opt/Makefile Directory Properties: stable/9/lib/clang/ (props changed) stable/9/lib/clang/include/ (props changed) stable/9/usr.bin/ (props changed) stable/9/usr.bin/clang/ (props changed) Modified: stable/10/lib/clang/Makefile ============================================================================== --- stable/10/lib/clang/Makefile Tue Dec 24 14:14:05 2013 (r259821) +++ stable/10/lib/clang/Makefile Tue Dec 24 14:26:31 2013 (r259822) @@ -74,6 +74,7 @@ SUBDIR= libclanganalysis \ libllvmmipsdisassembler \ libllvmmipsinfo \ libllvmmipsinstprinter \ + libllvmpowerpcasmparser \ libllvmpowerpccodegen \ libllvmpowerpcdesc \ libllvmpowerpcinfo \ Copied: stable/10/lib/clang/include/PPCGenAsmMatcher.inc (from r259473, head/lib/clang/include/PPCGenAsmMatcher.inc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/clang/include/PPCGenAsmMatcher.inc Tue Dec 24 14:26:31 2013 (r259822, copy of r259473, head/lib/clang/include/PPCGenAsmMatcher.inc) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "PPCGenAsmMatcher.inc.h" Modified: stable/10/lib/clang/include/llvm/Config/AsmParsers.def ============================================================================== --- stable/10/lib/clang/include/llvm/Config/AsmParsers.def Tue Dec 24 14:14:05 2013 (r259821) +++ stable/10/lib/clang/include/llvm/Config/AsmParsers.def Tue Dec 24 14:26:31 2013 (r259822) @@ -2,6 +2,7 @@ LLVM_ASM_PARSER(ARM) LLVM_ASM_PARSER(Mips) +LLVM_ASM_PARSER(PowerPC) LLVM_ASM_PARSER(X86) #undef LLVM_ASM_PARSER Modified: stable/10/usr.bin/clang/clang/Makefile ============================================================================== --- stable/10/usr.bin/clang/clang/Makefile Tue Dec 24 14:14:05 2013 (r259821) +++ stable/10/usr.bin/clang/clang/Makefile Tue Dec 24 14:26:31 2013 (r259822) @@ -85,8 +85,9 @@ LIBDEPS=clangfrontendtool \ llvmmipsinstprinter \ llvmpowerpccodegen \ llvmpowerpcdesc \ - llvmpowerpcinfo \ llvmpowerpcinstprinter \ + llvmpowerpcasmparser \ + llvmpowerpcinfo \ llvmx86disassembler \ llvmx86asmparser \ llvmx86codegen \ Modified: stable/10/usr.bin/clang/llc/Makefile ============================================================================== --- stable/10/usr.bin/clang/llc/Makefile Tue Dec 24 14:14:05 2013 (r259821) +++ stable/10/usr.bin/clang/llc/Makefile Tue Dec 24 14:26:31 2013 (r259822) @@ -24,8 +24,9 @@ LIBDEPS=llvmirreader \ llvmmipsinstprinter \ llvmpowerpccodegen \ llvmpowerpcdesc \ - llvmpowerpcinfo \ llvmpowerpcinstprinter \ + llvmpowerpcasmparser \ + llvmpowerpcinfo \ llvmx86disassembler \ llvmx86asmparser \ llvmx86codegen \ Modified: stable/10/usr.bin/clang/lldb/Makefile ============================================================================== --- stable/10/usr.bin/clang/lldb/Makefile Tue Dec 24 14:14:05 2013 (r259821) +++ stable/10/usr.bin/clang/lldb/Makefile Tue Dec 24 14:26:31 2013 (r259822) @@ -106,6 +106,7 @@ LIBDEPS=\ llvmmipsinstprinter \ llvmpowerpcdesc \ llvmpowerpcinstprinter \ + llvmpowerpcasmparser \ llvmruntimedyld \ llvmvectorize \ llvmx86desc \ Modified: stable/10/usr.bin/clang/llvm-mc/Makefile ============================================================================== --- stable/10/usr.bin/clang/llvm-mc/Makefile Tue Dec 24 14:14:05 2013 (r259821) +++ stable/10/usr.bin/clang/llvm-mc/Makefile Tue Dec 24 14:26:31 2013 (r259822) @@ -24,8 +24,9 @@ LIBDEPS=llvmmcdisassembler \ llvmmipsinstprinter \ llvmpowerpccodegen \ llvmpowerpcdesc \ - llvmpowerpcinfo \ llvmpowerpcinstprinter \ + llvmpowerpcasmparser \ + llvmpowerpcinfo \ llvmx86disassembler \ llvmx86asmparser \ llvmx86codegen \ Modified: stable/10/usr.bin/clang/llvm-objdump/Makefile ============================================================================== --- stable/10/usr.bin/clang/llvm-objdump/Makefile Tue Dec 24 14:14:05 2013 (r259821) +++ stable/10/usr.bin/clang/llvm-objdump/Makefile Tue Dec 24 14:26:31 2013 (r259822) @@ -30,8 +30,9 @@ LIBDEPS=llvmmcdisassembler \ llvmmipsinstprinter \ llvmpowerpccodegen \ llvmpowerpcdesc \ - llvmpowerpcinfo \ llvmpowerpcinstprinter \ + llvmpowerpcasmparser \ + llvmpowerpcinfo \ llvmx86disassembler \ llvmx86asmparser \ llvmx86codegen \ Modified: stable/10/usr.bin/clang/llvm-rtdyld/Makefile ============================================================================== --- stable/10/usr.bin/clang/llvm-rtdyld/Makefile Tue Dec 24 14:14:05 2013 (r259821) +++ stable/10/usr.bin/clang/llvm-rtdyld/Makefile Tue Dec 24 14:26:31 2013 (r259822) @@ -28,8 +28,9 @@ LIBDEPS=llvmdebuginfo \ llvmmipsinstprinter \ llvmpowerpccodegen \ llvmpowerpcdesc \ - llvmpowerpcinfo \ llvmpowerpcinstprinter \ + llvmpowerpcasmparser \ + llvmpowerpcinfo \ llvmx86disassembler \ llvmx86asmparser \ llvmx86codegen \ Modified: stable/10/usr.bin/clang/opt/Makefile ============================================================================== --- stable/10/usr.bin/clang/opt/Makefile Tue Dec 24 14:14:05 2013 (r259821) +++ stable/10/usr.bin/clang/opt/Makefile Tue Dec 24 14:26:31 2013 (r259822) @@ -25,8 +25,9 @@ LIBDEPS=llvmarmdisassembler \ llvmmipsinstprinter \ llvmpowerpccodegen \ llvmpowerpcdesc \ - llvmpowerpcinfo \ llvmpowerpcinstprinter \ + llvmpowerpcasmparser \ + llvmpowerpcinfo \ llvmx86disassembler \ llvmx86asmparser \ llvmx86codegen \ From owner-svn-src-stable@FreeBSD.ORG Tue Dec 24 18:41:18 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 683E1B57; Tue, 24 Dec 2013 18:41:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 48660171D; Tue, 24 Dec 2013 18:41:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBOIfIL3021071; Tue, 24 Dec 2013 18:41:18 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBOIfHTx021067; Tue, 24 Dec 2013 18:41:17 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201312241841.rBOIfHTx021067@svn.freebsd.org> From: John Baldwin Date: Tue, 24 Dec 2013 18:41:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259829 - in stable/9/usr.bin: kdump truss X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 18:41:18 -0000 Author: jhb Date: Tue Dec 24 18:41:17 2013 New Revision: 259829 URL: http://svnweb.freebsd.org/changeset/base/259829 Log: MFC 255493: - Decode the idtype argument passed to wait6() in kdump and truss. - Don't treat an options argument of 0 to wait4() as an error in kdump. - Decode the wait options passed to wait4() and wait6() in truss and decode the returned rusage and exit status. Modified: stable/9/usr.bin/kdump/kdump.c stable/9/usr.bin/kdump/mksubr stable/9/usr.bin/truss/syscall.h stable/9/usr.bin/truss/syscalls.c Directory Properties: stable/9/usr.bin/kdump/ (props changed) stable/9/usr.bin/truss/ (props changed) Modified: stable/9/usr.bin/kdump/kdump.c ============================================================================== --- stable/9/usr.bin/kdump/kdump.c Tue Dec 24 17:28:27 2013 (r259828) +++ stable/9/usr.bin/kdump/kdump.c Tue Dec 24 18:41:17 2013 (r259829) @@ -58,6 +58,7 @@ extern int errno; #include #include #include +#include #ifdef IPX #include #include @@ -556,8 +557,30 @@ ktrsyscall(struct ktr_syscall *ktr, u_in case SYS_wait4: print_number(ip, narg, c); print_number(ip, narg, c); + /* + * A flags value of zero is valid for + * wait4() but not for wait6(), so + * handle zero special here. + */ + if (*ip == 0) { + print_number(ip, narg, c); + } else { + putchar(','); + wait6optname(*ip); + ip++; + narg--; + } + break; + case SYS_wait6: + putchar('('); + idtypename(*ip, decimal); + c = ','; + ip++; + narg--; + print_number(ip, narg, c); + print_number(ip, narg, c); putchar(','); - wait4optname(*ip); + wait6optname(*ip); ip++; narg--; break; Modified: stable/9/usr.bin/kdump/mksubr ============================================================================== --- stable/9/usr.bin/kdump/mksubr Tue Dec 24 17:28:27 2013 (r259828) +++ stable/9/usr.bin/kdump/mksubr Tue Dec 24 18:41:17 2013 (r259829) @@ -314,6 +314,68 @@ flagsandmodename(int flags, int mode, in } } +/* MANUAL */ +void +idtypename(idtype_t idtype, int decimal) +{ + switch(idtype) { + case P_PID: + printf("P_PID"); + break; + case P_PPID: + printf("P_PPID"); + break; + case P_PGID: + printf("P_PGID"); + break; + case P_SID: + printf("P_SID"); + break; + case P_CID: + printf("P_CID"); + break; + case P_UID: + printf("P_UID"); + break; + case P_GID: + printf("P_GID"); + break; + case P_ALL: + printf("P_ALL"); + break; + case P_LWPID: + printf("P_LWPID"); + break; + case P_TASKID: + printf("P_TASKID"); + break; + case P_PROJID: + printf("P_PROJID"); + break; + case P_POOLID: + printf("P_POOLID"); + break; + case P_JAILID: + printf("P_JAILID"); + break; + case P_CTID: + printf("P_CTID"); + break; + case P_CPUID: + printf("P_CPUID"); + break; + case P_PSETID: + printf("P_PSETID"); + break; + default: + if (decimal) { + printf("%d", idtype); + } else { + printf("%#x", idtype); + } + } +} + /* * MANUAL * @@ -393,7 +455,7 @@ auto_switch_type "sockoptname" " auto_switch_type "socktypename" "SOCK_[A-Z]+[[:space:]]+[1-9]+[0-9]*" "sys/socket.h" auto_or_type "thrcreateflagsname" "THR_[A-Z]+[[:space:]]+0x[0-9]+" "sys/thr.h" auto_switch_type "vmresultname" "KERN_[A-Z]+[[:space:]]+[0-9]+" "vm/vm_param.h" -auto_or_type "wait4optname" "W[A-Z]+[[:space:]]+[0-9]+" "sys/wait.h" +auto_or_type "wait6optname" "W[A-Z]+[[:space:]]+[0-9]+" "sys/wait.h" auto_switch_type "whencename" "SEEK_[A-Z]+[[:space:]]+[0-9]+" "sys/unistd.h" cat <<_EOF_ Modified: stable/9/usr.bin/truss/syscall.h ============================================================================== --- stable/9/usr.bin/truss/syscall.h Tue Dec 24 17:28:27 2013 (r259828) +++ stable/9/usr.bin/truss/syscall.h Tue Dec 24 18:41:17 2013 (r259829) @@ -40,7 +40,7 @@ enum Argtype { None = 1, Hex, Octal, Int Fd_set, Sigaction, Fcntl, Mprot, Mmapflags, Whence, Readlinkres, Umtx, Sigset, Sigprocmask, Kevent, Sockdomain, Socktype, Open, Fcntlflag, Rusage, BinString, Shutdown, Resource, Rlimit, Timeval2, - Pathconf, Rforkflags }; + Pathconf, Rforkflags, ExitStatus, Waitoptions, Idtype }; #define ARG_MASK 0xff #define OUT 0x100 Modified: stable/9/usr.bin/truss/syscalls.c ============================================================================== --- stable/9/usr.bin/truss/syscalls.c Tue Dec 24 17:28:27 2013 (r259828) +++ stable/9/usr.bin/truss/syscalls.c Tue Dec 24 18:41:17 2013 (r259829) @@ -39,12 +39,13 @@ static const char rcsid[] = * arguments. */ -#include #include +#include #include #include #include #include +#include #include #include #include @@ -263,6 +264,12 @@ struct syscall syscalls[] = { .args = { { Name , 0 } , { Name, 1 } } }, { .name = "posix_openpt", .ret_type = 1, .nargs = 1, .args = { { Open, 0 } } }, + { .name = "wait4", .ret_type = 1, .nargs = 4, + .args = { { Int, 0 }, { ExitStatus | OUT, 1 }, { Waitoptions, 2 }, + { Rusage | OUT, 3 } } }, + { .name = "wait6", .ret_type = 1, .nargs = 6, + .args = { { Idtype, 0 }, { Int, 1 }, { ExitStatus | OUT, 2 }, + { Waitoptions, 3 }, { Rusage | OUT, 4 }, { Ptr, 5 } } }, { .name = 0 }, }; @@ -377,6 +384,17 @@ static struct xlat rfork_flags[] = { X(RFSIGSHARE) X(RFTSIGZMB) X(RFLINUXTHPN) XEND }; +static struct xlat wait_options[] = { + X(WNOHANG) X(WUNTRACED) X(WCONTINUED) X(WNOWAIT) X(WEXITED) + X(WTRAPPED) XEND +}; + +static struct xlat idtype_arg[] = { + X(P_PID) X(P_PPID) X(P_PGID) X(P_SID) X(P_CID) X(P_UID) X(P_GID) + X(P_ALL) X(P_LWPID) X(P_TASKID) X(P_PROJID) X(P_POOLID) X(P_JAILID) + X(P_CTID) X(P_CPUID) X(P_PSETID) XEND +}; + #undef X #undef XEND @@ -533,6 +551,16 @@ get_string(pid_t pid, void *offset, int } } +static char * +strsig2(int sig) +{ + char *tmp; + + tmp = strsig(sig); + if (tmp == NULL) + asprintf(&tmp, "%d", sig); + return (tmp); +} /* * print_arg @@ -818,19 +846,14 @@ print_arg(struct syscall_args *sc, unsig free(fds); break; } - case Signal: { - long sig; - - sig = args[sc->offset]; - tmp = strsig(sig); - if (tmp == NULL) - asprintf(&tmp, "%ld", sig); + case Signal: + tmp = strsig2(args[sc->offset]); break; - } case Sigset: { long sig; sigset_t ss; int i, used; + char *signame; sig = args[sc->offset]; if (get_struct(pid, (void *)args[sc->offset], (void *)&ss, @@ -841,8 +864,11 @@ print_arg(struct syscall_args *sc, unsig tmp = malloc(sys_nsig * 8); /* 7 bytes avg per signal name */ used = 0; for (i = 1; i < sys_nsig; i++) { - if (sigismember(&ss, i)) - used += sprintf(tmp + used, "%s|", strsig(i)); + if (sigismember(&ss, i)) { + signame = strsig(i); + used += sprintf(tmp + used, "%s|", signame); + free(signame); + } } if (used) tmp[used-1] = 0; @@ -1139,6 +1165,35 @@ print_arg(struct syscall_args *sc, unsig asprintf(&tmp, "0x%lx", args[sc->offset]); break; } + case ExitStatus: { + char *signame; + int status; + signame = NULL; + if (get_struct(pid, (void *)args[sc->offset], &status, + sizeof(status)) != -1) { + if (WIFCONTINUED(status)) + tmp = strdup("{ CONTINUED }"); + else if (WIFEXITED(status)) + asprintf(&tmp, "{ EXITED,val=%d }", + WEXITSTATUS(status)); + else if (WIFSIGNALED(status)) + asprintf(&tmp, "{ SIGNALED,sig=%s%s }", + signame = strsig2(WTERMSIG(status)), + WCOREDUMP(status) ? ",cored" : ""); + else + asprintf(&tmp, "{ STOPPED,sig=%s }", + signame = strsig2(WTERMSIG(status))); + } else + asprintf(&tmp, "0x%lx", args[sc->offset]); + free(signame); + break; + } + case Waitoptions: + tmp = strdup(xlookup_bits(wait_options, args[sc->offset])); + break; + case Idtype: + tmp = strdup(xlookup(idtype_arg, args[sc->offset])); + break; default: errx(1, "Invalid argument type %d\n", sc->type & ARG_MASK); } From owner-svn-src-stable@FreeBSD.ORG Tue Dec 24 18:48:29 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB44FE80; Tue, 24 Dec 2013 18:48: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BCCF51751; Tue, 24 Dec 2013 18:48:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBOImTee021956; Tue, 24 Dec 2013 18:48:29 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBOImTBq021954; Tue, 24 Dec 2013 18:48:29 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201312241848.rBOImTBq021954@svn.freebsd.org> From: John Baldwin Date: Tue, 24 Dec 2013 18:48:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259831 - stable/10/sys/arm/econa X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 18:48:30 -0000 Author: jhb Date: Tue Dec 24 18:48:29 2013 New Revision: 259831 URL: http://svnweb.freebsd.org/changeset/base/259831 Log: MFC 258177: Remove an incorrectly copied and pasted clause from these license statements. Modified: stable/10/sys/arm/econa/uart_bus_ec.c stable/10/sys/arm/econa/uart_cpu_ec.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/econa/uart_bus_ec.c ============================================================================== --- stable/10/sys/arm/econa/uart_bus_ec.c Tue Dec 24 18:42:26 2013 (r259830) +++ stable/10/sys/arm/econa/uart_bus_ec.c Tue Dec 24 18:48:29 2013 (r259831) @@ -11,9 +11,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of MARVELL nor the names of contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/10/sys/arm/econa/uart_cpu_ec.c ============================================================================== --- stable/10/sys/arm/econa/uart_cpu_ec.c Tue Dec 24 18:42:26 2013 (r259830) +++ stable/10/sys/arm/econa/uart_cpu_ec.c Tue Dec 24 18:48:29 2013 (r259831) @@ -12,9 +12,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of MARVELL nor the names of contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE From owner-svn-src-stable@FreeBSD.ORG Tue Dec 24 18:49:25 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B2D2FD1; Tue, 24 Dec 2013 18:49:25 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D0D041761; Tue, 24 Dec 2013 18:49:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBOInOwn022087; Tue, 24 Dec 2013 18:49:24 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBOInO0h022085; Tue, 24 Dec 2013 18:49:24 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201312241849.rBOInO0h022085@svn.freebsd.org> From: John Baldwin Date: Tue, 24 Dec 2013 18:49:24 +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: r259832 - stable/9/sys/arm/econa X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 18:49:25 -0000 Author: jhb Date: Tue Dec 24 18:49:24 2013 New Revision: 259832 URL: http://svnweb.freebsd.org/changeset/base/259832 Log: MFC 258177: Remove an incorrectly copied and pasted clause from these license statements. Modified: stable/9/sys/arm/econa/uart_bus_ec.c stable/9/sys/arm/econa/uart_cpu_ec.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/arm/econa/uart_bus_ec.c ============================================================================== --- stable/9/sys/arm/econa/uart_bus_ec.c Tue Dec 24 18:48:29 2013 (r259831) +++ stable/9/sys/arm/econa/uart_bus_ec.c Tue Dec 24 18:49:24 2013 (r259832) @@ -11,9 +11,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of MARVELL nor the names of contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/9/sys/arm/econa/uart_cpu_ec.c ============================================================================== --- stable/9/sys/arm/econa/uart_cpu_ec.c Tue Dec 24 18:48:29 2013 (r259831) +++ stable/9/sys/arm/econa/uart_cpu_ec.c Tue Dec 24 18:49:24 2013 (r259832) @@ -12,9 +12,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of MARVELL nor the names of contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE From owner-svn-src-stable@FreeBSD.ORG Tue Dec 24 19:01:09 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A3403AC; Tue, 24 Dec 2013 19:01:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 163DC185C; Tue, 24 Dec 2013 19:01:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBOJ18th028279; Tue, 24 Dec 2013 19:01:08 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBOJ18FW028278; Tue, 24 Dec 2013 19:01:08 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201312241901.rBOJ18FW028278@svn.freebsd.org> From: John Baldwin Date: Tue, 24 Dec 2013 19:01:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259834 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 19:01:09 -0000 Author: jhb Date: Tue Dec 24 19:01:08 2013 New Revision: 259834 URL: http://svnweb.freebsd.org/changeset/base/259834 Log: MFC 258869: Fix an off-by-one error in r228960. The maximum priority delta provided by SCHED_PRI_TICKS should be SCHED_PRI_RANGE - 1 so that the resulting priority value (before nice adjustment) is between SCHED_PRI_MIN and SCHED_PRI_MAX, inclusive. Modified: stable/10/sys/kern/sched_ule.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/sched_ule.c ============================================================================== --- stable/10/sys/kern/sched_ule.c Tue Dec 24 18:52:36 2013 (r259833) +++ stable/10/sys/kern/sched_ule.c Tue Dec 24 19:01:08 2013 (r259834) @@ -1533,7 +1533,7 @@ sched_priority(struct thread *td) pri = SCHED_PRI_MIN; if (td->td_sched->ts_ticks) pri += min(SCHED_PRI_TICKS(td->td_sched), - SCHED_PRI_RANGE); + SCHED_PRI_RANGE - 1); pri += SCHED_PRI_NICE(td->td_proc->p_nice); KASSERT(pri >= PRI_MIN_BATCH && pri <= PRI_MAX_BATCH, ("sched_priority: invalid priority %d: nice %d, " From owner-svn-src-stable@FreeBSD.ORG Tue Dec 24 19:02:04 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ACA964E5; Tue, 24 Dec 2013 19:02: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9902B1863; Tue, 24 Dec 2013 19:02:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBOJ24X7028463; Tue, 24 Dec 2013 19:02:04 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBOJ24PJ028462; Tue, 24 Dec 2013 19:02:04 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201312241902.rBOJ24PJ028462@svn.freebsd.org> From: John Baldwin Date: Tue, 24 Dec 2013 19:02:04 +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: r259835 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 19:02:04 -0000 Author: jhb Date: Tue Dec 24 19:02:04 2013 New Revision: 259835 URL: http://svnweb.freebsd.org/changeset/base/259835 Log: MFC 258869: Fix an off-by-one error in r228960. The maximum priority delta provided by SCHED_PRI_TICKS should be SCHED_PRI_RANGE - 1 so that the resulting priority value (before nice adjustment) is between SCHED_PRI_MIN and SCHED_PRI_MAX, inclusive. Modified: stable/9/sys/kern/sched_ule.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/sched_ule.c ============================================================================== --- stable/9/sys/kern/sched_ule.c Tue Dec 24 19:01:08 2013 (r259834) +++ stable/9/sys/kern/sched_ule.c Tue Dec 24 19:02:04 2013 (r259835) @@ -1499,7 +1499,7 @@ sched_priority(struct thread *td) pri = SCHED_PRI_MIN; if (td->td_sched->ts_ticks) pri += min(SCHED_PRI_TICKS(td->td_sched), - SCHED_PRI_RANGE); + SCHED_PRI_RANGE - 1); pri += SCHED_PRI_NICE(td->td_proc->p_nice); KASSERT(pri >= PRI_MIN_BATCH && pri <= PRI_MAX_BATCH, ("sched_priority: invalid priority %d: nice %d, " From owner-svn-src-stable@FreeBSD.ORG Tue Dec 24 19:03:31 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A19662B; Tue, 24 Dec 2013 19:03: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 761BB186D; Tue, 24 Dec 2013 19:03:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBOJ3VEr028711; Tue, 24 Dec 2013 19:03:31 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBOJ3Vdk028710; Tue, 24 Dec 2013 19:03:31 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201312241903.rBOJ3Vdk028710@svn.freebsd.org> From: John Baldwin Date: Tue, 24 Dec 2013 19:03:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r259836 - stable/8/sys/kern X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 19:03:31 -0000 Author: jhb Date: Tue Dec 24 19:03:30 2013 New Revision: 259836 URL: http://svnweb.freebsd.org/changeset/base/259836 Log: MFC 258869: Fix an off-by-one error in r228960. The maximum priority delta provided by SCHED_PRI_TICKS should be SCHED_PRI_RANGE - 1 so that the resulting priority value (before nice adjustment) is between SCHED_PRI_MIN and SCHED_PRI_MAX, inclusive. Modified: stable/8/sys/kern/sched_ule.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/sys/kern/sched_ule.c ============================================================================== --- stable/8/sys/kern/sched_ule.c Tue Dec 24 19:02:04 2013 (r259835) +++ stable/8/sys/kern/sched_ule.c Tue Dec 24 19:03:30 2013 (r259836) @@ -1488,7 +1488,7 @@ sched_priority(struct thread *td) pri = SCHED_PRI_MIN; if (td->td_sched->ts_ticks) pri += min(SCHED_PRI_TICKS(td->td_sched), - SCHED_PRI_RANGE); + SCHED_PRI_RANGE - 1); pri += SCHED_PRI_NICE(td->td_proc->p_nice); KASSERT(pri >= PRI_MIN_BATCH && pri <= PRI_MAX_BATCH, ("sched_priority: invalid priority %d: nice %d, " From owner-svn-src-stable@FreeBSD.ORG Tue Dec 24 19:10:57 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0530F7DE; Tue, 24 Dec 2013 19:10:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CAF6918D5; Tue, 24 Dec 2013 19:10:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBOJAujp030576; Tue, 24 Dec 2013 19:10:56 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBOJAu9X030574; Tue, 24 Dec 2013 19:10:56 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201312241910.rBOJAu9X030574@svn.freebsd.org> From: John Baldwin Date: Tue, 24 Dec 2013 19:10:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259837 - in stable/10: sys/x86/include usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 19:10:57 -0000 Author: jhb Date: Tue Dec 24 19:10:56 2013 New Revision: 259837 URL: http://svnweb.freebsd.org/changeset/base/259837 Log: MFC 259013: Fix the processor table entry structure to use a fixed-width type for 32-bit fields so it is the correct size on amd64. Remove a workaround for the broken structure from bhyve(8). Modified: stable/10/sys/x86/include/mptable.h stable/10/usr.sbin/bhyve/mptbl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/include/mptable.h ============================================================================== --- stable/10/sys/x86/include/mptable.h Tue Dec 24 19:03:30 2013 (r259836) +++ stable/10/sys/x86/include/mptable.h Tue Dec 24 19:10:56 2013 (r259837) @@ -85,10 +85,10 @@ typedef struct PROCENTRY { u_char apic_id; u_char apic_version; u_char cpu_flags; - u_long cpu_signature; - u_long feature_flags; - u_long reserved1; - u_long reserved2; + u_int32_t cpu_signature; + u_int32_t feature_flags; + u_int32_t reserved1; + u_int32_t reserved2; } *proc_entry_ptr; #define PROCENTRY_FLAG_EN 0x01 Modified: stable/10/usr.sbin/bhyve/mptbl.c ============================================================================== --- stable/10/usr.sbin/bhyve/mptbl.c Tue Dec 24 19:03:30 2013 (r259836) +++ stable/10/usr.sbin/bhyve/mptbl.c Tue Dec 24 19:10:56 2013 (r259837) @@ -74,19 +74,6 @@ __FBSDID("$FreeBSD$"); /* Number of i/o intr entries */ #define MPEII_MAX_IRQ 16 -/* Define processor entry struct since gets it wrong */ -typedef struct BPROCENTRY { - u_char type; - u_char apic_id; - u_char apic_version; - u_char cpu_flags; - uint32_t cpu_signature; - uint32_t feature_flags; - uint32_t reserved1; - uint32_t reserved2; -} *bproc_entry_ptr; -CTASSERT(sizeof(struct BPROCENTRY) == 20); - /* Bus entry defines */ #define MPE_NUM_BUSES 2 #define MPE_BUSNAME_LEN 6 @@ -134,7 +121,7 @@ mpt_build_mpch(mpcth_t mpch) } static void -mpt_build_proc_entries(bproc_entry_ptr mpep, int ncpu) +mpt_build_proc_entries(proc_entry_ptr mpep, int ncpu) { int i; @@ -247,7 +234,7 @@ mptable_build(struct vmctx *ctx, int ncp mpcth_t mpch; bus_entry_ptr mpeb; io_apic_entry_ptr mpei; - bproc_entry_ptr mpep; + proc_entry_ptr mpep; mpfps_t mpfp; int_entry_ptr mpie; char *curraddr; @@ -268,7 +255,7 @@ mptable_build(struct vmctx *ctx, int ncp mpt_build_mpch(mpch); curraddr += sizeof(*mpch); - mpep = (bproc_entry_ptr)curraddr; + mpep = (proc_entry_ptr)curraddr; mpt_build_proc_entries(mpep, ncpu); curraddr += sizeof(*mpep) * ncpu; mpch->entry_count += ncpu; From owner-svn-src-stable@FreeBSD.ORG Tue Dec 24 23:23:45 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 37054D8; Tue, 24 Dec 2013 23:23: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2236B18DE; Tue, 24 Dec 2013 23:23:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBONNjMp024802; Tue, 24 Dec 2013 23:23:45 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBONNiOZ024801; Tue, 24 Dec 2013 23:23:44 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201312242323.rBONNiOZ024801@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 24 Dec 2013 23:23:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259847 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 23:23:45 -0000 Author: ae Date: Tue Dec 24 23:23:44 2013 New Revision: 259847 URL: http://svnweb.freebsd.org/changeset/base/259847 Log: MFC r259520: Fix copy/paste typo. Modified: stable/10/sys/kern/kern_jail.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_jail.c ============================================================================== --- stable/10/sys/kern/kern_jail.c Tue Dec 24 22:38:24 2013 (r259846) +++ stable/10/sys/kern/kern_jail.c Tue Dec 24 23:23:44 2013 (r259847) @@ -3046,7 +3046,7 @@ prison_restrict_ip6(struct prison *pr, s ii++; continue; } - switch (ij >= ppr->pr_ip4s ? -1 : + switch (ij >= ppr->pr_ip6s ? -1 : qcmp_v6(&pr->pr_ip6[ii], &ppr->pr_ip6[ij])) { case -1: bcopy(pr->pr_ip6 + ii + 1, pr->pr_ip6 + ii, From owner-svn-src-stable@FreeBSD.ORG Tue Dec 24 23:27:00 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5EF4D310; Tue, 24 Dec 2013 23:27: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 49F13190E; Tue, 24 Dec 2013 23:27:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBONR0EJ025199; Tue, 24 Dec 2013 23:27:00 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBONR05n025197; Tue, 24 Dec 2013 23:27:00 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201312242327.rBONR05n025197@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 24 Dec 2013 23:27: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: r259848 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 23:27:00 -0000 Author: ae Date: Tue Dec 24 23:26:59 2013 New Revision: 259848 URL: http://svnweb.freebsd.org/changeset/base/259848 Log: MFC r259520: Fix copy/paste typo. Modified: stable/9/sys/kern/kern_jail.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_jail.c ============================================================================== --- stable/9/sys/kern/kern_jail.c Tue Dec 24 23:23:44 2013 (r259847) +++ stable/9/sys/kern/kern_jail.c Tue Dec 24 23:26:59 2013 (r259848) @@ -3059,7 +3059,7 @@ prison_restrict_ip6(struct prison *pr, s ii++; continue; } - switch (ij >= ppr->pr_ip4s ? -1 : + switch (ij >= ppr->pr_ip6s ? -1 : qcmp_v6(&pr->pr_ip6[ii], &ppr->pr_ip6[ij])) { case -1: bcopy(pr->pr_ip6 + ii + 1, pr->pr_ip6 + ii, From owner-svn-src-stable@FreeBSD.ORG Tue Dec 24 23:50:36 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C0B19A7; Tue, 24 Dec 2013 23:50:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3796B1AB0; Tue, 24 Dec 2013 23:50:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBONoasY035045; Tue, 24 Dec 2013 23:50:36 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBONoaxl035044; Tue, 24 Dec 2013 23:50:36 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201312242350.rBONoaxl035044@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 24 Dec 2013 23:50:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r259849 - stable/8/sys/kern X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 23:50:36 -0000 Author: ae Date: Tue Dec 24 23:50:35 2013 New Revision: 259849 URL: http://svnweb.freebsd.org/changeset/base/259849 Log: MFC r259520: Fix copy/paste typo. Modified: stable/8/sys/kern/kern_jail.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/sys/kern/kern_jail.c ============================================================================== --- stable/8/sys/kern/kern_jail.c Tue Dec 24 23:26:59 2013 (r259848) +++ stable/8/sys/kern/kern_jail.c Tue Dec 24 23:50:35 2013 (r259849) @@ -2959,7 +2959,7 @@ prison_restrict_ip6(struct prison *pr, s ii++; continue; } - switch (ij >= ppr->pr_ip4s ? -1 : + switch (ij >= ppr->pr_ip6s ? -1 : qcmp_v6(&pr->pr_ip6[ii], &ppr->pr_ip6[ij])) { case -1: bcopy(pr->pr_ip6 + ii + 1, pr->pr_ip6 + ii, From owner-svn-src-stable@FreeBSD.ORG Wed Dec 25 00:40:43 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C98662CF; Wed, 25 Dec 2013 00:40:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B45071EEB; Wed, 25 Dec 2013 00:40:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBP0ehEY051954; Wed, 25 Dec 2013 00:40:43 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBP0ehEZ051953; Wed, 25 Dec 2013 00:40:43 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312250040.rBP0ehEZ051953@svn.freebsd.org> From: Dimitry Andric Date: Wed, 25 Dec 2013 00:40:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259851 - in stable: 10/gnu/lib/csu 9/gnu/lib/csu X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Dec 2013 00:40:43 -0000 Author: dim Date: Wed Dec 25 00:40:42 2013 New Revision: 259851 URL: http://svnweb.freebsd.org/changeset/base/259851 Log: MFC r259720: For gnu/lib/csu, only use gcc-specific flags when compiling with gcc. Modified: stable/10/gnu/lib/csu/Makefile Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/gnu/lib/csu/Makefile Directory Properties: stable/9/gnu/lib/csu/ (props changed) Modified: stable/10/gnu/lib/csu/Makefile ============================================================================== --- stable/10/gnu/lib/csu/Makefile Wed Dec 25 00:39:04 2013 (r259850) +++ stable/10/gnu/lib/csu/Makefile Wed Dec 25 00:40:42 2013 (r259851) @@ -15,10 +15,12 @@ OBJS= crtbegin.o crtend.o crtbeginT.o SOBJS= crtbeginS.o crtendS.o CSTD?= gnu89 CFLAGS+= -DIN_GCC -DHAVE_LD_EH_FRAME_HDR -DDT_CONFIG -D__GLIBC__=3 -CFLAGS+= -finhibit-size-directive -fno-inline-functions \ - -fno-exceptions -fno-zero-initialized-in-bss \ - -fno-zero-initialized-in-bss -fno-toplevel-reorder \ - -fno-asynchronous-unwind-tables -fno-omit-frame-pointer +.if ${COMPILER_TYPE} == "gcc" +CFLAGS+= -finhibit-size-directive -fno-toplevel-reorder +.endif +CFLAGS+= -fno-inline-functions -fno-exceptions \ + -fno-zero-initialized-in-bss -fno-asynchronous-unwind-tables \ + -fno-omit-frame-pointer CFLAGS+= -I${GCCLIB}/include -I${GCCDIR}/config -I${GCCDIR} -I. \ -I${CCDIR}/cc_tools CRTS_CFLAGS= -DCRTSTUFFS_O -DSHARED ${PICFLAG} From owner-svn-src-stable@FreeBSD.ORG Wed Dec 25 00:40:43 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C0352CE; Wed, 25 Dec 2013 00:40:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 474FF1EEA; Wed, 25 Dec 2013 00:40:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBP0eh73051948; Wed, 25 Dec 2013 00:40:43 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBP0eh7H051947; Wed, 25 Dec 2013 00:40:43 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312250040.rBP0eh7H051947@svn.freebsd.org> From: Dimitry Andric Date: Wed, 25 Dec 2013 00:40: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: r259851 - in stable: 10/gnu/lib/csu 9/gnu/lib/csu X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Dec 2013 00:40:43 -0000 Author: dim Date: Wed Dec 25 00:40:42 2013 New Revision: 259851 URL: http://svnweb.freebsd.org/changeset/base/259851 Log: MFC r259720: For gnu/lib/csu, only use gcc-specific flags when compiling with gcc. Modified: stable/9/gnu/lib/csu/Makefile Directory Properties: stable/9/gnu/lib/csu/ (props changed) Changes in other areas also in this revision: Modified: stable/10/gnu/lib/csu/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/9/gnu/lib/csu/Makefile ============================================================================== --- stable/9/gnu/lib/csu/Makefile Wed Dec 25 00:39:04 2013 (r259850) +++ stable/9/gnu/lib/csu/Makefile Wed Dec 25 00:40:42 2013 (r259851) @@ -15,10 +15,12 @@ OBJS= crtbegin.o crtend.o crtbeginT.o SOBJS= crtbegin.So crtend.So CSTD?= gnu89 CFLAGS+= -DIN_GCC -DHAVE_LD_EH_FRAME_HDR -DDT_CONFIG -D__GLIBC__=3 -CFLAGS+= -finhibit-size-directive -fno-inline-functions \ - -fno-exceptions -fno-zero-initialized-in-bss \ - -fno-zero-initialized-in-bss -fno-toplevel-reorder \ - -fno-asynchronous-unwind-tables -fno-omit-frame-pointer +.if ${COMPILER_TYPE} == "gcc" +CFLAGS+= -finhibit-size-directive -fno-toplevel-reorder +.endif +CFLAGS+= -fno-inline-functions -fno-exceptions \ + -fno-zero-initialized-in-bss -fno-asynchronous-unwind-tables \ + -fno-omit-frame-pointer CFLAGS+= -I${GCCLIB}/include -I${GCCDIR}/config -I${GCCDIR} -I. \ -I${CCDIR}/cc_tools CRTS_CFLAGS= -DCRTSTUFFS_O -DSHARED ${PICFLAG} From owner-svn-src-stable@FreeBSD.ORG Wed Dec 25 00:48:09 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35E34575; Wed, 25 Dec 2013 00:48:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 204841F11; Wed, 25 Dec 2013 00:48:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBP0m8Vm055349; Wed, 25 Dec 2013 00:48:08 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBP0m8MR055348; Wed, 25 Dec 2013 00:48:08 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312250048.rBP0m8MR055348@svn.freebsd.org> From: Dimitry Andric Date: Wed, 25 Dec 2013 00:48:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259852 - in stable: 10/contrib/file 8/contrib/file 9/contrib/file X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Dec 2013 00:48:09 -0000 Author: dim Date: Wed Dec 25 00:48:08 2013 New Revision: 259852 URL: http://svnweb.freebsd.org/changeset/base/259852 Log: MFC r259724: Apply upstream commit 33312fd828e59c78ae4ee30fd70d0ca109748cf0 (by zoulasc) to contrib/file: don't write a char to a pointer. Modified: stable/9/contrib/file/compress.c Directory Properties: stable/9/contrib/file/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/file/compress.c stable/8/contrib/file/compress.c Directory Properties: stable/10/ (props changed) stable/8/contrib/file/ (props changed) Modified: stable/9/contrib/file/compress.c ============================================================================== --- stable/9/contrib/file/compress.c Wed Dec 25 00:40:42 2013 (r259851) +++ stable/9/contrib/file/compress.c Wed Dec 25 00:48:08 2013 (r259852) @@ -480,7 +480,7 @@ uncompressbuf(struct magic_set *ms, int #endif free(*newch); n = 0; - newch[0] = '\0'; + *newch = NULL; goto err; } else { n = r; From owner-svn-src-stable@FreeBSD.ORG Wed Dec 25 00:48:09 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89C40576; Wed, 25 Dec 2013 00:48:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 751621F12; Wed, 25 Dec 2013 00:48:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBP0m97R055355; Wed, 25 Dec 2013 00:48:09 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBP0m9dZ055354; Wed, 25 Dec 2013 00:48:09 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312250048.rBP0m9dZ055354@svn.freebsd.org> From: Dimitry Andric Date: Wed, 25 Dec 2013 00:48:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r259852 - in stable: 10/contrib/file 8/contrib/file 9/contrib/file X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Dec 2013 00:48:09 -0000 Author: dim Date: Wed Dec 25 00:48:08 2013 New Revision: 259852 URL: http://svnweb.freebsd.org/changeset/base/259852 Log: MFC r259724: Apply upstream commit 33312fd828e59c78ae4ee30fd70d0ca109748cf0 (by zoulasc) to contrib/file: don't write a char to a pointer. Modified: stable/8/contrib/file/compress.c Directory Properties: stable/8/contrib/file/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/file/compress.c stable/9/contrib/file/compress.c Directory Properties: stable/10/ (props changed) stable/9/contrib/file/ (props changed) Modified: stable/8/contrib/file/compress.c ============================================================================== --- stable/8/contrib/file/compress.c Wed Dec 25 00:40:42 2013 (r259851) +++ stable/8/contrib/file/compress.c Wed Dec 25 00:48:08 2013 (r259852) @@ -470,7 +470,7 @@ uncompressbuf(struct magic_set *ms, int #endif free(*newch); n = 0; - newch[0] = '\0'; + *newch = NULL; goto err; } else { n = r; From owner-svn-src-stable@FreeBSD.ORG Wed Dec 25 00:48:09 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DFF0C577; Wed, 25 Dec 2013 00:48:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CB0AF1F13; Wed, 25 Dec 2013 00:48:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBP0m96H055361; Wed, 25 Dec 2013 00:48:09 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBP0m9vW055360; Wed, 25 Dec 2013 00:48:09 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312250048.rBP0m9vW055360@svn.freebsd.org> From: Dimitry Andric Date: Wed, 25 Dec 2013 00:48:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259852 - in stable: 10/contrib/file 8/contrib/file 9/contrib/file X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Dec 2013 00:48:10 -0000 Author: dim Date: Wed Dec 25 00:48:08 2013 New Revision: 259852 URL: http://svnweb.freebsd.org/changeset/base/259852 Log: MFC r259724: Apply upstream commit 33312fd828e59c78ae4ee30fd70d0ca109748cf0 (by zoulasc) to contrib/file: don't write a char to a pointer. Modified: stable/10/contrib/file/compress.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/8/contrib/file/compress.c stable/9/contrib/file/compress.c Directory Properties: stable/8/contrib/file/ (props changed) stable/9/contrib/file/ (props changed) Modified: stable/10/contrib/file/compress.c ============================================================================== --- stable/10/contrib/file/compress.c Wed Dec 25 00:40:42 2013 (r259851) +++ stable/10/contrib/file/compress.c Wed Dec 25 00:48:08 2013 (r259852) @@ -480,7 +480,7 @@ uncompressbuf(struct magic_set *ms, int #endif free(*newch); n = 0; - newch[0] = '\0'; + *newch = NULL; goto err; } else { n = r; From owner-svn-src-stable@FreeBSD.ORG Wed Dec 25 00:53:48 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B44BF9A1; Wed, 25 Dec 2013 00:53:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9FCAF1F90; Wed, 25 Dec 2013 00:53:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBP0rmB4058438; Wed, 25 Dec 2013 00:53:48 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBP0rm38058437; Wed, 25 Dec 2013 00:53:48 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312250053.rBP0rm38058437@svn.freebsd.org> From: Dimitry Andric Date: Wed, 25 Dec 2013 00:53:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259853 - stable/10/usr.bin/sort X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Dec 2013 00:53:48 -0000 Author: dim Date: Wed Dec 25 00:53:48 2013 New Revision: 259853 URL: http://svnweb.freebsd.org/changeset/base/259853 Log: MFC r259740: In usr.bin/sort/radixsort.c, pop_ls_mt() is only referenced if SORT_THREADS is defined, so make the whole function conditional, instead of just the pthread calls in it. Modified: stable/10/usr.bin/sort/radixsort.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/sort/radixsort.c ============================================================================== --- stable/10/usr.bin/sort/radixsort.c Wed Dec 25 00:48:08 2013 (r259852) +++ stable/10/usr.bin/sort/radixsort.c Wed Dec 25 00:53:48 2013 (r259853) @@ -171,6 +171,8 @@ pop_ls_st(void) return (sl); } +#if defined(SORT_THREADS) + /* * Pop sort level from the stack (multi-threaded style) */ @@ -180,9 +182,7 @@ pop_ls_mt(void) struct level_stack *saved_ls; struct sort_level *sl; -#if defined(SORT_THREADS) pthread_mutex_lock(&g_ls_mutex); -#endif if (g_ls) { sl = g_ls->sl; @@ -193,15 +193,15 @@ pop_ls_mt(void) saved_ls = NULL; } -#if defined(SORT_THREADS) pthread_mutex_unlock(&g_ls_mutex); -#endif sort_free(saved_ls); return (sl); } +#endif /* defined(SORT_THREADS) */ + static void add_to_sublevel(struct sort_level *sl, struct sort_list_item *item, size_t indx) { From owner-svn-src-stable@FreeBSD.ORG Wed Dec 25 06:09:08 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4793D8DE; Wed, 25 Dec 2013 06:09:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3317214DC; Wed, 25 Dec 2013 06:09:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBP698kZ073670; Wed, 25 Dec 2013 06:09:08 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBP698Wi073669; Wed, 25 Dec 2013 06:09:08 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312250609.rBP698Wi073669@svn.freebsd.org> From: Glen Barber Date: Wed, 25 Dec 2013 06:09:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259861 - stable/10/release X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Dec 2013 06:09:08 -0000 Author: gjb Date: Wed Dec 25 06:09:07 2013 New Revision: 259861 URL: http://svnweb.freebsd.org/changeset/base/259861 Log: MFC r259729: Bootstrap etcupdate(8) as part of the release build, similar to what is done for mergemaster(8). This allows etcupdate(8) to work out-of-box after the first upgrade of a system. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/release/Makefile ============================================================================== --- stable/10/release/Makefile Wed Dec 25 04:51:56 2013 (r259860) +++ stable/10/release/Makefile Wed Dec 25 06:09:07 2013 (r259861) @@ -104,6 +104,8 @@ base.txz: # Set up mergemaster root database sh ${.CURDIR}/scripts/mm-mtree.sh -m ${WORLDDIR} -F \ "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" -D "${.OBJDIR}/${DISTDIR}/base" + etcupdate extract -B -M "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" \ + -d "${.OBJDIR}/${DISTDIR}/base/var/db/etcupdate" # Package all components cd ${WORLDDIR} && ${IMAKE} packageworld DISTDIR=${.OBJDIR}/${DISTDIR} mv ${DISTDIR}/*.txz . From owner-svn-src-stable@FreeBSD.ORG Wed Dec 25 06:09:32 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74AE3A10; Wed, 25 Dec 2013 06:09: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6012214DF; Wed, 25 Dec 2013 06:09:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBP69WMK073759; Wed, 25 Dec 2013 06:09:32 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBP69WoR073758; Wed, 25 Dec 2013 06:09:32 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312250609.rBP69WoR073758@svn.freebsd.org> From: Glen Barber Date: Wed, 25 Dec 2013 06:09:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259862 - stable/9/release X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Dec 2013 06:09:32 -0000 Author: gjb Date: Wed Dec 25 06:09:31 2013 New Revision: 259862 URL: http://svnweb.freebsd.org/changeset/base/259862 Log: MFC r259729: Bootstrap etcupdate(8) as part of the release build, similar to what is done for mergemaster(8). This allows etcupdate(8) to work out-of-box after the first upgrade of a system. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/Makefile Directory Properties: stable/9/release/ (props changed) Modified: stable/9/release/Makefile ============================================================================== --- stable/9/release/Makefile Wed Dec 25 06:09:07 2013 (r259861) +++ stable/9/release/Makefile Wed Dec 25 06:09:31 2013 (r259862) @@ -103,6 +103,8 @@ base.txz: # Set up mergemaster root database sh ${.CURDIR}/scripts/mm-mtree.sh -m ${WORLDDIR} -F \ "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" -D "${.OBJDIR}/${DISTDIR}/base" + etcupdate extract -B -M "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" \ + -d "${.OBJDIR}/${DISTDIR}/base/var/db/etcupdate" # Package all components cd ${WORLDDIR} && ${IMAKE} packageworld DISTDIR=${.OBJDIR}/${DISTDIR} mv ${DISTDIR}/*.txz . From owner-svn-src-stable@FreeBSD.ORG Wed Dec 25 12:41:54 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A6F1651; Wed, 25 Dec 2013 12:41:54 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 063BE1314; Wed, 25 Dec 2013 12:41:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBPCfrfE020052; Wed, 25 Dec 2013 12:41:53 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBPCfrL1020051; Wed, 25 Dec 2013 12:41:53 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201312251241.rBPCfrL1020051@svn.freebsd.org> From: Alexander Motin Date: Wed, 25 Dec 2013 12:41:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259866 - stable/10/sys/dev/ahci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Dec 2013 12:41:54 -0000 Author: mav Date: Wed Dec 25 12:41:53 2013 New Revision: 259866 URL: http://svnweb.freebsd.org/changeset/base/259866 Log: MFC r259222: Destroy mtx lock when failed to allocate memory during attach. Submitted by: Dmitry Luhtionov Modified: stable/10/sys/dev/ahci/ahciem.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ahci/ahciem.c ============================================================================== --- stable/10/sys/dev/ahci/ahciem.c Wed Dec 25 09:43:51 2013 (r259865) +++ stable/10/sys/dev/ahci/ahciem.c Wed Dec 25 12:41:53 2013 (r259866) @@ -85,8 +85,10 @@ ahci_em_attach(device_t dev) mtx_init(&enc->mtx, "AHCI enclosure lock", NULL, MTX_DEF); rid = 0; if (!(enc->r_memc = bus_alloc_resource_any(dev, SYS_RES_MEMORY, - &rid, RF_ACTIVE))) + &rid, RF_ACTIVE))) { + mtx_destroy(&enc->mtx); return (ENXIO); + } enc->capsem = ATA_INL(enc->r_memc, 0); rid = 1; if (!(enc->r_memt = bus_alloc_resource_any(dev, SYS_RES_MEMORY, From owner-svn-src-stable@FreeBSD.ORG Wed Dec 25 15:40:15 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D1A2AF1C; Wed, 25 Dec 2013 15:40: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BCF821E96; Wed, 25 Dec 2013 15:40:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBPFeFQ7085147; Wed, 25 Dec 2013 15:40:15 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBPFeFBd085146; Wed, 25 Dec 2013 15:40:15 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201312251540.rBPFeFBd085146@svn.freebsd.org> From: Sergey Kandaurov Date: Wed, 25 Dec 2013 15:40:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259871 - stable/10/sbin/swapon X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Dec 2013 15:40:15 -0000 Author: pluknet Date: Wed Dec 25 15:40:15 2013 New Revision: 259871 URL: http://svnweb.freebsd.org/changeset/base/259871 Log: MFC r258469: - Purge one more reference to ad(4)[1]. - NSWAPDEV limit has gone. Noticed by: Sergey V. Dyatko [1] Modified: stable/10/sbin/swapon/swapon.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/swapon/swapon.8 ============================================================================== --- stable/10/sbin/swapon/swapon.8 Wed Dec 25 15:23:01 2013 (r259870) +++ stable/10/sbin/swapon/swapon.8 Wed Dec 25 15:40:15 2013 (r259871) @@ -28,7 +28,7 @@ .\" @(#)swapon.8 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd June 21, 2013 +.Dd November 22, 2013 .Dt SWAPON 8 .Os .Sh NAME @@ -60,9 +60,7 @@ At boot time all swap entries in .Pa /etc/fstab are added automatically when the system goes multi-user. Swap devices use a fixed interleave; the maximum number of devices -is specified by the kernel configuration option -.Dv NSWAPDEV , -which is typically set to 4. +is unlimited. There is no priority mechanism. .Pp The @@ -193,8 +191,8 @@ overridden. 512 byte blocks are used by default. .El .Sh FILES -.Bl -tag -width ".Pa /dev/{ad,da}?s?b" -compact -.It Pa /dev/{ad,da}?s?b +.Bl -tag -width ".Pa /dev/{ada,da}?s?b" -compact +.It Pa /dev/{ada,da}?s?b standard paging devices .It Pa /dev/md? memory disk devices From owner-svn-src-stable@FreeBSD.ORG Wed Dec 25 21:59:59 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1AF6272; Wed, 25 Dec 2013 21:59:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8AD23167C; Wed, 25 Dec 2013 21:59:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBPLxxNE027713; Wed, 25 Dec 2013 21:59:59 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBPLxvP4027695; Wed, 25 Dec 2013 21:59:57 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312252159.rBPLxvP4027695@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Wed, 25 Dec 2013 21:59:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259890 - in stable/10/contrib: gcc gcc/doc gcclibs/libcpp gcclibs/libcpp/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Dec 2013 21:59:59 -0000 Author: pfg Date: Wed Dec 25 21:59:56 2013 New Revision: 259890 URL: http://svnweb.freebsd.org/changeset/base/259890 Log: MFC r258826, r259555, r 259558: libcpp: Merge fixes from upstream Fixes: GCC preprocessor/29966: GCC preprocessor/28709: GCC c/31924 GCC preprocessor/14331 gcc: add Apple-compatible -Wnewline-eof Obtained from: gcc per-4.3 (rev. 121340, 124356, 124358, 124730, 125212, 125255 ; GPLv2) Apple Inc. (Apple GCC 4.2 - 5531) Added: stable/10/contrib/gcclibs/libcpp/ChangeLog.apple - copied unchanged from r259555, head/contrib/gcclibs/libcpp/ChangeLog.apple Modified: stable/10/contrib/gcc/c-opts.c stable/10/contrib/gcc/c.opt stable/10/contrib/gcc/doc/invoke.texi stable/10/contrib/gcclibs/libcpp/ChangeLog.gcc43 stable/10/contrib/gcclibs/libcpp/charset.c stable/10/contrib/gcclibs/libcpp/expr.c stable/10/contrib/gcclibs/libcpp/include/cpplib.h stable/10/contrib/gcclibs/libcpp/init.c stable/10/contrib/gcclibs/libcpp/lex.c stable/10/contrib/gcclibs/libcpp/macro.c stable/10/contrib/gcclibs/libcpp/pch.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/gcc/c-opts.c ============================================================================== --- stable/10/contrib/gcc/c-opts.c Wed Dec 25 21:21:29 2013 (r259889) +++ stable/10/contrib/gcc/c-opts.c Wed Dec 25 21:59:56 2013 (r259890) @@ -487,6 +487,12 @@ c_common_handle_option (size_t scode, co cpp_opts->warn_multichar = value; break; + /* APPLE LOCAL begin -Wnewline-eof */ + case OPT_Wnewline_eof: + cpp_opts->warn_newline_at_eof = value; + break; + /* APPLE LOCAL end -Wnewline-eof */ + case OPT_Wnormalized_: if (!value || (arg && strcasecmp (arg, "none") == 0)) cpp_opts->warn_normalize = normalized_none; Modified: stable/10/contrib/gcc/c.opt ============================================================================== --- stable/10/contrib/gcc/c.opt Wed Dec 25 21:21:29 2013 (r259889) +++ stable/10/contrib/gcc/c.opt Wed Dec 25 21:59:56 2013 (r259890) @@ -292,6 +292,12 @@ Wnested-externs C ObjC Var(warn_nested_externs) Warn about \"extern\" declarations not at file scope +; APPLE LOCAL begin -Wnewline-eof +Wnewline-eof +C ObjC C++ ObjC++ +Warn about files missing a newline at the end of the file +; APPLE LOCAL end -Wnewline-eof + Wnon-template-friend C++ ObjC++ Var(warn_nontemplate_friend) Init(1) Warn when non-templatized friend functions are declared within a template Modified: stable/10/contrib/gcc/doc/invoke.texi ============================================================================== --- stable/10/contrib/gcc/doc/invoke.texi Wed Dec 25 21:21:29 2013 (r259889) +++ stable/10/contrib/gcc/doc/invoke.texi Wed Dec 25 21:59:56 2013 (r259890) @@ -169,6 +169,8 @@ in the following sections. -trigraphs -no-integrated-cpp -traditional -traditional-cpp @gol -fallow-single-precision -fcond-mismatch @gol -fsigned-bitfields -fsigned-char @gol +@c APPLE LOCAL -Wnewline-eof 2001-08-23 --sts ** +-Wnewline-eof (Apple compatible) @gol -funsigned-bitfields -funsigned-char} @item C++ Language Options @@ -2041,6 +2043,12 @@ Inhibit all warning messages. @opindex Wno-import Inhibit warning messages about the use of @samp{#import}. +@c APPLE LOCAL begin -Wnewline-eof 2001-08-23 --sts ** +@item -Wnewline-eof +@opindex Wnewline-eof +Warn about files missing a newline at the end of the file. (Apple compatible) +@c APPLE LOCAL end -Wnewline-eof 2001-08-23 --sts ** + @item -Wchar-subscripts @opindex Wchar-subscripts Warn if an array subscript has type @code{char}. This is a common cause Copied: stable/10/contrib/gcclibs/libcpp/ChangeLog.apple (from r259555, head/contrib/gcclibs/libcpp/ChangeLog.apple) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/gcclibs/libcpp/ChangeLog.apple Wed Dec 25 21:59:56 2013 (r259890, copy of r259555, head/contrib/gcclibs/libcpp/ChangeLog.apple) @@ -0,0 +1,9 @@ +2008-08-04 Bill Wendling + + Radar 6121572 + * charset.c (_cpp_convert_input): Don't read to.text[-1]. + +2005-02-17 Devang Patel + + Radar 3958387 + * libcpp/lex.c (_cpp_get_fresh_line): Check warn_newline_at_eof. Modified: stable/10/contrib/gcclibs/libcpp/ChangeLog.gcc43 ============================================================================== --- stable/10/contrib/gcclibs/libcpp/ChangeLog.gcc43 Wed Dec 25 21:21:29 2013 (r259889) +++ stable/10/contrib/gcclibs/libcpp/ChangeLog.gcc43 Wed Dec 25 21:59:56 2013 (r259890) @@ -7,6 +7,11 @@ * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed binary integer constants. +2007-05-31 Dave Korn (r125212) + + PR preprocessor/14331 + * lex.c (_cpp_get_fresh_line): Don't warn if no newline at EOF. + 2007-05-21 Ian Lance Taylor (r124929) * internal.h (struct cpp_reader): Add new fields: @@ -23,6 +28,29 @@ (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and pfile->nonexistent_file_ob. +2007-05-14 Janis Johnson (r124731) + + PR c/31924 + * expr.c (interpret_float_suffix): Check for invalid suffix. + +2007-05-02 Eric Christopher (r124358) + + * expr.c (num_div_op): Don't overflow if the result is + zero. + +2007-05-02 Tom Tromey (r124356) + + PR preprocessor/28709: + * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs. + +2007-01-30 Tom Tromey (r121340) + + PR preprocessor/29966: + * macro.c (lex_expansion_token): Save and restore cpp_reader's + cur_token. + (_cpp_create_definition): Don't restore cur_token here. + * lex.c (_cpp_lex_token): Added assertion. + 2006-12-29 Ian Lance Taylor (r120263) * lex.c (_cpp_clean_line): Add uses of __builtin_expect. Don't Modified: stable/10/contrib/gcclibs/libcpp/charset.c ============================================================================== --- stable/10/contrib/gcclibs/libcpp/charset.c Wed Dec 25 21:21:29 2013 (r259889) +++ stable/10/contrib/gcclibs/libcpp/charset.c Wed Dec 25 21:59:56 2013 (r259890) @@ -1628,6 +1628,7 @@ _cpp_convert_input (cpp_reader *pfile, c terminate with another \r, not an \n, so that we do not mistake the \r\n sequence for a single DOS line ending and erroneously issue the "No newline at end of file" diagnostic. */ + /* APPLE LOCAL don't access to.text[-1] radar 6121572 */ if (to.len > 0 && to.text[to.len - 1] == '\r') to.text[to.len] = '\r'; else Modified: stable/10/contrib/gcclibs/libcpp/expr.c ============================================================================== --- stable/10/contrib/gcclibs/libcpp/expr.c Wed Dec 25 21:21:29 2013 (r259889) +++ stable/10/contrib/gcclibs/libcpp/expr.c Wed Dec 25 21:59:56 2013 (r259890) @@ -87,16 +87,19 @@ interpret_float_suffix (const uchar *s, while (len--) switch (s[len]) { - case 'f': case 'F': f++; break; - case 'l': case 'L': l++; break; - case 'i': case 'I': - case 'j': case 'J': i++; break; - case 'd': case 'D': - /* Disallow fd, ld suffixes. */ - if (d && (f || l)) + case 'f': case 'F': + if (d > 0) + return 0; + f++; + break; + case 'l': case 'L': + if (d > 0) return 0; - d++; + l++; break; + case 'i': case 'I': + case 'j': case 'J': i++; break; + case 'd': case 'D': d++; break; default: return 0; } @@ -494,7 +497,7 @@ append_digit (cpp_num num, int digit, in if (add_low + digit < add_low) add_high++; add_low += digit; - + if (result.low + add_low < result.low) add_high++; if (result.high + add_high < result.high) @@ -1580,7 +1583,8 @@ num_div_op (cpp_reader *pfile, cpp_num l { if (negate) result = num_negate (result, precision); - result.overflow = num_positive (result, precision) ^ !negate; + result.overflow = (num_positive (result, precision) ^ !negate + && !num_zerop (result)); } return result; Modified: stable/10/contrib/gcclibs/libcpp/include/cpplib.h ============================================================================== --- stable/10/contrib/gcclibs/libcpp/include/cpplib.h Wed Dec 25 21:21:29 2013 (r259889) +++ stable/10/contrib/gcclibs/libcpp/include/cpplib.h Wed Dec 25 21:59:56 2013 (r259890) @@ -320,6 +320,11 @@ struct cpp_options /* Nonzero means warn if there are any trigraphs. */ unsigned char warn_trigraphs; + /* APPLE LOCAL begin -Wnewline-eof 2001-08-23 --sts */ + /* Nonzero means warn if no newline at end of file. */ + unsigned char warn_newline_at_eof; + /* APPLE LOCAL end -Wnewline-eof 2001-08-23 --sts */ + /* Nonzero means warn about multicharacter charconsts. */ unsigned char warn_multichar; Modified: stable/10/contrib/gcclibs/libcpp/init.c ============================================================================== --- stable/10/contrib/gcclibs/libcpp/init.c Wed Dec 25 21:21:29 2013 (r259889) +++ stable/10/contrib/gcclibs/libcpp/init.c Wed Dec 25 21:59:56 2013 (r259890) @@ -146,6 +146,10 @@ cpp_create_reader (enum c_lang lang, has pfile = XCNEW (cpp_reader); cpp_set_lang (pfile, lang); + /* APPLE LOCAL begin -Wnewline-eof 2001-08-23 --sts */ + /* Suppress warnings about missing newlines at ends of files. */ + CPP_OPTION (pfile, warn_newline_at_eof) = 0; + /* APPLE LOCAL end -Wnewline-eof 2001-08-23 --sts */ CPP_OPTION (pfile, warn_multichar) = 1; CPP_OPTION (pfile, discard_comments) = 1; CPP_OPTION (pfile, discard_comments_in_macro_exp) = 1; Modified: stable/10/contrib/gcclibs/libcpp/lex.c ============================================================================== --- stable/10/contrib/gcclibs/libcpp/lex.c Wed Dec 25 21:21:29 2013 (r259889) +++ stable/10/contrib/gcclibs/libcpp/lex.c Wed Dec 25 21:59:56 2013 (r259890) @@ -766,6 +766,11 @@ _cpp_lex_token (cpp_reader *pfile) pfile->cur_run = next_tokenrun (pfile->cur_run); pfile->cur_token = pfile->cur_run->base; } + /* We assume that the current token is somewhere in the current + run. */ + if (pfile->cur_token < pfile->cur_run->base + || pfile->cur_token >= pfile->cur_run->limit) + abort (); if (pfile->lookaheads) { @@ -847,11 +852,16 @@ _cpp_get_fresh_line (cpp_reader *pfile) && buffer->next_line > buffer->rlimit && !buffer->from_stage3) { - /* Only warn once. */ + /* Clip to buffer size. */ buffer->next_line = buffer->rlimit; - cpp_error_with_line (pfile, CPP_DL_PEDWARN, pfile->line_table->highest_line, - CPP_BUF_COLUMN (buffer, buffer->cur), - "no newline at end of file"); + /* APPLE LOCAL begin suppress no newline warning. */ + if ( CPP_OPTION (pfile, warn_newline_at_eof)) + { + cpp_error_with_line (pfile, CPP_DL_PEDWARN, pfile->line_table->highest_line, + CPP_BUF_COLUMN (buffer, buffer->cur), + "no newline at end of file"); + } + /* APPLE LOCAL end suppress no newline warning. */ } return_at_eof = buffer->return_at_eof; Modified: stable/10/contrib/gcclibs/libcpp/macro.c ============================================================================== --- stable/10/contrib/gcclibs/libcpp/macro.c Wed Dec 25 21:21:29 2013 (r259889) +++ stable/10/contrib/gcclibs/libcpp/macro.c Wed Dec 25 21:59:56 2013 (r259890) @@ -1,6 +1,7 @@ /* Part of CPP library. (Macro and #define handling.) Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + 1999, 2000, 2001, 2002, 2003, 2004, 2005, + 2006 Free Software Foundation, Inc. Written by Per Bothner, 1994. Based on CCCP program by Paul Rubin, June 1986 Adapted to ANSI C, Richard Stallman, Jan 1987 @@ -438,19 +439,18 @@ static bool paste_tokens (cpp_reader *pfile, const cpp_token **plhs, const cpp_token *rhs) { unsigned char *buf, *end, *lhsend; - const cpp_token *lhs; + cpp_token *lhs; unsigned int len; - lhs = *plhs; - len = cpp_token_len (lhs) + cpp_token_len (rhs) + 1; + len = cpp_token_len (*plhs) + cpp_token_len (rhs) + 1; buf = (unsigned char *) alloca (len); - end = lhsend = cpp_spell_token (pfile, lhs, buf, false); + end = lhsend = cpp_spell_token (pfile, *plhs, buf, false); /* Avoid comment headers, since they are still processed in stage 3. It is simpler to insert a space here, rather than modifying the lexer to ignore comments in some circumstances. Simply returning false doesn't work, since we want to clear the PASTE_LEFT flag. */ - if (lhs->type == CPP_DIV && rhs->type != CPP_EQ) + if ((*plhs)->type == CPP_DIV && rhs->type != CPP_EQ) *end++ = ' '; end = cpp_spell_token (pfile, rhs, end, false); *end = '\n'; @@ -460,13 +460,22 @@ paste_tokens (cpp_reader *pfile, const c /* Set pfile->cur_token as required by _cpp_lex_direct. */ pfile->cur_token = _cpp_temp_token (pfile); - *plhs = _cpp_lex_direct (pfile); + lhs = _cpp_lex_direct (pfile); if (pfile->buffer->cur != pfile->buffer->rlimit) { + source_location saved_loc = lhs->src_loc; + _cpp_pop_buffer (pfile); _cpp_backup_tokens (pfile, 1); *lhsend = '\0'; + /* We have to remove the PASTE_LEFT flag from the old lhs, but + we want to keep the new location. */ + *lhs = **plhs; + *plhs = lhs; + lhs->src_loc = saved_loc; + lhs->flags &= ~PASTE_LEFT; + /* Mandatory error for all apart from assembler. */ if (CPP_OPTION (pfile, lang) != CLK_ASM) cpp_error (pfile, CPP_DL_ERROR, @@ -475,6 +484,7 @@ paste_tokens (cpp_reader *pfile, const c return false; } + *plhs = lhs; _cpp_pop_buffer (pfile); return true; } @@ -1405,10 +1415,12 @@ alloc_expansion_token (cpp_reader *pfile static cpp_token * lex_expansion_token (cpp_reader *pfile, cpp_macro *macro) { - cpp_token *token; + cpp_token *token, *saved_cur_token; + saved_cur_token = pfile->cur_token; pfile->cur_token = alloc_expansion_token (pfile, macro); token = _cpp_lex_direct (pfile); + pfile->cur_token = saved_cur_token; /* Is this a parameter? */ if (token->type == CPP_NAME @@ -1597,18 +1609,12 @@ _cpp_create_definition (cpp_reader *pfil ok = _cpp_create_trad_definition (pfile, macro); else { - cpp_token *saved_cur_token = pfile->cur_token; - ok = create_iso_definition (pfile, macro); - /* Restore lexer position because of games lex_expansion_token() - plays lexing the macro. We set the type for SEEN_EOL() in - directives.c. + /* We set the type for SEEN_EOL() in directives.c. Longer term we should lex the whole line before coming here, and just copy the expansion. */ - saved_cur_token[-1].type = pfile->cur_token[-1].type; - pfile->cur_token = saved_cur_token; /* Stop the lexer accepting __VA_ARGS__. */ pfile->state.va_args_ok = 0; Modified: stable/10/contrib/gcclibs/libcpp/pch.c ============================================================================== --- stable/10/contrib/gcclibs/libcpp/pch.c Wed Dec 25 21:21:29 2013 (r259889) +++ stable/10/contrib/gcclibs/libcpp/pch.c Wed Dec 25 21:59:56 2013 (r259890) @@ -35,14 +35,14 @@ static int write_defs (cpp_reader *, cpp static int save_macros (cpp_reader *, cpp_hashnode *, void *); /* This structure represents a macro definition on disk. */ -struct macrodef_struct +struct macrodef_struct { unsigned int definition_length; unsigned short name_length; unsigned short flags; }; -/* This is how we write out a macro definition. +/* This is how we write out a macro definition. Suitable for being called by cpp_forall_identifiers. */ static int @@ -54,7 +54,7 @@ write_macdef (cpp_reader *pfile, cpp_has case NT_VOID: if (! (hn->flags & NODE_POISONED)) return 1; - + case NT_MACRO: if ((hn->flags & NODE_BUILTIN)) return 1; @@ -76,7 +76,7 @@ write_macdef (cpp_reader *pfile, cpp_has defn = NODE_NAME (hn); s.definition_length = s.name_length; } - + if (fwrite (&s, sizeof (s), 1, f) != 1 || fwrite (defn, 1, s.definition_length, f) != s.definition_length) { @@ -86,7 +86,7 @@ write_macdef (cpp_reader *pfile, cpp_has } } return 1; - + case NT_ASSERTION: /* Not currently implemented. */ return 1; @@ -123,7 +123,7 @@ static int save_idents (cpp_reader *pfile ATTRIBUTE_UNUSED, cpp_hashnode *hn, void *ss_p) { struct cpp_savedstate *const ss = (struct cpp_savedstate *)ss_p; - + if (hn->type != NT_VOID) { struct cpp_string news; @@ -136,7 +136,7 @@ save_idents (cpp_reader *pfile ATTRIBUTE { struct cpp_string *sp; unsigned char *text; - + sp = XNEW (struct cpp_string); *slot = sp; @@ -157,7 +157,7 @@ hashmem (const void *p_p, size_t sz) const unsigned char *p = (const unsigned char *)p_p; size_t i; hashval_t h; - + h = 0; for (i = 0; i < sz; i++) h = h * 67 - (*p++ - 113); @@ -194,10 +194,10 @@ cpp_save_state (cpp_reader *r, FILE *f) { /* Save the list of non-void identifiers for the dependency checking. */ r->savedstate = XNEW (struct cpp_savedstate); - r->savedstate->definedhash = htab_create (100, cpp_string_hash, + r->savedstate->definedhash = htab_create (100, cpp_string_hash, cpp_string_eq, NULL); cpp_forall_identifiers (r, save_idents, r->savedstate); - + /* Write out the list of defined identifiers. */ cpp_forall_identifiers (r, write_macdef, f); @@ -210,20 +210,20 @@ static int count_defs (cpp_reader *pfile ATTRIBUTE_UNUSED, cpp_hashnode *hn, void *ss_p) { struct cpp_savedstate *const ss = (struct cpp_savedstate *)ss_p; - + switch (hn->type) { case NT_MACRO: if (hn->flags & NODE_BUILTIN) return 1; - + /* else fall through. */ case NT_VOID: { struct cpp_string news; void **slot; - + news.len = NODE_LEN (hn); news.text = NODE_NAME (hn); slot = (void **) htab_find (ss->definedhash, &news); @@ -249,20 +249,20 @@ static int write_defs (cpp_reader *pfile ATTRIBUTE_UNUSED, cpp_hashnode *hn, void *ss_p) { struct cpp_savedstate *const ss = (struct cpp_savedstate *)ss_p; - + switch (hn->type) { case NT_MACRO: if (hn->flags & NODE_BUILTIN) return 1; - + /* else fall through. */ case NT_VOID: { struct cpp_string news; void **slot; - + news.len = NODE_LEN (hn); news.text = NODE_NAME (hn); slot = (void **) htab_find (ss->definedhash, &news); @@ -303,7 +303,7 @@ cpp_write_pch_deps (cpp_reader *r, FILE struct cpp_savedstate *const ss = r->savedstate; unsigned char *definedstrs; size_t i; - + /* Collect the list of identifiers which have been seen and weren't defined to anything previously. */ ss->hashsize = 0; @@ -404,7 +404,7 @@ collect_ht_nodes (cpp_reader *pfile ATTR with the preprocessor's current definitions. It will be consistent when: - - anything that was defined just before the PCH was generated + - anything that was defined just before the PCH was generated is defined the same way now; and - anything that was not defined then, but is defined now, was not used by the PCH. @@ -430,10 +430,10 @@ cpp_valid_state (cpp_reader *r, const ch { cpp_hashnode *h; const unsigned char *newdefn; - + if (read (fd, &m, sizeof (m)) != sizeof (m)) goto error; - + if (m.name_length == 0) break; @@ -453,10 +453,10 @@ cpp_valid_state (cpp_reader *r, const ch namebuf = XNEWVEC (unsigned char, namebufsz); } - if ((size_t)read (fd, namebuf, m.definition_length) + if ((size_t)read (fd, namebuf, m.definition_length) != m.definition_length) goto error; - + h = cpp_lookup (r, namebuf, m.name_length); if (m.flags & NODE_POISONED || h->type != NT_MACRO @@ -470,7 +470,7 @@ cpp_valid_state (cpp_reader *r, const ch } newdefn = cpp_macro_definition (r, h); - + if (m.definition_length != ustrlen (newdefn) || memcmp (namebuf, newdefn, m.definition_length) != 0) { @@ -498,17 +498,17 @@ cpp_valid_state (cpp_reader *r, const ch nl.defs = XNEWVEC (cpp_hashnode *, nl.asize); cpp_forall_identifiers (r, &collect_ht_nodes, &nl); qsort (nl.defs, nl.n_defs, sizeof (cpp_hashnode *), &comp_hashnodes); - + /* Loop through nl.defs and undeftab, both of which are sorted lists. There should be no matches. */ first = undeftab; last = undeftab + m.definition_length; i = 0; - + while (first < last && i < nl.n_defs) { int cmp = ustrcmp (first, NODE_NAME (nl.defs[i])); - + if (cmp < 0) first += ustrlen (first) + 1; else if (cmp > 0) @@ -516,13 +516,13 @@ cpp_valid_state (cpp_reader *r, const ch else { if (CPP_OPTION (r, warn_invalid_pch)) - cpp_error (r, CPP_DL_WARNING_SYSHDR, + cpp_error (r, CPP_DL_WARNING_SYSHDR, "%s: not used because `%s' is defined", name, first); goto fail; } } - + free(nl.defs); free (undeftab); @@ -545,7 +545,7 @@ cpp_valid_state (cpp_reader *r, const ch /* Save all the existing macros. */ -struct save_macro_data +struct save_macro_data { uchar **defns; size_t count; @@ -567,7 +567,7 @@ struct save_macro_data file were not saved in this way, but this is not done (yet), except for builtins, and for #assert by default. */ -static int +static int save_macros (cpp_reader *r, cpp_hashnode *h, void *data_p) { struct save_macro_data *data = (struct save_macro_data *)data_p; @@ -577,9 +577,9 @@ save_macros (cpp_reader *r, cpp_hashnode if (data->count == data->array_size) { data->array_size *= 2; - data->defns = XRESIZEVEC (uchar *, data->defns, (data->array_size)); + data->defns = XRESIZEVEC (uchar *, data->defns, (data->array_size)); } - + switch (h->type) { case NT_ASSERTION: @@ -596,7 +596,7 @@ save_macros (cpp_reader *r, cpp_hashnode data->defns[data->count][defnlen] = '\n'; } break; - + default: abort (); } @@ -612,7 +612,7 @@ void cpp_prepare_state (cpp_reader *r, struct save_macro_data **data) { struct save_macro_data *d = XNEW (struct save_macro_data); - + d->array_size = 512; d->defns = XNEWVEC (uchar *, d->array_size); d->count = 0; @@ -622,7 +622,7 @@ cpp_prepare_state (cpp_reader *r, struct } /* Given a precompiled header that was previously determined to be valid, - apply all its definitions (and undefinitions) to the current state. + apply all its definitions (and undefinitions) to the current state. DEPNAME is passed to deps_restore. */ int @@ -632,7 +632,7 @@ cpp_read_state (cpp_reader *r, const cha size_t i; struct lexer_state old_state; - /* Restore spec_nodes, which will be full of references to the old + /* Restore spec_nodes, which will be full of references to the old hashtable entries and so will now be invalid. */ { struct spec_nodes *s = &r->spec_nodes; @@ -691,7 +691,7 @@ cpp_read_state (cpp_reader *r, const cha goto error; return 0; - + error: cpp_errno (r, CPP_DL_ERROR, "while reading precompiled header"); return -1; From owner-svn-src-stable@FreeBSD.ORG Wed Dec 25 22:00:28 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 88DD140E; Wed, 25 Dec 2013 22:00:28 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7255A16D3; Wed, 25 Dec 2013 22:00:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBPM0SWH029883; Wed, 25 Dec 2013 22:00:28 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBPM0QJ2029862; Wed, 25 Dec 2013 22:00:26 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312252200.rBPM0QJ2029862@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Wed, 25 Dec 2013 22:00: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: r259891 - in stable/9/contrib: gcc gcc/doc gcclibs/libcpp gcclibs/libcpp/include X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Dec 2013 22:00:28 -0000 Author: pfg Date: Wed Dec 25 22:00:25 2013 New Revision: 259891 URL: http://svnweb.freebsd.org/changeset/base/259891 Log: MFC r258826, r259555, r 259558: libcpp: Merge fixes from upstream Fixes: GCC preprocessor/29966: GCC preprocessor/28709: GCC c/31924 GCC preprocessor/14331 gcc: add Apple-compatible -Wnewline-eof Obtained from: gcc per-4.3 (rev. 121340, 124356, 124358, 124730, 125212, 125255 ; GPLv2) Apple Inc. (Apple GCC 4.2 - 5531) Added: stable/9/contrib/gcclibs/libcpp/ChangeLog.apple - copied unchanged from r259555, head/contrib/gcclibs/libcpp/ChangeLog.apple Modified: stable/9/contrib/gcc/c-opts.c stable/9/contrib/gcc/c.opt stable/9/contrib/gcc/doc/invoke.texi stable/9/contrib/gcclibs/libcpp/ChangeLog.gcc43 stable/9/contrib/gcclibs/libcpp/charset.c stable/9/contrib/gcclibs/libcpp/expr.c stable/9/contrib/gcclibs/libcpp/include/cpplib.h stable/9/contrib/gcclibs/libcpp/init.c stable/9/contrib/gcclibs/libcpp/lex.c stable/9/contrib/gcclibs/libcpp/macro.c stable/9/contrib/gcclibs/libcpp/pch.c Directory Properties: stable/9/ (props changed) stable/9/contrib/gcc/ (props changed) stable/9/contrib/gcclibs/ (props changed) Modified: stable/9/contrib/gcc/c-opts.c ============================================================================== --- stable/9/contrib/gcc/c-opts.c Wed Dec 25 21:59:56 2013 (r259890) +++ stable/9/contrib/gcc/c-opts.c Wed Dec 25 22:00:25 2013 (r259891) @@ -487,6 +487,12 @@ c_common_handle_option (size_t scode, co cpp_opts->warn_multichar = value; break; + /* APPLE LOCAL begin -Wnewline-eof */ + case OPT_Wnewline_eof: + cpp_opts->warn_newline_at_eof = value; + break; + /* APPLE LOCAL end -Wnewline-eof */ + case OPT_Wnormalized_: if (!value || (arg && strcasecmp (arg, "none") == 0)) cpp_opts->warn_normalize = normalized_none; Modified: stable/9/contrib/gcc/c.opt ============================================================================== --- stable/9/contrib/gcc/c.opt Wed Dec 25 21:59:56 2013 (r259890) +++ stable/9/contrib/gcc/c.opt Wed Dec 25 22:00:25 2013 (r259891) @@ -292,6 +292,12 @@ Wnested-externs C ObjC Var(warn_nested_externs) Warn about \"extern\" declarations not at file scope +; APPLE LOCAL begin -Wnewline-eof +Wnewline-eof +C ObjC C++ ObjC++ +Warn about files missing a newline at the end of the file +; APPLE LOCAL end -Wnewline-eof + Wnon-template-friend C++ ObjC++ Var(warn_nontemplate_friend) Init(1) Warn when non-templatized friend functions are declared within a template Modified: stable/9/contrib/gcc/doc/invoke.texi ============================================================================== --- stable/9/contrib/gcc/doc/invoke.texi Wed Dec 25 21:59:56 2013 (r259890) +++ stable/9/contrib/gcc/doc/invoke.texi Wed Dec 25 22:00:25 2013 (r259891) @@ -169,6 +169,8 @@ in the following sections. -trigraphs -no-integrated-cpp -traditional -traditional-cpp @gol -fallow-single-precision -fcond-mismatch @gol -fsigned-bitfields -fsigned-char @gol +@c APPLE LOCAL -Wnewline-eof 2001-08-23 --sts ** +-Wnewline-eof (Apple compatible) @gol -funsigned-bitfields -funsigned-char} @item C++ Language Options @@ -2041,6 +2043,12 @@ Inhibit all warning messages. @opindex Wno-import Inhibit warning messages about the use of @samp{#import}. +@c APPLE LOCAL begin -Wnewline-eof 2001-08-23 --sts ** +@item -Wnewline-eof +@opindex Wnewline-eof +Warn about files missing a newline at the end of the file. (Apple compatible) +@c APPLE LOCAL end -Wnewline-eof 2001-08-23 --sts ** + @item -Wchar-subscripts @opindex Wchar-subscripts Warn if an array subscript has type @code{char}. This is a common cause Copied: stable/9/contrib/gcclibs/libcpp/ChangeLog.apple (from r259555, head/contrib/gcclibs/libcpp/ChangeLog.apple) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/gcclibs/libcpp/ChangeLog.apple Wed Dec 25 22:00:25 2013 (r259891, copy of r259555, head/contrib/gcclibs/libcpp/ChangeLog.apple) @@ -0,0 +1,9 @@ +2008-08-04 Bill Wendling + + Radar 6121572 + * charset.c (_cpp_convert_input): Don't read to.text[-1]. + +2005-02-17 Devang Patel + + Radar 3958387 + * libcpp/lex.c (_cpp_get_fresh_line): Check warn_newline_at_eof. Modified: stable/9/contrib/gcclibs/libcpp/ChangeLog.gcc43 ============================================================================== --- stable/9/contrib/gcclibs/libcpp/ChangeLog.gcc43 Wed Dec 25 21:59:56 2013 (r259890) +++ stable/9/contrib/gcclibs/libcpp/ChangeLog.gcc43 Wed Dec 25 22:00:25 2013 (r259891) @@ -7,6 +7,11 @@ * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed binary integer constants. +2007-05-31 Dave Korn (r125212) + + PR preprocessor/14331 + * lex.c (_cpp_get_fresh_line): Don't warn if no newline at EOF. + 2007-05-21 Ian Lance Taylor (r124929) * internal.h (struct cpp_reader): Add new fields: @@ -23,6 +28,29 @@ (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and pfile->nonexistent_file_ob. +2007-05-14 Janis Johnson (r124731) + + PR c/31924 + * expr.c (interpret_float_suffix): Check for invalid suffix. + +2007-05-02 Eric Christopher (r124358) + + * expr.c (num_div_op): Don't overflow if the result is + zero. + +2007-05-02 Tom Tromey (r124356) + + PR preprocessor/28709: + * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs. + +2007-01-30 Tom Tromey (r121340) + + PR preprocessor/29966: + * macro.c (lex_expansion_token): Save and restore cpp_reader's + cur_token. + (_cpp_create_definition): Don't restore cur_token here. + * lex.c (_cpp_lex_token): Added assertion. + 2006-12-29 Ian Lance Taylor (r120263) * lex.c (_cpp_clean_line): Add uses of __builtin_expect. Don't Modified: stable/9/contrib/gcclibs/libcpp/charset.c ============================================================================== --- stable/9/contrib/gcclibs/libcpp/charset.c Wed Dec 25 21:59:56 2013 (r259890) +++ stable/9/contrib/gcclibs/libcpp/charset.c Wed Dec 25 22:00:25 2013 (r259891) @@ -1628,6 +1628,7 @@ _cpp_convert_input (cpp_reader *pfile, c terminate with another \r, not an \n, so that we do not mistake the \r\n sequence for a single DOS line ending and erroneously issue the "No newline at end of file" diagnostic. */ + /* APPLE LOCAL don't access to.text[-1] radar 6121572 */ if (to.len > 0 && to.text[to.len - 1] == '\r') to.text[to.len] = '\r'; else Modified: stable/9/contrib/gcclibs/libcpp/expr.c ============================================================================== --- stable/9/contrib/gcclibs/libcpp/expr.c Wed Dec 25 21:59:56 2013 (r259890) +++ stable/9/contrib/gcclibs/libcpp/expr.c Wed Dec 25 22:00:25 2013 (r259891) @@ -87,16 +87,19 @@ interpret_float_suffix (const uchar *s, while (len--) switch (s[len]) { - case 'f': case 'F': f++; break; - case 'l': case 'L': l++; break; - case 'i': case 'I': - case 'j': case 'J': i++; break; - case 'd': case 'D': - /* Disallow fd, ld suffixes. */ - if (d && (f || l)) + case 'f': case 'F': + if (d > 0) + return 0; + f++; + break; + case 'l': case 'L': + if (d > 0) return 0; - d++; + l++; break; + case 'i': case 'I': + case 'j': case 'J': i++; break; + case 'd': case 'D': d++; break; default: return 0; } @@ -494,7 +497,7 @@ append_digit (cpp_num num, int digit, in if (add_low + digit < add_low) add_high++; add_low += digit; - + if (result.low + add_low < result.low) add_high++; if (result.high + add_high < result.high) @@ -1580,7 +1583,8 @@ num_div_op (cpp_reader *pfile, cpp_num l { if (negate) result = num_negate (result, precision); - result.overflow = num_positive (result, precision) ^ !negate; + result.overflow = (num_positive (result, precision) ^ !negate + && !num_zerop (result)); } return result; Modified: stable/9/contrib/gcclibs/libcpp/include/cpplib.h ============================================================================== --- stable/9/contrib/gcclibs/libcpp/include/cpplib.h Wed Dec 25 21:59:56 2013 (r259890) +++ stable/9/contrib/gcclibs/libcpp/include/cpplib.h Wed Dec 25 22:00:25 2013 (r259891) @@ -320,6 +320,11 @@ struct cpp_options /* Nonzero means warn if there are any trigraphs. */ unsigned char warn_trigraphs; + /* APPLE LOCAL begin -Wnewline-eof 2001-08-23 --sts */ + /* Nonzero means warn if no newline at end of file. */ + unsigned char warn_newline_at_eof; + /* APPLE LOCAL end -Wnewline-eof 2001-08-23 --sts */ + /* Nonzero means warn about multicharacter charconsts. */ unsigned char warn_multichar; Modified: stable/9/contrib/gcclibs/libcpp/init.c ============================================================================== --- stable/9/contrib/gcclibs/libcpp/init.c Wed Dec 25 21:59:56 2013 (r259890) +++ stable/9/contrib/gcclibs/libcpp/init.c Wed Dec 25 22:00:25 2013 (r259891) @@ -146,6 +146,10 @@ cpp_create_reader (enum c_lang lang, has pfile = XCNEW (cpp_reader); cpp_set_lang (pfile, lang); + /* APPLE LOCAL begin -Wnewline-eof 2001-08-23 --sts */ + /* Suppress warnings about missing newlines at ends of files. */ + CPP_OPTION (pfile, warn_newline_at_eof) = 0; + /* APPLE LOCAL end -Wnewline-eof 2001-08-23 --sts */ CPP_OPTION (pfile, warn_multichar) = 1; CPP_OPTION (pfile, discard_comments) = 1; CPP_OPTION (pfile, discard_comments_in_macro_exp) = 1; Modified: stable/9/contrib/gcclibs/libcpp/lex.c ============================================================================== --- stable/9/contrib/gcclibs/libcpp/lex.c Wed Dec 25 21:59:56 2013 (r259890) +++ stable/9/contrib/gcclibs/libcpp/lex.c Wed Dec 25 22:00:25 2013 (r259891) @@ -766,6 +766,11 @@ _cpp_lex_token (cpp_reader *pfile) pfile->cur_run = next_tokenrun (pfile->cur_run); pfile->cur_token = pfile->cur_run->base; } + /* We assume that the current token is somewhere in the current + run. */ + if (pfile->cur_token < pfile->cur_run->base + || pfile->cur_token >= pfile->cur_run->limit) + abort (); if (pfile->lookaheads) { @@ -847,11 +852,16 @@ _cpp_get_fresh_line (cpp_reader *pfile) && buffer->next_line > buffer->rlimit && !buffer->from_stage3) { - /* Only warn once. */ + /* Clip to buffer size. */ buffer->next_line = buffer->rlimit; - cpp_error_with_line (pfile, CPP_DL_PEDWARN, pfile->line_table->highest_line, - CPP_BUF_COLUMN (buffer, buffer->cur), - "no newline at end of file"); + /* APPLE LOCAL begin suppress no newline warning. */ + if ( CPP_OPTION (pfile, warn_newline_at_eof)) + { + cpp_error_with_line (pfile, CPP_DL_PEDWARN, pfile->line_table->highest_line, + CPP_BUF_COLUMN (buffer, buffer->cur), + "no newline at end of file"); + } + /* APPLE LOCAL end suppress no newline warning. */ } return_at_eof = buffer->return_at_eof; Modified: stable/9/contrib/gcclibs/libcpp/macro.c ============================================================================== --- stable/9/contrib/gcclibs/libcpp/macro.c Wed Dec 25 21:59:56 2013 (r259890) +++ stable/9/contrib/gcclibs/libcpp/macro.c Wed Dec 25 22:00:25 2013 (r259891) @@ -1,6 +1,7 @@ /* Part of CPP library. (Macro and #define handling.) Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + 1999, 2000, 2001, 2002, 2003, 2004, 2005, + 2006 Free Software Foundation, Inc. Written by Per Bothner, 1994. Based on CCCP program by Paul Rubin, June 1986 Adapted to ANSI C, Richard Stallman, Jan 1987 @@ -438,19 +439,18 @@ static bool paste_tokens (cpp_reader *pfile, const cpp_token **plhs, const cpp_token *rhs) { unsigned char *buf, *end, *lhsend; - const cpp_token *lhs; + cpp_token *lhs; unsigned int len; - lhs = *plhs; - len = cpp_token_len (lhs) + cpp_token_len (rhs) + 1; + len = cpp_token_len (*plhs) + cpp_token_len (rhs) + 1; buf = (unsigned char *) alloca (len); - end = lhsend = cpp_spell_token (pfile, lhs, buf, false); + end = lhsend = cpp_spell_token (pfile, *plhs, buf, false); /* Avoid comment headers, since they are still processed in stage 3. It is simpler to insert a space here, rather than modifying the lexer to ignore comments in some circumstances. Simply returning false doesn't work, since we want to clear the PASTE_LEFT flag. */ - if (lhs->type == CPP_DIV && rhs->type != CPP_EQ) + if ((*plhs)->type == CPP_DIV && rhs->type != CPP_EQ) *end++ = ' '; end = cpp_spell_token (pfile, rhs, end, false); *end = '\n'; @@ -460,13 +460,22 @@ paste_tokens (cpp_reader *pfile, const c /* Set pfile->cur_token as required by _cpp_lex_direct. */ pfile->cur_token = _cpp_temp_token (pfile); - *plhs = _cpp_lex_direct (pfile); + lhs = _cpp_lex_direct (pfile); if (pfile->buffer->cur != pfile->buffer->rlimit) { + source_location saved_loc = lhs->src_loc; + _cpp_pop_buffer (pfile); _cpp_backup_tokens (pfile, 1); *lhsend = '\0'; + /* We have to remove the PASTE_LEFT flag from the old lhs, but + we want to keep the new location. */ + *lhs = **plhs; + *plhs = lhs; + lhs->src_loc = saved_loc; + lhs->flags &= ~PASTE_LEFT; + /* Mandatory error for all apart from assembler. */ if (CPP_OPTION (pfile, lang) != CLK_ASM) cpp_error (pfile, CPP_DL_ERROR, @@ -475,6 +484,7 @@ paste_tokens (cpp_reader *pfile, const c return false; } + *plhs = lhs; _cpp_pop_buffer (pfile); return true; } @@ -1405,10 +1415,12 @@ alloc_expansion_token (cpp_reader *pfile static cpp_token * lex_expansion_token (cpp_reader *pfile, cpp_macro *macro) { - cpp_token *token; + cpp_token *token, *saved_cur_token; + saved_cur_token = pfile->cur_token; pfile->cur_token = alloc_expansion_token (pfile, macro); token = _cpp_lex_direct (pfile); + pfile->cur_token = saved_cur_token; /* Is this a parameter? */ if (token->type == CPP_NAME @@ -1597,18 +1609,12 @@ _cpp_create_definition (cpp_reader *pfil ok = _cpp_create_trad_definition (pfile, macro); else { - cpp_token *saved_cur_token = pfile->cur_token; - ok = create_iso_definition (pfile, macro); - /* Restore lexer position because of games lex_expansion_token() - plays lexing the macro. We set the type for SEEN_EOL() in - directives.c. + /* We set the type for SEEN_EOL() in directives.c. Longer term we should lex the whole line before coming here, and just copy the expansion. */ - saved_cur_token[-1].type = pfile->cur_token[-1].type; - pfile->cur_token = saved_cur_token; /* Stop the lexer accepting __VA_ARGS__. */ pfile->state.va_args_ok = 0; Modified: stable/9/contrib/gcclibs/libcpp/pch.c ============================================================================== --- stable/9/contrib/gcclibs/libcpp/pch.c Wed Dec 25 21:59:56 2013 (r259890) +++ stable/9/contrib/gcclibs/libcpp/pch.c Wed Dec 25 22:00:25 2013 (r259891) @@ -35,14 +35,14 @@ static int write_defs (cpp_reader *, cpp static int save_macros (cpp_reader *, cpp_hashnode *, void *); /* This structure represents a macro definition on disk. */ -struct macrodef_struct +struct macrodef_struct { unsigned int definition_length; unsigned short name_length; unsigned short flags; }; -/* This is how we write out a macro definition. +/* This is how we write out a macro definition. Suitable for being called by cpp_forall_identifiers. */ static int @@ -54,7 +54,7 @@ write_macdef (cpp_reader *pfile, cpp_has case NT_VOID: if (! (hn->flags & NODE_POISONED)) return 1; - + case NT_MACRO: if ((hn->flags & NODE_BUILTIN)) return 1; @@ -76,7 +76,7 @@ write_macdef (cpp_reader *pfile, cpp_has defn = NODE_NAME (hn); s.definition_length = s.name_length; } - + if (fwrite (&s, sizeof (s), 1, f) != 1 || fwrite (defn, 1, s.definition_length, f) != s.definition_length) { @@ -86,7 +86,7 @@ write_macdef (cpp_reader *pfile, cpp_has } } return 1; - + case NT_ASSERTION: /* Not currently implemented. */ return 1; @@ -123,7 +123,7 @@ static int save_idents (cpp_reader *pfile ATTRIBUTE_UNUSED, cpp_hashnode *hn, void *ss_p) { struct cpp_savedstate *const ss = (struct cpp_savedstate *)ss_p; - + if (hn->type != NT_VOID) { struct cpp_string news; @@ -136,7 +136,7 @@ save_idents (cpp_reader *pfile ATTRIBUTE { struct cpp_string *sp; unsigned char *text; - + sp = XNEW (struct cpp_string); *slot = sp; @@ -157,7 +157,7 @@ hashmem (const void *p_p, size_t sz) const unsigned char *p = (const unsigned char *)p_p; size_t i; hashval_t h; - + h = 0; for (i = 0; i < sz; i++) h = h * 67 - (*p++ - 113); @@ -194,10 +194,10 @@ cpp_save_state (cpp_reader *r, FILE *f) { /* Save the list of non-void identifiers for the dependency checking. */ r->savedstate = XNEW (struct cpp_savedstate); - r->savedstate->definedhash = htab_create (100, cpp_string_hash, + r->savedstate->definedhash = htab_create (100, cpp_string_hash, cpp_string_eq, NULL); cpp_forall_identifiers (r, save_idents, r->savedstate); - + /* Write out the list of defined identifiers. */ cpp_forall_identifiers (r, write_macdef, f); @@ -210,20 +210,20 @@ static int count_defs (cpp_reader *pfile ATTRIBUTE_UNUSED, cpp_hashnode *hn, void *ss_p) { struct cpp_savedstate *const ss = (struct cpp_savedstate *)ss_p; - + switch (hn->type) { case NT_MACRO: if (hn->flags & NODE_BUILTIN) return 1; - + /* else fall through. */ case NT_VOID: { struct cpp_string news; void **slot; - + news.len = NODE_LEN (hn); news.text = NODE_NAME (hn); slot = (void **) htab_find (ss->definedhash, &news); @@ -249,20 +249,20 @@ static int write_defs (cpp_reader *pfile ATTRIBUTE_UNUSED, cpp_hashnode *hn, void *ss_p) { struct cpp_savedstate *const ss = (struct cpp_savedstate *)ss_p; - + switch (hn->type) { case NT_MACRO: if (hn->flags & NODE_BUILTIN) return 1; - + /* else fall through. */ case NT_VOID: { struct cpp_string news; void **slot; - + news.len = NODE_LEN (hn); news.text = NODE_NAME (hn); slot = (void **) htab_find (ss->definedhash, &news); @@ -303,7 +303,7 @@ cpp_write_pch_deps (cpp_reader *r, FILE struct cpp_savedstate *const ss = r->savedstate; unsigned char *definedstrs; size_t i; - + /* Collect the list of identifiers which have been seen and weren't defined to anything previously. */ ss->hashsize = 0; @@ -404,7 +404,7 @@ collect_ht_nodes (cpp_reader *pfile ATTR with the preprocessor's current definitions. It will be consistent when: - - anything that was defined just before the PCH was generated + - anything that was defined just before the PCH was generated is defined the same way now; and - anything that was not defined then, but is defined now, was not used by the PCH. @@ -430,10 +430,10 @@ cpp_valid_state (cpp_reader *r, const ch { cpp_hashnode *h; const unsigned char *newdefn; - + if (read (fd, &m, sizeof (m)) != sizeof (m)) goto error; - + if (m.name_length == 0) break; @@ -453,10 +453,10 @@ cpp_valid_state (cpp_reader *r, const ch namebuf = XNEWVEC (unsigned char, namebufsz); } - if ((size_t)read (fd, namebuf, m.definition_length) + if ((size_t)read (fd, namebuf, m.definition_length) != m.definition_length) goto error; - + h = cpp_lookup (r, namebuf, m.name_length); if (m.flags & NODE_POISONED || h->type != NT_MACRO @@ -470,7 +470,7 @@ cpp_valid_state (cpp_reader *r, const ch } newdefn = cpp_macro_definition (r, h); - + if (m.definition_length != ustrlen (newdefn) || memcmp (namebuf, newdefn, m.definition_length) != 0) { @@ -498,17 +498,17 @@ cpp_valid_state (cpp_reader *r, const ch nl.defs = XNEWVEC (cpp_hashnode *, nl.asize); cpp_forall_identifiers (r, &collect_ht_nodes, &nl); qsort (nl.defs, nl.n_defs, sizeof (cpp_hashnode *), &comp_hashnodes); - + /* Loop through nl.defs and undeftab, both of which are sorted lists. There should be no matches. */ first = undeftab; last = undeftab + m.definition_length; i = 0; - + while (first < last && i < nl.n_defs) { int cmp = ustrcmp (first, NODE_NAME (nl.defs[i])); - + if (cmp < 0) first += ustrlen (first) + 1; else if (cmp > 0) @@ -516,13 +516,13 @@ cpp_valid_state (cpp_reader *r, const ch else { if (CPP_OPTION (r, warn_invalid_pch)) - cpp_error (r, CPP_DL_WARNING_SYSHDR, + cpp_error (r, CPP_DL_WARNING_SYSHDR, "%s: not used because `%s' is defined", name, first); goto fail; } } - + free(nl.defs); free (undeftab); @@ -545,7 +545,7 @@ cpp_valid_state (cpp_reader *r, const ch /* Save all the existing macros. */ -struct save_macro_data +struct save_macro_data { uchar **defns; size_t count; @@ -567,7 +567,7 @@ struct save_macro_data file were not saved in this way, but this is not done (yet), except for builtins, and for #assert by default. */ -static int +static int save_macros (cpp_reader *r, cpp_hashnode *h, void *data_p) { struct save_macro_data *data = (struct save_macro_data *)data_p; @@ -577,9 +577,9 @@ save_macros (cpp_reader *r, cpp_hashnode if (data->count == data->array_size) { data->array_size *= 2; - data->defns = XRESIZEVEC (uchar *, data->defns, (data->array_size)); + data->defns = XRESIZEVEC (uchar *, data->defns, (data->array_size)); } - + switch (h->type) { case NT_ASSERTION: @@ -596,7 +596,7 @@ save_macros (cpp_reader *r, cpp_hashnode data->defns[data->count][defnlen] = '\n'; } break; - + default: abort (); } @@ -612,7 +612,7 @@ void cpp_prepare_state (cpp_reader *r, struct save_macro_data **data) { struct save_macro_data *d = XNEW (struct save_macro_data); - + d->array_size = 512; d->defns = XNEWVEC (uchar *, d->array_size); d->count = 0; @@ -622,7 +622,7 @@ cpp_prepare_state (cpp_reader *r, struct } /* Given a precompiled header that was previously determined to be valid, - apply all its definitions (and undefinitions) to the current state. + apply all its definitions (and undefinitions) to the current state. DEPNAME is passed to deps_restore. */ int @@ -632,7 +632,7 @@ cpp_read_state (cpp_reader *r, const cha size_t i; struct lexer_state old_state; - /* Restore spec_nodes, which will be full of references to the old + /* Restore spec_nodes, which will be full of references to the old hashtable entries and so will now be invalid. */ { struct spec_nodes *s = &r->spec_nodes; @@ -691,7 +691,7 @@ cpp_read_state (cpp_reader *r, const cha goto error; return 0; - + error: cpp_errno (r, CPP_DL_ERROR, "while reading precompiled header"); return -1; From owner-svn-src-stable@FreeBSD.ORG Wed Dec 25 22:32:54 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 92FD3C1A; Wed, 25 Dec 2013 22:32:54 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 72AF41898; Wed, 25 Dec 2013 22:32:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBPMWsF5042445; Wed, 25 Dec 2013 22:32:54 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBPMWrRU042439; Wed, 25 Dec 2013 22:32:53 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201312252232.rBPMWrRU042439@svn.freebsd.org> From: Mark Johnston Date: Wed, 25 Dec 2013 22:32:53 +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: r259894 - stable/9/lib/libproc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Dec 2013 22:32:54 -0000 Author: markj Date: Wed Dec 25 22:32:52 2013 New Revision: 259894 URL: http://svnweb.freebsd.org/changeset/base/259894 Log: MFC r256661 r257222 r257235 r257248 r257298. MFC r256661: Fix the libproc build when DEBUG is defined. MFC r257222: Clean up the debug printing in libproc a bit. In particular: * Don't print any error messages to stderr unless DEBUG is defined. * Add a DPRINTFX macro for use when errno isn't set. * Print the error string from libelf when appropriate. MFC r257235: Remove an incorrect debug printf. MFC r257248: Fix the build with gcc. MFC r257298: Revert r257248 and fix the problem in a way that doesn't violate style(9). Modified: stable/9/lib/libproc/_libproc.h stable/9/lib/libproc/proc_bkpt.c stable/9/lib/libproc/proc_create.c stable/9/lib/libproc/proc_regs.c stable/9/lib/libproc/proc_sym.c stable/9/lib/libproc/proc_util.c Directory Properties: stable/9/lib/libproc/ (props changed) Modified: stable/9/lib/libproc/_libproc.h ============================================================================== --- stable/9/lib/libproc/_libproc.h Wed Dec 25 22:32:34 2013 (r259893) +++ stable/9/lib/libproc/_libproc.h Wed Dec 25 22:32:52 2013 (r259894) @@ -49,7 +49,9 @@ struct proc_handle { }; #ifdef DEBUG -#define DPRINTF(fmt, ...) warn(fmt, __VA_ARGS__) +#define DPRINTF(...) warn(__VA_ARGS__) +#define DPRINTFX(...) warnx(__VA_ARGS__) #else -#define DPRINTF(fmt, ...) +#define DPRINTF(...) do { } while (0) +#define DPRINTFX(...) do { } while (0) #endif Modified: stable/9/lib/libproc/proc_bkpt.c ============================================================================== --- stable/9/lib/libproc/proc_bkpt.c Wed Dec 25 22:32:34 2013 (r259893) +++ stable/9/lib/libproc/proc_bkpt.c Wed Dec 25 22:32:52 2013 (r259894) @@ -72,8 +72,8 @@ proc_bkptset(struct proc_handle *phdl, u piod.piod_addr = &paddr; piod.piod_len = BREAKPOINT_INSTR_SZ; if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) { - DPRINTF("ERROR: couldn't read instruction at address 0x%" PRIuPTR, - address); + DPRINTF("ERROR: couldn't read instruction at address 0x%" + PRIuPTR, address); return (-1); } *saved = paddr; @@ -87,8 +87,8 @@ proc_bkptset(struct proc_handle *phdl, u piod.piod_addr = &paddr; piod.piod_len = BREAKPOINT_INSTR_SZ; if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) { - warn("ERROR: couldn't write instruction at address 0x%" PRIuPTR, - address); + DPRINTF("ERROR: couldn't write instruction at address 0x%" + PRIuPTR, address); return (-1); } @@ -107,7 +107,7 @@ proc_bkptdel(struct proc_handle *phdl, u errno = ENOENT; return (-1); } - DPRINTF("removing breakpoint at 0x%lx\n", address); + DPRINTFX("removing breakpoint at 0x%lx\n", address); /* * Overwrite the breakpoint instruction that we setup previously. */ @@ -118,8 +118,8 @@ proc_bkptdel(struct proc_handle *phdl, u piod.piod_addr = &paddr; piod.piod_len = BREAKPOINT_INSTR_SZ; if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) { - DPRINTF("ERROR: couldn't write instruction at address 0x%" PRIuPTR, - address); + DPRINTF("ERROR: couldn't write instruction at address 0x%" + PRIuPTR, address); return (-1); } @@ -147,12 +147,12 @@ proc_bkptexec(struct proc_handle *phdl, int status; if (proc_regget(phdl, REG_PC, &pc) < 0) { - warn("ERROR: couldn't get PC register"); + DPRINTFX("ERROR: couldn't get PC register"); return (-1); } proc_bkptregadj(&pc); if (proc_bkptdel(phdl, pc, saved) < 0) { - warn("ERROR: couldn't delete breakpoint"); + DPRINTFX("ERROR: couldn't delete breakpoint"); return (-1); } /* @@ -161,13 +161,13 @@ proc_bkptexec(struct proc_handle *phdl, */ proc_regset(phdl, REG_PC, pc); if (ptrace(PT_STEP, proc_getpid(phdl), (caddr_t)1, 0) < 0) { - warn("ERROR: ptrace step failed"); + DPRINTFX("ERROR: ptrace step failed"); return (-1); } proc_wstatus(phdl); status = proc_getwstat(phdl); if (!WIFSTOPPED(status)) { - warn("ERROR: don't know why process stopped"); + DPRINTFX("ERROR: don't know why process stopped"); return (-1); } /* @@ -175,7 +175,7 @@ proc_bkptexec(struct proc_handle *phdl, * the same as the one that we were passed in. */ if (proc_bkptset(phdl, pc, &samesaved) < 0) { - warn("ERROR: couldn't restore breakpoint"); + DPRINTFX("ERROR: couldn't restore breakpoint"); return (-1); } assert(samesaved == saved); Modified: stable/9/lib/libproc/proc_create.c ============================================================================== --- stable/9/lib/libproc/proc_create.c Wed Dec 25 22:32:34 2013 (r259893) +++ stable/9/lib/libproc/proc_create.c Wed Dec 25 22:32:52 2013 (r259894) @@ -75,7 +75,7 @@ proc_attach(pid_t pid, int flags, struct /* Check for an unexpected status. */ if (WIFSTOPPED(status) == 0) - DPRINTF("ERROR: child process %d status 0x%x", pid, status); + DPRINTFX("ERROR: child process %d status 0x%x", pid, status); else phdl->status = PS_STOP; @@ -130,14 +130,14 @@ proc_create(const char *file, char * con /* Wait for the child process to stop. */ if (waitpid(pid, &status, WUNTRACED) == -1) { error = errno; - DPRINTF("ERROR: child process %d didn't stop as expected", pid); + DPRINTF("ERROR: child process %d didn't stop as expected", pid); goto bad; } /* Check for an unexpected status. */ if (WIFSTOPPED(status) == 0) { error = errno; - DPRINTF("ERROR: child process %d status 0x%x", pid, status); + DPRINTFX("ERROR: child process %d status 0x%x", pid, status); goto bad; } else phdl->status = PS_STOP; Modified: stable/9/lib/libproc/proc_regs.c ============================================================================== --- stable/9/lib/libproc/proc_regs.c Wed Dec 25 22:32:34 2013 (r259893) +++ stable/9/lib/libproc/proc_regs.c Wed Dec 25 22:32:52 2013 (r259894) @@ -68,7 +68,7 @@ proc_regget(struct proc_handle *phdl, pr #endif break; default: - warn("ERROR: no support for reg number %d", reg); + DPRINTFX("ERROR: no support for reg number %d", reg); return (-1); } @@ -103,7 +103,7 @@ proc_regset(struct proc_handle *phdl, pr #endif break; default: - warn("ERROR: no support for reg number %d", reg); + DPRINTFX("ERROR: no support for reg number %d", reg); return (-1); } if (ptrace(PT_SETREGS, proc_getpid(phdl), (caddr_t)®s, 0) < 0) Modified: stable/9/lib/libproc/proc_sym.c ============================================================================== --- stable/9/lib/libproc/proc_sym.c Wed Dec 25 22:32:34 2013 (r259893) +++ stable/9/lib/libproc/proc_sym.c Wed Dec 25 22:32:52 2013 (r259894) @@ -216,16 +216,16 @@ proc_addr2sym(struct proc_handle *p, uin if ((map = proc_addr2map(p, addr)) == NULL) return (-1); - if (!map->pr_mapname || (fd = open(map->pr_mapname, O_RDONLY, 0)) < 0) { - warn("ERROR: open %s failed", map->pr_mapname); + if ((fd = open(map->pr_mapname, O_RDONLY, 0)) < 0) { + DPRINTF("ERROR: open %s failed", map->pr_mapname); goto err0; } if ((e = elf_begin(fd, ELF_C_READ, NULL)) == NULL) { - warn("ERROR: elf_begin() failed"); + DPRINTFX("ERROR: elf_begin() failed: %s", elf_errmsg(-1)); goto err1; } if (gelf_getehdr(e, &ehdr) == NULL) { - warn("ERROR: gelf_getehdr() failed"); + DPRINTFX("ERROR: gelf_getehdr() failed: %s", elf_errmsg(-1)); goto err2; } /* @@ -253,7 +253,7 @@ proc_addr2sym(struct proc_handle *p, uin * Then look up the string name in STRTAB (.dynstr) */ if ((data = elf_getdata(dynsymscn, NULL)) == NULL) { - DPRINTF("ERROR: elf_getdata() failed"); + DPRINTFX("ERROR: elf_getdata() failed: %s", elf_errmsg(-1)); goto err2; } i = 0; @@ -286,7 +286,7 @@ proc_addr2sym(struct proc_handle *p, uin if (symtabscn == NULL) goto err2; if ((data = elf_getdata(symtabscn, NULL)) == NULL) { - DPRINTF("ERROR: elf_getdata() failed"); + DPRINTFX("ERROR: elf_getdata() failed: %s", elf_errmsg(-1)); goto err2; } i = 0; @@ -391,7 +391,7 @@ proc_name2sym(struct proc_handle *p, con unsigned long symtabstridx = 0, dynsymstridx = 0; if ((map = proc_name2map(p, object)) == NULL) { - DPRINTF("ERROR: couldn't find object %s", object); + DPRINTFX("ERROR: couldn't find object %s", object); goto err0; } if ((fd = open(map->pr_mapname, O_RDONLY, 0)) < 0) { @@ -399,11 +399,11 @@ proc_name2sym(struct proc_handle *p, con goto err0; } if ((e = elf_begin(fd, ELF_C_READ, NULL)) == NULL) { - warn("ERROR: elf_begin() failed"); + DPRINTFX("ERROR: elf_begin() failed: %s", elf_errmsg(-1)); goto err1; } if (gelf_getehdr(e, &ehdr) == NULL) { - warn("ERROR: gelf_getehdr() failed"); + DPRINTFX("ERROR: gelf_getehdr() failed: %s", elf_errmsg(-1)); goto err2; } /* @@ -431,7 +431,6 @@ proc_name2sym(struct proc_handle *p, con * Then look up the string name in STRTAB (.dynstr) */ if ((data = elf_getdata(dynsymscn, NULL)) == NULL) { - DPRINTF("ERROR: elf_getdata() failed"); goto err2; } i = 0; @@ -493,11 +492,11 @@ proc_iter_symbyaddr(struct proc_handle * if ((map = proc_name2map(p, object)) == NULL) return (-1); if ((fd = open(map->pr_mapname, O_RDONLY)) < 0) { - warn("ERROR: open %s failed", map->pr_mapname); + DPRINTF("ERROR: open %s failed", map->pr_mapname); goto err0; } if ((e = elf_begin(fd, ELF_C_READ, NULL)) == NULL) { - warn("ERROR: elf_begin() failed"); + DPRINTFX("ERROR: elf_begin() failed: %s", elf_errmsg(-1)); goto err1; } /* @@ -520,7 +519,7 @@ proc_iter_symbyaddr(struct proc_handle * return (-1); stridx = shdr.sh_link; if ((data = elf_getdata(foundscn, NULL)) == NULL) { - DPRINTF("ERROR: elf_getdata() failed"); + DPRINTFX("ERROR: elf_getdata() failed: %s", elf_errmsg(-1)); goto err2; } i = 0; Modified: stable/9/lib/libproc/proc_util.c ============================================================================== --- stable/9/lib/libproc/proc_util.c Wed Dec 25 22:32:34 2013 (r259893) +++ stable/9/lib/libproc/proc_util.c Wed Dec 25 22:32:52 2013 (r259894) @@ -146,7 +146,7 @@ proc_wstatus(struct proc_handle *phdl) return (-1); if (waitpid(phdl->pid, &status, WUNTRACED) < 0) { if (errno != EINTR) - warn("waitpid"); + DPRINTF("waitpid"); return (-1); } if (WIFSTOPPED(status)) From owner-svn-src-stable@FreeBSD.ORG Wed Dec 25 22:36:29 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 50D82D94; Wed, 25 Dec 2013 22:36: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 30ABE18BA; Wed, 25 Dec 2013 22:36:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBPMaTip042944; Wed, 25 Dec 2013 22:36:29 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBPMaRKE042938; Wed, 25 Dec 2013 22:36:27 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201312252236.rBPMaRKE042938@svn.freebsd.org> From: Mark Johnston Date: Wed, 25 Dec 2013 22:36:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259895 - stable/10/lib/libproc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Dec 2013 22:36:29 -0000 Author: markj Date: Wed Dec 25 22:36:27 2013 New Revision: 259895 URL: http://svnweb.freebsd.org/changeset/base/259895 Log: MFC r256661 r257222 r257235 r257248 r257298. MFC r256661: Fix the libproc build when DEBUG is defined. MFC r257222: Clean up the debug printing in libproc a bit. In particular: * Don't print any error messages to stderr unless DEBUG is defined. * Add a DPRINTFX macro for use when errno isn't set. * Print the error string from libelf when appropriate. MFC r257235: Remove an incorrect debug printf. MFC r257248: Fix the build with gcc. MFC r257298: Revert r257248 and fix the problem in a way that doesn't violate style(9). Modified: stable/10/lib/libproc/_libproc.h stable/10/lib/libproc/proc_bkpt.c stable/10/lib/libproc/proc_create.c stable/10/lib/libproc/proc_regs.c stable/10/lib/libproc/proc_sym.c stable/10/lib/libproc/proc_util.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libproc/_libproc.h ============================================================================== --- stable/10/lib/libproc/_libproc.h Wed Dec 25 22:32:52 2013 (r259894) +++ stable/10/lib/libproc/_libproc.h Wed Dec 25 22:36:27 2013 (r259895) @@ -49,7 +49,9 @@ struct proc_handle { }; #ifdef DEBUG -#define DPRINTF(fmt, ...) warn(fmt, __VA_ARGS__) +#define DPRINTF(...) warn(__VA_ARGS__) +#define DPRINTFX(...) warnx(__VA_ARGS__) #else -#define DPRINTF(fmt, ...) +#define DPRINTF(...) do { } while (0) +#define DPRINTFX(...) do { } while (0) #endif Modified: stable/10/lib/libproc/proc_bkpt.c ============================================================================== --- stable/10/lib/libproc/proc_bkpt.c Wed Dec 25 22:32:52 2013 (r259894) +++ stable/10/lib/libproc/proc_bkpt.c Wed Dec 25 22:36:27 2013 (r259895) @@ -78,8 +78,8 @@ proc_bkptset(struct proc_handle *phdl, u piod.piod_addr = &paddr; piod.piod_len = BREAKPOINT_INSTR_SZ; if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) { - DPRINTF("ERROR: couldn't read instruction at address 0x%" PRIuPTR, - address); + DPRINTF("ERROR: couldn't read instruction at address 0x%" + PRIuPTR, address); return (-1); } *saved = paddr; @@ -93,8 +93,8 @@ proc_bkptset(struct proc_handle *phdl, u piod.piod_addr = &paddr; piod.piod_len = BREAKPOINT_INSTR_SZ; if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) { - warn("ERROR: couldn't write instruction at address 0x%" PRIuPTR, - address); + DPRINTF("ERROR: couldn't write instruction at address 0x%" + PRIuPTR, address); return (-1); } @@ -113,7 +113,7 @@ proc_bkptdel(struct proc_handle *phdl, u errno = ENOENT; return (-1); } - DPRINTF("removing breakpoint at 0x%lx\n", address); + DPRINTFX("removing breakpoint at 0x%lx\n", address); /* * Overwrite the breakpoint instruction that we setup previously. */ @@ -124,8 +124,8 @@ proc_bkptdel(struct proc_handle *phdl, u piod.piod_addr = &paddr; piod.piod_len = BREAKPOINT_INSTR_SZ; if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) { - DPRINTF("ERROR: couldn't write instruction at address 0x%" PRIuPTR, - address); + DPRINTF("ERROR: couldn't write instruction at address 0x%" + PRIuPTR, address); return (-1); } @@ -153,12 +153,12 @@ proc_bkptexec(struct proc_handle *phdl, int status; if (proc_regget(phdl, REG_PC, &pc) < 0) { - warn("ERROR: couldn't get PC register"); + DPRINTFX("ERROR: couldn't get PC register"); return (-1); } proc_bkptregadj(&pc); if (proc_bkptdel(phdl, pc, saved) < 0) { - warn("ERROR: couldn't delete breakpoint"); + DPRINTFX("ERROR: couldn't delete breakpoint"); return (-1); } /* @@ -167,13 +167,13 @@ proc_bkptexec(struct proc_handle *phdl, */ proc_regset(phdl, REG_PC, pc); if (ptrace(PT_STEP, proc_getpid(phdl), (caddr_t)1, 0) < 0) { - warn("ERROR: ptrace step failed"); + DPRINTFX("ERROR: ptrace step failed"); return (-1); } proc_wstatus(phdl); status = proc_getwstat(phdl); if (!WIFSTOPPED(status)) { - warn("ERROR: don't know why process stopped"); + DPRINTFX("ERROR: don't know why process stopped"); return (-1); } /* @@ -181,7 +181,7 @@ proc_bkptexec(struct proc_handle *phdl, * the same as the one that we were passed in. */ if (proc_bkptset(phdl, pc, &samesaved) < 0) { - warn("ERROR: couldn't restore breakpoint"); + DPRINTFX("ERROR: couldn't restore breakpoint"); return (-1); } assert(samesaved == saved); Modified: stable/10/lib/libproc/proc_create.c ============================================================================== --- stable/10/lib/libproc/proc_create.c Wed Dec 25 22:32:52 2013 (r259894) +++ stable/10/lib/libproc/proc_create.c Wed Dec 25 22:36:27 2013 (r259895) @@ -75,7 +75,7 @@ proc_attach(pid_t pid, int flags, struct /* Check for an unexpected status. */ if (WIFSTOPPED(status) == 0) - DPRINTF("ERROR: child process %d status 0x%x", pid, status); + DPRINTFX("ERROR: child process %d status 0x%x", pid, status); else phdl->status = PS_STOP; @@ -130,14 +130,14 @@ proc_create(const char *file, char * con /* Wait for the child process to stop. */ if (waitpid(pid, &status, WUNTRACED) == -1) { error = errno; - DPRINTF("ERROR: child process %d didn't stop as expected", pid); + DPRINTF("ERROR: child process %d didn't stop as expected", pid); goto bad; } /* Check for an unexpected status. */ if (WIFSTOPPED(status) == 0) { error = errno; - DPRINTF("ERROR: child process %d status 0x%x", pid, status); + DPRINTFX("ERROR: child process %d status 0x%x", pid, status); goto bad; } else phdl->status = PS_STOP; Modified: stable/10/lib/libproc/proc_regs.c ============================================================================== --- stable/10/lib/libproc/proc_regs.c Wed Dec 25 22:32:52 2013 (r259894) +++ stable/10/lib/libproc/proc_regs.c Wed Dec 25 22:36:27 2013 (r259895) @@ -76,7 +76,7 @@ proc_regget(struct proc_handle *phdl, pr #endif break; default: - warn("ERROR: no support for reg number %d", reg); + DPRINTFX("ERROR: no support for reg number %d", reg); return (-1); } @@ -119,7 +119,7 @@ proc_regset(struct proc_handle *phdl, pr #endif break; default: - warn("ERROR: no support for reg number %d", reg); + DPRINTFX("ERROR: no support for reg number %d", reg); return (-1); } if (ptrace(PT_SETREGS, proc_getpid(phdl), (caddr_t)®s, 0) < 0) Modified: stable/10/lib/libproc/proc_sym.c ============================================================================== --- stable/10/lib/libproc/proc_sym.c Wed Dec 25 22:32:52 2013 (r259894) +++ stable/10/lib/libproc/proc_sym.c Wed Dec 25 22:36:27 2013 (r259895) @@ -238,16 +238,16 @@ proc_addr2sym(struct proc_handle *p, uin if ((map = proc_addr2map(p, addr)) == NULL) return (-1); - if (!map->pr_mapname || (fd = open(map->pr_mapname, O_RDONLY, 0)) < 0) { - warn("ERROR: open %s failed", map->pr_mapname); + if ((fd = open(map->pr_mapname, O_RDONLY, 0)) < 0) { + DPRINTF("ERROR: open %s failed", map->pr_mapname); goto err0; } if ((e = elf_begin(fd, ELF_C_READ, NULL)) == NULL) { - warn("ERROR: elf_begin() failed"); + DPRINTFX("ERROR: elf_begin() failed: %s", elf_errmsg(-1)); goto err1; } if (gelf_getehdr(e, &ehdr) == NULL) { - warn("ERROR: gelf_getehdr() failed"); + DPRINTFX("ERROR: gelf_getehdr() failed: %s", elf_errmsg(-1)); goto err2; } /* @@ -275,7 +275,7 @@ proc_addr2sym(struct proc_handle *p, uin * Then look up the string name in STRTAB (.dynstr) */ if ((data = elf_getdata(dynsymscn, NULL)) == NULL) { - DPRINTF("ERROR: elf_getdata() failed"); + DPRINTFX("ERROR: elf_getdata() failed: %s", elf_errmsg(-1)); goto symtab; } i = 0; @@ -312,7 +312,7 @@ symtab: if (symtabscn == NULL) goto err2; if ((data = elf_getdata(symtabscn, NULL)) == NULL) { - DPRINTF("ERROR: elf_getdata() failed"); + DPRINTFX("ERROR: elf_getdata() failed: %s", elf_errmsg(-1)); goto err2; } i = 0; @@ -420,7 +420,7 @@ proc_name2sym(struct proc_handle *p, con unsigned long symtabstridx = 0, dynsymstridx = 0; if ((map = proc_name2map(p, object)) == NULL) { - DPRINTF("ERROR: couldn't find object %s", object); + DPRINTFX("ERROR: couldn't find object %s", object); goto err0; } if ((fd = open(map->pr_mapname, O_RDONLY, 0)) < 0) { @@ -428,11 +428,11 @@ proc_name2sym(struct proc_handle *p, con goto err0; } if ((e = elf_begin(fd, ELF_C_READ, NULL)) == NULL) { - warn("ERROR: elf_begin() failed"); + DPRINTFX("ERROR: elf_begin() failed: %s", elf_errmsg(-1)); goto err1; } if (gelf_getehdr(e, &ehdr) == NULL) { - warn("ERROR: gelf_getehdr() failed"); + DPRINTFX("ERROR: gelf_getehdr() failed: %s", elf_errmsg(-1)); goto err2; } /* @@ -460,7 +460,6 @@ proc_name2sym(struct proc_handle *p, con * Then look up the string name in STRTAB (.dynstr) */ if ((data = elf_getdata(dynsymscn, NULL))) { - DPRINTF("ERROR: elf_getdata() failed"); i = 0; while (gelf_getsym(data, i++, &sym) != NULL) { s = elf_strptr(e, dynsymstridx, sym.st_name); @@ -519,11 +518,11 @@ proc_iter_symbyaddr(struct proc_handle * if ((map = proc_name2map(p, object)) == NULL) return (-1); if ((fd = open(map->pr_mapname, O_RDONLY)) < 0) { - warn("ERROR: open %s failed", map->pr_mapname); + DPRINTF("ERROR: open %s failed", map->pr_mapname); goto err0; } if ((e = elf_begin(fd, ELF_C_READ, NULL)) == NULL) { - warn("ERROR: elf_begin() failed"); + DPRINTFX("ERROR: elf_begin() failed: %s", elf_errmsg(-1)); goto err1; } /* @@ -546,7 +545,7 @@ proc_iter_symbyaddr(struct proc_handle * return (-1); stridx = shdr.sh_link; if ((data = elf_getdata(foundscn, NULL)) == NULL) { - DPRINTF("ERROR: elf_getdata() failed"); + DPRINTFX("ERROR: elf_getdata() failed: %s", elf_errmsg(-1)); goto err2; } i = 0; Modified: stable/10/lib/libproc/proc_util.c ============================================================================== --- stable/10/lib/libproc/proc_util.c Wed Dec 25 22:32:52 2013 (r259894) +++ stable/10/lib/libproc/proc_util.c Wed Dec 25 22:36:27 2013 (r259895) @@ -146,7 +146,7 @@ proc_wstatus(struct proc_handle *phdl) return (-1); if (waitpid(phdl->pid, &status, WUNTRACED) < 0) { if (errno != EINTR) - warn("waitpid"); + DPRINTF("waitpid"); return (-1); } if (WIFSTOPPED(status)) From owner-svn-src-stable@FreeBSD.ORG Wed Dec 25 23:54:39 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 571B314E; Wed, 25 Dec 2013 23:54: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 421A01E5A; Wed, 25 Dec 2013 23:54:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBPNsdrI073313; Wed, 25 Dec 2013 23:54:39 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBPNsdm4073312; Wed, 25 Dec 2013 23:54:39 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201312252354.rBPNsdm4073312@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 25 Dec 2013 23:54:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259898 - stable/10/sys/mips/beri X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Dec 2013 23:54:39 -0000 Author: bz Date: Wed Dec 25 23:54:38 2013 New Revision: 259898 URL: http://svnweb.freebsd.org/changeset/base/259898 Log: MFC r259265: Use correct value pointing to previously selected FDT DTB. Sponsored by: DARPA, AFRL Modified: stable/10/sys/mips/beri/beri_machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/mips/beri/beri_machdep.c ============================================================================== --- stable/10/sys/mips/beri/beri_machdep.c Wed Dec 25 22:49:54 2013 (r259897) +++ stable/10/sys/mips/beri/beri_machdep.c Wed Dec 25 23:54:38 2013 (r259898) @@ -173,7 +173,7 @@ platform_start(__register_t a0, __regist if (OF_install(OFW_FDT, 0) == FALSE) while (1); - if (OF_init(&fdt_static_dtb) != 0) + if (OF_init((void *)dtbp) != 0) while (1); #endif From owner-svn-src-stable@FreeBSD.ORG Wed Dec 25 23:57:02 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E87628D; Wed, 25 Dec 2013 23:57:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 78BAC1E66; Wed, 25 Dec 2013 23:57:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBPNv2VV073681; Wed, 25 Dec 2013 23:57:02 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBPNv2IS073679; Wed, 25 Dec 2013 23:57:02 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201312252357.rBPNv2IS073679@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 25 Dec 2013 23:57:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259899 - in stable/10/sys: boot/fdt/dts mips/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Dec 2013 23:57:02 -0000 Author: bz Date: Wed Dec 25 23:57:01 2013 New Revision: 259899 URL: http://svnweb.freebsd.org/changeset/base/259899 Log: MFC r259267: Add an FDT DTS and MDROOT kernel configuration for BERI on NetFPGA. At this point we only support one CPU, the PIC, and a UART console. Sponsored by: DARPA, AFRL Added: stable/10/sys/boot/fdt/dts/beri-netfpga.dts - copied unchanged from r259267, head/sys/boot/fdt/dts/beri-netfpga.dts stable/10/sys/mips/conf/BERI_NETFPGA_MDROOT - copied unchanged from r259267, head/sys/mips/conf/BERI_NETFPGA_MDROOT Modified: Directory Properties: stable/10/ (props changed) Copied: stable/10/sys/boot/fdt/dts/beri-netfpga.dts (from r259267, head/sys/boot/fdt/dts/beri-netfpga.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/fdt/dts/beri-netfpga.dts Wed Dec 25 23:57:01 2013 (r259899, copy of r259267, head/sys/boot/fdt/dts/beri-netfpga.dts) @@ -0,0 +1,135 @@ +/*- + * Copyright (c) 2012-2013 Robert N. M. Watson + * Copyright (c) 2013 SRI International + * Copyright (c) 2013 Bjoern A. Zeeb + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-11-C-0249) + * ("MRC2"), as part of the DARPA MRC research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/dts-v1/; + +/* + * Device names here have been largely made up on the spot, especially for the + * "compatible" strings, and might want to be revised. + */ + +/ { + model = "SRI/Cambridge Beri (NetFPGA)"; + compatible = "sri-cambridge,beri-netfpga"; + #address-cells = <1>; + #size-cells = <1>; + + cpus { + #address-cells = <1>; + #size-cells = <1>; + + /* + * Secondary CPUs all start disabled and use the + * spin-table enable method. cpu-release-addr must be + * specified for each cpu other than cpu@0. Values of + * cpu-release-addr grow down from 0x100000 (kernel). + */ + status = "disabled"; + enable-method = "spin-table"; + + cpu@0 { + device-type = "cpu"; + compatible = "sri-cambridge,beri"; + + reg = <0>; + status = "okay"; + }; + +/* + cpu@1 { + device-type = "cpu"; + compatible = "sri-cambridge,beri"; + + reg = <1>; + // XXX: should we need cached prefix? + cpu-release-addr = <0xffffffff 0x800fffe0>; + }; +*/ + }; + + soc { + #address-cells = <1>; + #size-cells = <1>; + #interrupt-cells = <1>; + + /* + * Declare mips,mips4k since BERI doesn't (yet) have a PIC, so + * we use mips4k coprocessor 0 interrupt management directly. + */ + compatible = "simple-bus", "mips,mips4k"; + ranges = <>; + + memory { + device_type = "memory"; + reg = <0x0 0x0FFFFFFF>; // ~256M at 0x0 + }; + + beripic: beripic@7f804000 { + compatible = "sri-cambridge,beri-pic"; + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <1>; + reg = <0x7f804000 0x400 + 0x7f806000 0x10 + 0x7f806080 0x10 + 0x7f806100 0x10>; + interrupts = <0 1 2 3 4>; + hard-interrupt-sources = <64>; + soft-interrupt-sources = <64>; + }; + + serial0: serial@7f002100 { + compatible = "ns16550"; + reg = <0x7f002100 0x20>; + reg-shift = <2>; + clock-frequency = <100000000>; + interrupts = <8>; + interrupt-parent = <&beripic>; + }; + }; + + aliases { + serial0 = &serial0; + }; + + chosen { + stdin = "serial0"; + stdout = "serial0"; + bootargs = "-v"; + }; +}; Copied: stable/10/sys/mips/conf/BERI_NETFPGA_MDROOT (from r259267, head/sys/mips/conf/BERI_NETFPGA_MDROOT) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/mips/conf/BERI_NETFPGA_MDROOT Wed Dec 25 23:57:01 2013 (r259899, copy of r259267, head/sys/mips/conf/BERI_NETFPGA_MDROOT) @@ -0,0 +1,28 @@ +# +# BERI_NETFPGA_MDROOT -- Kernel for the SRI/Cambridge "BERI" (Bluespec Extensible +# RISC Implementation) FPGA soft core, as configured in its NetFPGA reference +# configuration. +# +# $FreeBSD$ +# + +include "BERI_TEMPLATE" + +ident BERI_NETFPGA_MDROOT + +options FDT +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=beri-netfpga.dts + +device uart + +# +# This kernel configuration uses an embedded memory root file system. +# Adjust the following path and size based on local requirements. +# +options MD_ROOT # MD is a potential root device +options MD_ROOT_SIZE=26112 # 25.5MB +options ROOTDEVNAME=\"ufs:md0\" +#makeoptions MFS_IMAGE=/foo/baz/baz/mdroot.img + +# end From owner-svn-src-stable@FreeBSD.ORG Thu Dec 26 00:02:16 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD29D4BF; Thu, 26 Dec 2013 00:02:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 990AC1ED1; Thu, 26 Dec 2013 00:02:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBQ02GTK077444; Thu, 26 Dec 2013 00:02:16 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBQ02GGG077443; Thu, 26 Dec 2013 00:02:16 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201312260002.rBQ02GGG077443@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 26 Dec 2013 00:02:16 +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: r259900 - stable/9/sys/netinet6 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Dec 2013 00:02:16 -0000 Author: bz Date: Thu Dec 26 00:02:16 2013 New Revision: 259900 URL: http://svnweb.freebsd.org/changeset/base/259900 Log: MFC r255792: Update comment from draft to RFC number. Submitted by: Loganaden Velvindron (logan elandsys.com) Modified: stable/9/sys/netinet6/frag6.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet6/frag6.c ============================================================================== --- stable/9/sys/netinet6/frag6.c Wed Dec 25 23:57:01 2013 (r259899) +++ stable/9/sys/netinet6/frag6.c Thu Dec 26 00:02:16 2013 (r259900) @@ -222,9 +222,8 @@ frag6_input(struct mbuf **mp, int *offp, offset += sizeof(struct ip6_frag); /* - * XXX-BZ RFC XXXX (draft-gont-6man-ipv6-atomic-fragments) - * Handle "atomic" fragments (offset and m bit set to 0) upfront, - * unrelated to any reassembly. Just skip the fragment header. + * RFC 6946: Handle "atomic" fragments (offset and m bit set to 0) + * upfront, unrelated to any reassembly. Just skip the fragment header. */ if ((ip6f->ip6f_offlg & ~IP6F_RESERVED_MASK) == 0) { /* XXX-BZ we want dedicated counters for this. */ From owner-svn-src-stable@FreeBSD.ORG Thu Dec 26 00:05:32 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 643717D7; Thu, 26 Dec 2013 00:05: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4FC501EF6; Thu, 26 Dec 2013 00:05:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBQ05W5n078459; Thu, 26 Dec 2013 00:05:32 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBQ05W5B078458; Thu, 26 Dec 2013 00:05:32 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201312260005.rBQ05W5B078458@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 26 Dec 2013 00:05:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259901 - stable/9/sys/dev/hwpmc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Dec 2013 00:05:32 -0000 Author: bz Date: Thu Dec 26 00:05:31 2013 New Revision: 259901 URL: http://svnweb.freebsd.org/changeset/base/259901 Log: MFC r254571: Correct a typo in the event mask mnemonic. Modified: stable/9/sys/dev/hwpmc/pmc_events.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/hwpmc/pmc_events.h ============================================================================== --- stable/9/sys/dev/hwpmc/pmc_events.h Thu Dec 26 00:02:16 2013 (r259900) +++ stable/9/sys/dev/hwpmc/pmc_events.h Thu Dec 26 00:05:31 2013 (r259901) @@ -3174,7 +3174,7 @@ __PMC_EV_ALIAS("LOCK_CYCLES.SPLIT_LOCK_U IAP_EVENT_63H_01H) \ __PMC_EV_ALIAS("LOCK_CYCLES.CACHE_LOCK_DURATION", IAP_EVENT_63H_02H) \ __PMC_EV_ALIAS("IDQ.EMPTY", IAP_EVENT_79H_02H) \ -__PMC_EV_ALIAS("IQD.MITE_UOPS", IAP_EVENT_79H_04H) \ +__PMC_EV_ALIAS("IDQ.MITE_UOPS", IAP_EVENT_79H_04H) \ __PMC_EV_ALIAS("IDQ.DSB_UOPS", IAP_EVENT_79H_08H) \ __PMC_EV_ALIAS("IDQ.MS_DSB_UOPS", IAP_EVENT_79H_10H) \ __PMC_EV_ALIAS("IDQ.MS_MITE_UOPS", IAP_EVENT_79H_20H) \ From owner-svn-src-stable@FreeBSD.ORG Thu Dec 26 01:11:52 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53715E2C; Thu, 26 Dec 2013 01:11: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 24FF5127C; Thu, 26 Dec 2013 01:11:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBQ1BpiL004643; Thu, 26 Dec 2013 01:11:51 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBQ1BppW004640; Thu, 26 Dec 2013 01:11:51 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312260111.rBQ1BppW004640@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Thu, 26 Dec 2013 01:11: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: r259903 - stable/9/sys/fs/ext2fs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Dec 2013 01:11:52 -0000 Author: pfg Date: Thu Dec 26 01:11:51 2013 New Revision: 259903 URL: http://svnweb.freebsd.org/changeset/base/259903 Log: MFC r252397, r258904, r259780: Small ext2fs updates. Use the unsigned random() range in i_gen. Add two new reserved inodes. Make the hashing algorithm match the linux code. PR: kern/183230 Modified: stable/9/sys/fs/ext2fs/ext2_dinode.h stable/9/sys/fs/ext2fs/ext2_hash.c stable/9/sys/fs/ext2fs/ext2_vfsops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/ext2fs/ext2_dinode.h ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_dinode.h Thu Dec 26 00:11:19 2013 (r259902) +++ stable/9/sys/fs/ext2fs/ext2_dinode.h Thu Dec 26 01:11:51 2013 (r259903) @@ -44,6 +44,8 @@ #define EXT2_UNDELDIRINO ((ino_t)6) #define EXT2_RESIZEINO ((ino_t)7) #define EXT2_JOURNALINO ((ino_t)8) +#define EXT2_EXCLUDEINO ((ino_t)9) +#define EXT2_REPLICAINO ((ino_t)10) #define EXT2_FIRSTINO ((ino_t)11) /* Modified: stable/9/sys/fs/ext2fs/ext2_hash.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_hash.c Thu Dec 26 00:11:19 2013 (r259902) +++ stable/9/sys/fs/ext2fs/ext2_hash.c Thu Dec 26 01:11:51 2013 (r259903) @@ -289,8 +289,8 @@ ext2_htree_hash(const char *name, int le len -= 32; name += 32; } - major = hash[0]; - minor = hash[1]; + major = hash[1]; + minor = hash[2]; break; default: goto error; Modified: stable/9/sys/fs/ext2fs/ext2_vfsops.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_vfsops.c Thu Dec 26 00:11:19 2013 (r259902) +++ stable/9/sys/fs/ext2fs/ext2_vfsops.c Thu Dec 26 01:11:51 2013 (r259903) @@ -1006,7 +1006,7 @@ ext2_vget(struct mount *mp, ino_t ino, i * already have one. This should only happen on old filesystems. */ if (ip->i_gen == 0) { - ip->i_gen = random() / 2 + 1; + ip->i_gen = random() + 1; if ((vp->v_mount->mnt_flag & MNT_RDONLY) == 0) ip->i_flag |= IN_MODIFIED; } From owner-svn-src-stable@FreeBSD.ORG Thu Dec 26 01:12:36 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B18DDF70; Thu, 26 Dec 2013 01:12:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9D0B01282; Thu, 26 Dec 2013 01:12:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBQ1CaV1004803; Thu, 26 Dec 2013 01:12:36 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBQ1Cas9004798; Thu, 26 Dec 2013 01:12:36 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312260112.rBQ1Cas9004798@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Thu, 26 Dec 2013 01:12:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259904 - stable/10/sys/fs/ext2fs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Dec 2013 01:12:36 -0000 Author: pfg Date: Thu Dec 26 01:12:35 2013 New Revision: 259904 URL: http://svnweb.freebsd.org/changeset/base/259904 Log: MFC r258904, r259780: Small ext2fs updates. Add two new reserved inodes. Make the hashing algorithm match the linux code. PR: kern/183230 Modified: stable/10/sys/fs/ext2fs/ext2_dinode.h stable/10/sys/fs/ext2fs/ext2_hash.c Modified: stable/10/sys/fs/ext2fs/ext2_dinode.h ============================================================================== --- stable/10/sys/fs/ext2fs/ext2_dinode.h Thu Dec 26 01:11:51 2013 (r259903) +++ stable/10/sys/fs/ext2fs/ext2_dinode.h Thu Dec 26 01:12:35 2013 (r259904) @@ -44,6 +44,8 @@ #define EXT2_UNDELDIRINO ((ino_t)6) #define EXT2_RESIZEINO ((ino_t)7) #define EXT2_JOURNALINO ((ino_t)8) +#define EXT2_EXCLUDEINO ((ino_t)9) +#define EXT2_REPLICAINO ((ino_t)10) #define EXT2_FIRSTINO ((ino_t)11) /* Modified: stable/10/sys/fs/ext2fs/ext2_hash.c ============================================================================== --- stable/10/sys/fs/ext2fs/ext2_hash.c Thu Dec 26 01:11:51 2013 (r259903) +++ stable/10/sys/fs/ext2fs/ext2_hash.c Thu Dec 26 01:12:35 2013 (r259904) @@ -289,8 +289,8 @@ ext2_htree_hash(const char *name, int le len -= 32; name += 32; } - major = hash[0]; - minor = hash[1]; + major = hash[1]; + minor = hash[2]; break; default: goto error; From owner-svn-src-stable@FreeBSD.ORG Thu Dec 26 10:45:18 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0AC189C1; Thu, 26 Dec 2013 10:45:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EA4801508; Thu, 26 Dec 2013 10:45:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBQAjHGC021065; Thu, 26 Dec 2013 10:45:17 GMT (envelope-from dfr@svn.freebsd.org) Received: (from dfr@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBQAjHMC021064; Thu, 26 Dec 2013 10:45:17 GMT (envelope-from dfr@svn.freebsd.org) Message-Id: <201312261045.rBQAjHMC021064@svn.freebsd.org> From: Doug Rabson Date: Thu, 26 Dec 2013 10:45:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259912 - stable/9/usr.bin/rpcgen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Dec 2013 10:45:18 -0000 Author: dfr Date: Thu Dec 26 10:45:17 2013 New Revision: 259912 URL: http://svnweb.freebsd.org/changeset/base/259912 Log: Generate client sample code which compiles without warnings. For 'rpcgen -a', generate a makefile where 'make clean all' works. Modified: stable/9/usr.bin/rpcgen/rpc_main.c Modified: stable/9/usr.bin/rpcgen/rpc_main.c ============================================================================== --- stable/9/usr.bin/rpcgen/rpc_main.c Thu Dec 26 09:09:52 2013 (r259911) +++ stable/9/usr.bin/rpcgen/rpc_main.c Thu Dec 26 10:45:17 2013 (r259912) @@ -780,6 +780,8 @@ clnt_output(const char *infile, const ch free(include); } else f_print(fout, "#include \n"); + f_print(fout, "#include \n"); + f_print(fout, "#include \n"); tell = ftell(fout); while ( (def = get_definition()) ) { has_program += write_sample_clnt(def); @@ -867,6 +869,10 @@ $(TARGETS_SVC.c:%%.c=%%.o) "); f_print(fout, "all : $(CLIENT) $(SERVER)\n\n"); f_print(fout, "$(TARGETS) : $(SOURCES.x) \n"); f_print(fout, "\trpcgen $(RPCGENFLAGS) $(SOURCES.x)\n\n"); + if (allfiles) { + f_print(fout, "\trpcgen -Sc $(RPCGENFLAGS) $(SOURCES.x) -o %s\n\n", clientname); + f_print(fout, "\trpcgen -Ss $(RPCGENFLAGS) $(SOURCES.x) -o %s\n\n", servername); + } f_print(fout, "$(OBJECTS_CLNT) : $(SOURCES_CLNT.c) $(SOURCES_CLNT.h) \ $(TARGETS_CLNT.c) \n\n"); From owner-svn-src-stable@FreeBSD.ORG Thu Dec 26 11:31:36 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1FB94292 for ; Thu, 26 Dec 2013 11:31:36 +0000 (UTC) Received: from mail-pb0-f51.google.com (mail-pb0-f51.google.com [209.85.160.51]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E665B17E6 for ; Thu, 26 Dec 2013 11:31:35 +0000 (UTC) Received: by mail-pb0-f51.google.com with SMTP id up15so8150246pbc.38 for ; Thu, 26 Dec 2013 03:31:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=/5iRzjkuhDtPmfj//aG8AhAPwJNI9dRs30zNrTL6eAc=; b=Y3nHiuf226lzNq1PwWOT3l68mf2E0ZcPIjlE+OFAKE+FksnQmnmOX/G1Y2eJ81NOJb 0+ADGh5JQBX8gTqJpa/fETCl4xqtdTudM/GXgsEyCJOsjuX3AHI44/NZYZaDwWiLrBs5 nmeiROtQRvIkHfNtL92EvloZzZrEfJGDJaMShtwsgEpa9pQxTGTSEsZDSW7nWFa8AtMm g8HfvnoRxJ/mdzE8UQTIkUsvBvhIVHQvGGORE3b1MgHtPpcH3yzTa4GFieiwCequk9GZ On/U0zHvVSlAB68XNCdb4Lai2IRzLW0Cmq4wcZFkGqRW6mtn4h+/w5uxp0hcfh3FmqCf enHg== X-Gm-Message-State: ALoCoQklYzEvHe4SfrHnmquTHADDntrmnS8/3zqp8F3BR5B9Oo8UwJ3jh8lS8JPCPlsAzCWC3Q4g MIME-Version: 1.0 X-Received: by 10.66.248.227 with SMTP id yp3mr42930383pac.116.1388057489511; Thu, 26 Dec 2013 03:31:29 -0800 (PST) Received: by 10.70.35.197 with HTTP; Thu, 26 Dec 2013 03:31:29 -0800 (PST) In-Reply-To: <201312261045.rBQAjHMC021064@svn.freebsd.org> References: <201312261045.rBQAjHMC021064@svn.freebsd.org> Date: Thu, 26 Dec 2013 11:31:29 +0000 Message-ID: Subject: Re: svn commit: r259912 - stable/9/usr.bin/rpcgen From: Doug Rabson To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Dec 2013 11:31:36 -0000 Bah! This was intended for head - feel free to back it out if anything breaks. On 26 December 2013 10:45, Doug Rabson wrote: > Author: dfr > Date: Thu Dec 26 10:45:17 2013 > New Revision: 259912 > URL: http://svnweb.freebsd.org/changeset/base/259912 > > Log: > Generate client sample code which compiles without warnings. > For 'rpcgen -a', generate a makefile where 'make clean all' works. > > Modified: > stable/9/usr.bin/rpcgen/rpc_main.c > > Modified: stable/9/usr.bin/rpcgen/rpc_main.c > > ============================================================================== > --- stable/9/usr.bin/rpcgen/rpc_main.c Thu Dec 26 09:09:52 2013 > (r259911) > +++ stable/9/usr.bin/rpcgen/rpc_main.c Thu Dec 26 10:45:17 2013 > (r259912) > @@ -780,6 +780,8 @@ clnt_output(const char *infile, const ch > free(include); > } else > f_print(fout, "#include \n"); > + f_print(fout, "#include \n"); > + f_print(fout, "#include \n"); > tell = ftell(fout); > while ( (def = get_definition()) ) { > has_program += write_sample_clnt(def); > @@ -867,6 +869,10 @@ $(TARGETS_SVC.c:%%.c=%%.o) "); > f_print(fout, "all : $(CLIENT) $(SERVER)\n\n"); > f_print(fout, "$(TARGETS) : $(SOURCES.x) \n"); > f_print(fout, "\trpcgen $(RPCGENFLAGS) $(SOURCES.x)\n\n"); > + if (allfiles) { > + f_print(fout, "\trpcgen -Sc $(RPCGENFLAGS) $(SOURCES.x) -o > %s\n\n", clientname); > + f_print(fout, "\trpcgen -Ss $(RPCGENFLAGS) $(SOURCES.x) -o > %s\n\n", servername); > + } > f_print(fout, "$(OBJECTS_CLNT) : $(SOURCES_CLNT.c) > $(SOURCES_CLNT.h) \ > $(TARGETS_CLNT.c) \n\n"); > > From owner-svn-src-stable@FreeBSD.ORG Thu Dec 26 16:57:37 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 32243E5; Thu, 26 Dec 2013 16:57:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1D3B610AD; Thu, 26 Dec 2013 16:57:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBQGvag5076741; Thu, 26 Dec 2013 16:57:36 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBQGva81076740; Thu, 26 Dec 2013 16:57:36 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201312261657.rBQGva81076740@svn.freebsd.org> From: John Baldwin Date: Thu, 26 Dec 2013 16:57:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259917 - stable/10/sys/security/audit X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Dec 2013 16:57:37 -0000 Author: jhb Date: Thu Dec 26 16:57:36 2013 New Revision: 259917 URL: http://svnweb.freebsd.org/changeset/base/259917 Log: MFC 259014: There is no sysctl with the MIB { CTL_KERN, KERN_MAXID }. Modified: stable/10/sys/security/audit/audit_bsm_klib.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/security/audit/audit_bsm_klib.c ============================================================================== --- stable/10/sys/security/audit/audit_bsm_klib.c Thu Dec 26 15:51:14 2013 (r259916) +++ stable/10/sys/security/audit/audit_bsm_klib.c Thu Dec 26 16:57:36 2013 (r259917) @@ -273,7 +273,6 @@ audit_ctlname_to_sysctlevent(int name[], case KERN_USRSTACK: case KERN_LOGSIGEXIT: case KERN_IOV_MAX: - case KERN_MAXID: return ((valid_arg & ARG_VALUE) ? AUE_SYSCTL : AUE_SYSCTL_NONADMIN); From owner-svn-src-stable@FreeBSD.ORG Thu Dec 26 16:58:30 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EA129222; Thu, 26 Dec 2013 16:58:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D532810B8; Thu, 26 Dec 2013 16:58:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBQGwUbX076870; Thu, 26 Dec 2013 16:58:30 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBQGwUPZ076869; Thu, 26 Dec 2013 16:58:30 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201312261658.rBQGwUPZ076869@svn.freebsd.org> From: John Baldwin Date: Thu, 26 Dec 2013 16:58:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259918 - stable/9/sys/security/audit X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Dec 2013 16:58:31 -0000 Author: jhb Date: Thu Dec 26 16:58:30 2013 New Revision: 259918 URL: http://svnweb.freebsd.org/changeset/base/259918 Log: MFC 259014: There is no sysctl with the MIB { CTL_KERN, KERN_MAXID }. Modified: stable/9/sys/security/audit/audit_bsm_klib.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/security/audit/audit_bsm_klib.c ============================================================================== --- stable/9/sys/security/audit/audit_bsm_klib.c Thu Dec 26 16:57:36 2013 (r259917) +++ stable/9/sys/security/audit/audit_bsm_klib.c Thu Dec 26 16:58:30 2013 (r259918) @@ -273,7 +273,6 @@ audit_ctlname_to_sysctlevent(int name[], case KERN_USRSTACK: case KERN_LOGSIGEXIT: case KERN_IOV_MAX: - case KERN_MAXID: return ((valid_arg & ARG_VALUE) ? AUE_SYSCTL : AUE_SYSCTL_NONADMIN); From owner-svn-src-stable@FreeBSD.ORG Thu Dec 26 16:59:51 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87C6E452; Thu, 26 Dec 2013 16:59:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 734EF10CE; Thu, 26 Dec 2013 16:59:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBQGxpPp077119; Thu, 26 Dec 2013 16:59:51 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBQGxp28077118; Thu, 26 Dec 2013 16:59:51 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201312261659.rBQGxp28077118@svn.freebsd.org> From: John Baldwin Date: Thu, 26 Dec 2013 16:59:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r259919 - stable/8/sys/security/audit X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Dec 2013 16:59:51 -0000 Author: jhb Date: Thu Dec 26 16:59:50 2013 New Revision: 259919 URL: http://svnweb.freebsd.org/changeset/base/259919 Log: MFC 259014: There is no sysctl with the MIB { CTL_KERN, KERN_MAXID }. Modified: stable/8/sys/security/audit/audit_bsm_klib.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/security/ (props changed) Modified: stable/8/sys/security/audit/audit_bsm_klib.c ============================================================================== --- stable/8/sys/security/audit/audit_bsm_klib.c Thu Dec 26 16:58:30 2013 (r259918) +++ stable/8/sys/security/audit/audit_bsm_klib.c Thu Dec 26 16:59:50 2013 (r259919) @@ -273,7 +273,6 @@ audit_ctlname_to_sysctlevent(int name[], case KERN_USRSTACK: case KERN_LOGSIGEXIT: case KERN_IOV_MAX: - case KERN_MAXID: return ((valid_arg & ARG_VALUE) ? AUE_SYSCTL : AUE_SYSCTL_NONADMIN); From owner-svn-src-stable@FreeBSD.ORG Fri Dec 27 11:16:01 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66669132; Fri, 27 Dec 2013 11:16: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C68671656; Fri, 27 Dec 2013 11:10:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBRBAWna093383; Fri, 27 Dec 2013 11:10:32 GMT (envelope-from dfr@svn.freebsd.org) Received: (from dfr@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBRBAWLR093382; Fri, 27 Dec 2013 11:10:32 GMT (envelope-from dfr@svn.freebsd.org) Message-Id: <201312271110.rBRBAWLR093382@svn.freebsd.org> From: Doug Rabson Date: Fri, 27 Dec 2013 11:10:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259941 - stable/9/usr.bin/rpcgen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 11:16:01 -0000 Author: dfr Date: Fri Dec 27 11:10:32 2013 New Revision: 259941 URL: http://svnweb.freebsd.org/changeset/base/259941 Log: Back out r259912 - it shouldn't have been committed to this branch. Modified: stable/9/usr.bin/rpcgen/rpc_main.c Modified: stable/9/usr.bin/rpcgen/rpc_main.c ============================================================================== --- stable/9/usr.bin/rpcgen/rpc_main.c Fri Dec 27 08:06:23 2013 (r259940) +++ stable/9/usr.bin/rpcgen/rpc_main.c Fri Dec 27 11:10:32 2013 (r259941) @@ -780,8 +780,6 @@ clnt_output(const char *infile, const ch free(include); } else f_print(fout, "#include \n"); - f_print(fout, "#include \n"); - f_print(fout, "#include \n"); tell = ftell(fout); while ( (def = get_definition()) ) { has_program += write_sample_clnt(def); @@ -869,10 +867,6 @@ $(TARGETS_SVC.c:%%.c=%%.o) "); f_print(fout, "all : $(CLIENT) $(SERVER)\n\n"); f_print(fout, "$(TARGETS) : $(SOURCES.x) \n"); f_print(fout, "\trpcgen $(RPCGENFLAGS) $(SOURCES.x)\n\n"); - if (allfiles) { - f_print(fout, "\trpcgen -Sc $(RPCGENFLAGS) $(SOURCES.x) -o %s\n\n", clientname); - f_print(fout, "\trpcgen -Ss $(RPCGENFLAGS) $(SOURCES.x) -o %s\n\n", servername); - } f_print(fout, "$(OBJECTS_CLNT) : $(SOURCES_CLNT.c) $(SOURCES_CLNT.h) \ $(TARGETS_CLNT.c) \n\n"); From owner-svn-src-stable@FreeBSD.ORG Fri Dec 27 16:06:11 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D01B271A; Fri, 27 Dec 2013 16:06:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B951F1A05; Fri, 27 Dec 2013 16:06:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBRG6BCg004489; Fri, 27 Dec 2013 16:06:11 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBRG68ed004465; Fri, 27 Dec 2013 16:06:08 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312271606.rBRG68ed004465@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Fri, 27 Dec 2013 16:06:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259947 - in stable/10/contrib/gcc: . config cp doc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 16:06:12 -0000 Author: pfg Date: Fri Dec 27 16:06:08 2013 New Revision: 259947 URL: http://svnweb.freebsd.org/changeset/base/259947 Log: gcc: Merge upstream changes. Include types in error message for build_binary_op. Mostly cosmetic changes, to reduce differences with Apple's gcc. Obtained from: gcc 4.3 (rev. 120611, 124839, 125239; GPLv2) Modified: stable/10/contrib/gcc/ChangeLog.gcc43 stable/10/contrib/gcc/c-common.c stable/10/contrib/gcc/c-common.h stable/10/contrib/gcc/c-typeck.c stable/10/contrib/gcc/config/darwin.h stable/10/contrib/gcc/cp/ChangeLog.gcc43 stable/10/contrib/gcc/cp/Make-lang.in stable/10/contrib/gcc/cp/mangle.c stable/10/contrib/gcc/cp/rtti.c stable/10/contrib/gcc/cp/typeck.c stable/10/contrib/gcc/doc/tm.texi stable/10/contrib/gcc/dwarf2out.c stable/10/contrib/gcc/sched-vis.c stable/10/contrib/gcc/target-def.h stable/10/contrib/gcc/target.h stable/10/contrib/gcc/tree-dump.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/gcc/ChangeLog.gcc43 ============================================================================== --- stable/10/contrib/gcc/ChangeLog.gcc43 Fri Dec 27 15:52:18 2013 (r259946) +++ stable/10/contrib/gcc/ChangeLog.gcc43 Fri Dec 27 16:06:08 2013 (r259947) @@ -57,6 +57,14 @@ operand. (store_expr): Handle BLKmode moves by calling emit_block_move. +2007-05-31 Daniel Berlin (r125239) + + * c-typeck.c (build_indirect_ref): Include type in error message. + (build_binary_op): Pass types to binary_op_error. + * c-common.c (binary_op_error): Take two type arguments, print out + types with error. + * c-common.h (binary_op_error): Update prototype. + 2007-05-27 Eric Christopher (r125116) * config/rs6000/rs6000.c (rs6000_emit_prologue): Update @@ -80,6 +88,14 @@ regs_invalidated_by_call, rather than just checking the membership of REGNO (REG). +2007-05-18 Geoffrey Keating (r124839) + + * dwarf2out.c (print_die): Use '%ld' not '%lu' to print a 'long'. + (output_die): Use 'unsigned long' with %x. + * sched-vis.c (print_value): Use 'unsigned HOST_WIDE_INT' and + HOST_WIDE_INT_PRINT_HEX to print HOST_WIDE_INT. + * tree-dump.c (dump_pointer): Use 'unsigned long' for %lx. + 2007-05-16 Eric Christopher (r124763) * config/rs6000/rs6000.c (rs6000_emit_prologue): Move altivec register @@ -389,6 +405,14 @@ * config.gcc: Support core2 processor. +2007-01-08 Geoffrey Keating (r120611) + + * target.h (struct gcc_target): New field library_rtti_comdat. + * target-def.h (TARGET_CXX_LIBRARY_RTTI_COMDAT): New. + (TARGET_CXX): Add TARGET_CXX_LIBRARY_RTTI_COMDAT. + * doc/tm.texi (C++ ABI): Document TARGET_CXX_LIBRARY_RTTI_COMDAT. + * config/darwin.h (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define. + 2007-01-05 Manuel Lopez-Ibanez (r120505) PR c/19978 Modified: stable/10/contrib/gcc/c-common.c ============================================================================== --- stable/10/contrib/gcc/c-common.c Fri Dec 27 15:52:18 2013 (r259946) +++ stable/10/contrib/gcc/c-common.c Fri Dec 27 16:06:08 2013 (r259947) @@ -1988,10 +1988,10 @@ min_precision (tree value, int unsignedp } /* Print an error message for invalid operands to arith operation - CODE. */ + CODE with TYPE0 for operand 0, and TYPE1 for operand 1. */ void -binary_op_error (enum tree_code code) +binary_op_error (enum tree_code code, tree type0, tree type1) { const char *opname; @@ -2042,7 +2042,8 @@ binary_op_error (enum tree_code code) default: gcc_unreachable (); } - error ("invalid operands to binary %s", opname); + error ("invalid operands to binary %s (have %qT and %qT)", opname, + type0, type1); } /* Subroutine of build_binary_op, used for comparison operations. Modified: stable/10/contrib/gcc/c-common.h ============================================================================== --- stable/10/contrib/gcc/c-common.h Fri Dec 27 15:52:18 2013 (r259946) +++ stable/10/contrib/gcc/c-common.h Fri Dec 27 16:06:08 2013 (r259947) @@ -650,7 +650,7 @@ extern tree c_sizeof_or_alignof_type (tr extern tree c_alignof_expr (tree); /* Print an error message for invalid operands to arith operation CODE. NOP_EXPR is used as a special case (see truthvalue_conversion). */ -extern void binary_op_error (enum tree_code); +extern void binary_op_error (enum tree_code, tree, tree); extern tree fix_string_type (tree); struct varray_head_tag; extern void constant_expression_warning (tree); Modified: stable/10/contrib/gcc/c-typeck.c ============================================================================== --- stable/10/contrib/gcc/c-typeck.c Fri Dec 27 15:52:18 2013 (r259946) +++ stable/10/contrib/gcc/c-typeck.c Fri Dec 27 16:06:08 2013 (r259947) @@ -1923,7 +1923,7 @@ build_indirect_ref (tree ptr, const char } } else if (TREE_CODE (pointer) != ERROR_MARK) - error ("invalid type argument of %qs", errorstring); + error ("invalid type argument of %qs (have %qT)", errorstring, type); return error_mark_node; } @@ -8135,7 +8135,7 @@ build_binary_op (enum tree_code code, tr || !same_scalar_type_ignoring_signedness (TREE_TYPE (type0), TREE_TYPE (type1)))) { - binary_op_error (code); + binary_op_error (code, type0, type1); return error_mark_node; } @@ -8431,7 +8431,7 @@ build_binary_op (enum tree_code code, tr if (!result_type) { - binary_op_error (code); + binary_op_error (code, TREE_TYPE (op0), TREE_TYPE (op1)); return error_mark_node; } Modified: stable/10/contrib/gcc/config/darwin.h ============================================================================== --- stable/10/contrib/gcc/config/darwin.h Fri Dec 27 15:52:18 2013 (r259946) +++ stable/10/contrib/gcc/config/darwin.h Fri Dec 27 16:06:08 2013 (r259947) @@ -467,6 +467,10 @@ extern GTY(()) int darwin_ms_struct; with names, so it's safe to make the class data not comdat. */ #define TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT hook_bool_void_false +/* For efficiency, on Darwin the RTTI information that is always + emitted in the standard C++ library should not be COMDAT. */ +#define TARGET_CXX_LIBRARY_RTTI_COMDAT hook_bool_void_false + /* We make exception information linkonce. */ #undef TARGET_USES_WEAK_UNWIND_INFO #define TARGET_USES_WEAK_UNWIND_INFO 1 Modified: stable/10/contrib/gcc/cp/ChangeLog.gcc43 ============================================================================== --- stable/10/contrib/gcc/cp/ChangeLog.gcc43 Fri Dec 27 15:52:18 2013 (r259946) +++ stable/10/contrib/gcc/cp/ChangeLog.gcc43 Fri Dec 27 16:06:08 2013 (r259947) @@ -18,6 +18,14 @@ * decl2.c (determine_visibility): Remove duplicate code for handling type info. +2007-05-31 Daniel Berlin (r125239) + + * typeck.c (build_binary_op): Include types in error. + +2007-05-18 Geoffrey Keating (r124839) + + * mangle.c (write_real_cst): Use 'unsigned long' for %lx. + 2007-05-05 Geoffrey Keating (r124467) PR 31775 Modified: stable/10/contrib/gcc/cp/Make-lang.in ============================================================================== --- stable/10/contrib/gcc/cp/Make-lang.in Fri Dec 27 15:52:18 2013 (r259946) +++ stable/10/contrib/gcc/cp/Make-lang.in Fri Dec 27 16:06:08 2013 (r259947) @@ -265,7 +265,7 @@ cp/tree.o: cp/tree.c $(CXX_TREE_H) $(TM_ $(TARGET_H) debug.h cp/ptree.o: cp/ptree.c $(CXX_TREE_H) $(TM_H) cp/rtti.o: cp/rtti.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) toplev.h convert.h \ - gt-cp-rtti.h + $(TARGET_H) gt-cp-rtti.h cp/except.o: cp/except.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) $(RTL_H) except.h \ toplev.h cp/cfns.h $(EXPR_H) libfuncs.h $(TREE_INLINE_H) $(TARGET_H) cp/expr.o: cp/expr.c $(CXX_TREE_H) $(TM_H) $(RTL_H) $(FLAGS_H) $(EXPR_H) \ Modified: stable/10/contrib/gcc/cp/mangle.c ============================================================================== --- stable/10/contrib/gcc/cp/mangle.c Fri Dec 27 15:52:18 2013 (r259946) +++ stable/10/contrib/gcc/cp/mangle.c Fri Dec 27 16:06:08 2013 (r259947) @@ -1340,7 +1340,7 @@ write_real_cst (const tree value) for (; i != limit; i += dir) { - sprintf (buffer, "%08lx", target_real[i]); + sprintf (buffer, "%08lx", (unsigned long) target_real[i]); write_chars (buffer, 8); } } Modified: stable/10/contrib/gcc/cp/rtti.c ============================================================================== --- stable/10/contrib/gcc/cp/rtti.c Fri Dec 27 15:52:18 2013 (r259946) +++ stable/10/contrib/gcc/cp/rtti.c Fri Dec 27 16:06:08 2013 (r259947) @@ -32,6 +32,7 @@ Boston, MA 02110-1301, USA. */ #include "assert.h" #include "toplev.h" #include "convert.h" +#include "target.h" /* C++ returns type information to the user in struct type_info objects. We also use type information to implement dynamic_cast and @@ -1427,8 +1428,11 @@ emit_support_tinfos (void) comdat_linkage for details.) Since we want these objects to have external linkage so that copies do not have to be emitted in code outside the runtime library, we make them - non-COMDAT here. */ - if (!flag_weak) + non-COMDAT here. + + It might also not be necessary to follow this detail of the + ABI. */ + if (!flag_weak || ! targetm.cxx.library_rtti_comdat ()) { gcc_assert (TREE_PUBLIC (tinfo) && !DECL_COMDAT (tinfo)); DECL_INTERFACE_KNOWN (tinfo) = 1; Modified: stable/10/contrib/gcc/cp/typeck.c ============================================================================== --- stable/10/contrib/gcc/cp/typeck.c Fri Dec 27 15:52:18 2013 (r259946) +++ stable/10/contrib/gcc/cp/typeck.c Fri Dec 27 16:06:08 2013 (r259947) @@ -3476,7 +3476,7 @@ build_binary_op (enum tree_code code, tr || !same_scalar_type_ignoring_signedness (TREE_TYPE (type0), TREE_TYPE (type1))) { - binary_op_error (code); + binary_op_error (code, type0, type1); return error_mark_node; } arithmetic_types_p = 1; Modified: stable/10/contrib/gcc/doc/tm.texi ============================================================================== --- stable/10/contrib/gcc/doc/tm.texi Fri Dec 27 15:52:18 2013 (r259946) +++ stable/10/contrib/gcc/doc/tm.texi Fri Dec 27 16:06:08 2013 (r259947) @@ -8953,6 +8953,12 @@ classes whose virtual table will be emit unit will not be COMDAT. @end deftypefn +@deftypefn {Target Hook} bool TARGET_CXX_LIBRARY_RTTI_COMDAT (void) +This hook returns true (the default) if the RTTI information for +the basic types which is defined in the C++ runtime should always +be COMDAT, false if it should not be COMDAT. +@end deftypefn + @deftypefn {Target Hook} bool TARGET_CXX_USE_AEABI_ATEXIT (void) This hook returns true if @code{__aeabi_atexit} (as defined by the ARM EABI) should be used to register static destructors when @option{-fuse-cxa-atexit} Modified: stable/10/contrib/gcc/dwarf2out.c ============================================================================== --- stable/10/contrib/gcc/dwarf2out.c Fri Dec 27 15:52:18 2013 (r259946) +++ stable/10/contrib/gcc/dwarf2out.c Fri Dec 27 16:06:08 2013 (r259947) @@ -5741,11 +5741,11 @@ print_die (dw_die_ref die, FILE *outfile unsigned ix; print_spaces (outfile); - fprintf (outfile, "DIE %4lu: %s\n", + fprintf (outfile, "DIE %4ld: %s\n", die->die_offset, dwarf_tag_name (die->die_tag)); print_spaces (outfile); fprintf (outfile, " abbrev id: %lu", die->die_abbrev); - fprintf (outfile, " offset: %lu\n", die->die_offset); + fprintf (outfile, " offset: %ld\n", die->die_offset); for (ix = 0; VEC_iterate (dw_attr_node, die->die_attr, ix, a); ix++) { @@ -5793,7 +5793,7 @@ print_die (dw_die_ref die, FILE *outfile if (AT_ref (a)->die_symbol) fprintf (outfile, "die -> label: %s", AT_ref (a)->die_symbol); else - fprintf (outfile, "die -> %lu", AT_ref (a)->die_offset); + fprintf (outfile, "die -> %ld", AT_ref (a)->die_offset); } else fprintf (outfile, "die -> "); @@ -7063,7 +7063,8 @@ output_die (dw_die_ref die) output_die_symbol (die); dw2_asm_output_data_uleb128 (die->die_abbrev, "(DIE (0x%lx) %s)", - die->die_offset, dwarf_tag_name (die->die_tag)); + (unsigned long)die->die_offset, + dwarf_tag_name (die->die_tag)); for (ix = 0; VEC_iterate (dw_attr_node, die->die_attr, ix, a); ix++) { @@ -7245,7 +7246,7 @@ output_die (dw_die_ref die) /* Add null byte to terminate sibling list. */ if (die->die_child != NULL) dw2_asm_output_data (1, 0, "end of children of DIE 0x%lx", - die->die_offset); + (unsigned long) die->die_offset); } /* Output the compilation unit that appears at the beginning of the Modified: stable/10/contrib/gcc/sched-vis.c ============================================================================== --- stable/10/contrib/gcc/sched-vis.c Fri Dec 27 15:52:18 2013 (r259946) +++ stable/10/contrib/gcc/sched-vis.c Fri Dec 27 16:06:08 2013 (r259947) @@ -430,7 +430,10 @@ print_value (char *buf, rtx x, int verbo if (FLOAT_MODE_P (GET_MODE (x))) real_to_decimal (t, CONST_DOUBLE_REAL_VALUE (x), sizeof (t), 0, 1); else - sprintf (t, "<0x%lx,0x%lx>", (long) CONST_DOUBLE_LOW (x), (long) CONST_DOUBLE_HIGH (x)); + sprintf (t, + "<" HOST_WIDE_INT_PRINT_HEX "," HOST_WIDE_INT_PRINT_HEX ">", + (unsigned HOST_WIDE_INT) CONST_DOUBLE_LOW (x), + (unsigned HOST_WIDE_INT) CONST_DOUBLE_HIGH (x)); cur = safe_concat (buf, cur, t); break; case CONST_STRING: Modified: stable/10/contrib/gcc/target-def.h ============================================================================== --- stable/10/contrib/gcc/target-def.h Fri Dec 27 15:52:18 2013 (r259946) +++ stable/10/contrib/gcc/target-def.h Fri Dec 27 16:06:08 2013 (r259947) @@ -587,6 +587,10 @@ Foundation, 51 Franklin Street, Fifth Fl #define TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT hook_bool_void_true #endif +#ifndef TARGET_CXX_LIBRARY_RTTI_COMDAT +#define TARGET_CXX_LIBRARY_RTTI_COMDAT hook_bool_void_true +#endif + #ifndef TARGET_CXX_USE_AEABI_ATEXIT #define TARGET_CXX_USE_AEABI_ATEXIT hook_bool_void_false #endif @@ -606,6 +610,7 @@ Foundation, 51 Franklin Street, Fifth Fl TARGET_CXX_KEY_METHOD_MAY_BE_INLINE, \ TARGET_CXX_DETERMINE_CLASS_DATA_VISIBILITY, \ TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT, \ + TARGET_CXX_LIBRARY_RTTI_COMDAT, \ TARGET_CXX_USE_AEABI_ATEXIT, \ TARGET_CXX_ADJUST_CLASS_AT_DEFINITION \ } Modified: stable/10/contrib/gcc/target.h ============================================================================== --- stable/10/contrib/gcc/target.h Fri Dec 27 15:52:18 2013 (r259946) +++ stable/10/contrib/gcc/target.h Fri Dec 27 16:06:08 2013 (r259947) @@ -783,6 +783,10 @@ struct gcc_target class data for classes whose virtual table will be emitted in only one translation unit will not be COMDAT. */ bool (*class_data_always_comdat) (void); + /* Returns true (the default) if the RTTI for the basic types, + which is always defined in the C++ runtime, should be COMDAT; + false if it should not be COMDAT. */ + bool (*library_rtti_comdat) (void); /* Returns true if __aeabi_atexit should be used to register static destructors. */ bool (*use_aeabi_atexit) (void); Modified: stable/10/contrib/gcc/tree-dump.c ============================================================================== --- stable/10/contrib/gcc/tree-dump.c Fri Dec 27 15:52:18 2013 (r259946) +++ stable/10/contrib/gcc/tree-dump.c Fri Dec 27 16:06:08 2013 (r259947) @@ -166,7 +166,7 @@ void dump_pointer (dump_info_p di, const char *field, void *ptr) { dump_maybe_newline (di); - fprintf (di->stream, "%-4s: %-8lx ", field, (long) ptr); + fprintf (di->stream, "%-4s: %-8lx ", field, (unsigned long) ptr); di->column += 15; } From owner-svn-src-stable@FreeBSD.ORG Fri Dec 27 16:08:38 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F29EDA55; Fri, 27 Dec 2013 16:08:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DCBB61A2C; Fri, 27 Dec 2013 16:08:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBRG8buN004854; Fri, 27 Dec 2013 16:08:37 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBRG8YLV004830; Fri, 27 Dec 2013 16:08:34 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312271608.rBRG8YLV004830@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Fri, 27 Dec 2013 16:08: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: r259948 - in stable/9/contrib/gcc: . config cp doc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 16:08:38 -0000 Author: pfg Date: Fri Dec 27 16:08:34 2013 New Revision: 259948 URL: http://svnweb.freebsd.org/changeset/base/259948 Log: gcc: Merge upstream changes. Include types in error message for build_binary_op. Mostly cosmetic changes, to reduce differences with Apple's gcc. Obtained from: gcc 4.3 (rev. 120611, 124839, 125239; GPLv2) Modified: stable/9/contrib/gcc/ChangeLog.gcc43 stable/9/contrib/gcc/c-common.c stable/9/contrib/gcc/c-common.h stable/9/contrib/gcc/c-typeck.c stable/9/contrib/gcc/config/darwin.h stable/9/contrib/gcc/cp/Make-lang.in stable/9/contrib/gcc/cp/mangle.c stable/9/contrib/gcc/cp/rtti.c stable/9/contrib/gcc/cp/typeck.c stable/9/contrib/gcc/doc/tm.texi stable/9/contrib/gcc/dwarf2out.c stable/9/contrib/gcc/sched-vis.c stable/9/contrib/gcc/target-def.h stable/9/contrib/gcc/target.h stable/9/contrib/gcc/tree-dump.c Directory Properties: stable/9/ (props changed) stable/9/contrib/gcc/ (props changed) Modified: stable/9/contrib/gcc/ChangeLog.gcc43 ============================================================================== --- stable/9/contrib/gcc/ChangeLog.gcc43 Fri Dec 27 16:06:08 2013 (r259947) +++ stable/9/contrib/gcc/ChangeLog.gcc43 Fri Dec 27 16:08:34 2013 (r259948) @@ -51,6 +51,14 @@ * doc/extend.texi: Document the 0b-prefixed binary integer constant extension. +2007-05-31 Daniel Berlin (r125239) + + * c-typeck.c (build_indirect_ref): Include type in error message. + (build_binary_op): Pass types to binary_op_error. + * c-common.c (binary_op_error): Take two type arguments, print out + types with error. + * c-common.h (binary_op_error): Update prototype. + 2007-05-27 Eric Christopher (r125116) * config/rs6000/rs6000.c (rs6000_emit_prologue): Update @@ -74,6 +82,14 @@ regs_invalidated_by_call, rather than just checking the membership of REGNO (REG). +2007-05-18 Geoffrey Keating (r124839) + + * dwarf2out.c (print_die): Use '%ld' not '%lu' to print a 'long'. + (output_die): Use 'unsigned long' with %x. + * sched-vis.c (print_value): Use 'unsigned HOST_WIDE_INT' and + HOST_WIDE_INT_PRINT_HEX to print HOST_WIDE_INT. + * tree-dump.c (dump_pointer): Use 'unsigned long' for %lx. + 2007-05-16 Eric Christopher (r124763) * config/rs6000/rs6000.c (rs6000_emit_prologue): Move altivec register @@ -377,6 +393,19 @@ * config.gcc: Support core2 processor. +2007-01-11 Joseph Myers (r120688) + + * c-common.c (vector_types_convertible_p): Treat opaque types as + always convertible if they have the same size, but not otherwise. + +2007-01-08 Geoffrey Keating (r120611) + + * target.h (struct gcc_target): New field library_rtti_comdat. + * target-def.h (TARGET_CXX_LIBRARY_RTTI_COMDAT): New. + (TARGET_CXX): Add TARGET_CXX_LIBRARY_RTTI_COMDAT. + * doc/tm.texi (C++ ABI): Document TARGET_CXX_LIBRARY_RTTI_COMDAT. + * config/darwin.h (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define. + 2007-01-05 Manuel Lopez-Ibanez (r120505) PR c/19978 Modified: stable/9/contrib/gcc/c-common.c ============================================================================== --- stable/9/contrib/gcc/c-common.c Fri Dec 27 16:06:08 2013 (r259947) +++ stable/9/contrib/gcc/c-common.c Fri Dec 27 16:08:34 2013 (r259948) @@ -1988,10 +1988,10 @@ min_precision (tree value, int unsignedp } /* Print an error message for invalid operands to arith operation - CODE. */ + CODE with TYPE0 for operand 0, and TYPE1 for operand 1. */ void -binary_op_error (enum tree_code code) +binary_op_error (enum tree_code code, tree type0, tree type1) { const char *opname; @@ -2042,7 +2042,8 @@ binary_op_error (enum tree_code code) default: gcc_unreachable (); } - error ("invalid operands to binary %s", opname); + error ("invalid operands to binary %s (have %qT and %qT)", opname, + type0, type1); } /* Subroutine of build_binary_op, used for comparison operations. Modified: stable/9/contrib/gcc/c-common.h ============================================================================== --- stable/9/contrib/gcc/c-common.h Fri Dec 27 16:06:08 2013 (r259947) +++ stable/9/contrib/gcc/c-common.h Fri Dec 27 16:08:34 2013 (r259948) @@ -650,7 +650,7 @@ extern tree c_sizeof_or_alignof_type (tr extern tree c_alignof_expr (tree); /* Print an error message for invalid operands to arith operation CODE. NOP_EXPR is used as a special case (see truthvalue_conversion). */ -extern void binary_op_error (enum tree_code); +extern void binary_op_error (enum tree_code, tree, tree); extern tree fix_string_type (tree); struct varray_head_tag; extern void constant_expression_warning (tree); Modified: stable/9/contrib/gcc/c-typeck.c ============================================================================== --- stable/9/contrib/gcc/c-typeck.c Fri Dec 27 16:06:08 2013 (r259947) +++ stable/9/contrib/gcc/c-typeck.c Fri Dec 27 16:08:34 2013 (r259948) @@ -1923,7 +1923,7 @@ build_indirect_ref (tree ptr, const char } } else if (TREE_CODE (pointer) != ERROR_MARK) - error ("invalid type argument of %qs", errorstring); + error ("invalid type argument of %qs (have %qT)", errorstring, type); return error_mark_node; } @@ -8135,7 +8135,7 @@ build_binary_op (enum tree_code code, tr || !same_scalar_type_ignoring_signedness (TREE_TYPE (type0), TREE_TYPE (type1)))) { - binary_op_error (code); + binary_op_error (code, type0, type1); return error_mark_node; } @@ -8431,7 +8431,7 @@ build_binary_op (enum tree_code code, tr if (!result_type) { - binary_op_error (code); + binary_op_error (code, TREE_TYPE (op0), TREE_TYPE (op1)); return error_mark_node; } Modified: stable/9/contrib/gcc/config/darwin.h ============================================================================== --- stable/9/contrib/gcc/config/darwin.h Fri Dec 27 16:06:08 2013 (r259947) +++ stable/9/contrib/gcc/config/darwin.h Fri Dec 27 16:08:34 2013 (r259948) @@ -467,6 +467,10 @@ extern GTY(()) int darwin_ms_struct; with names, so it's safe to make the class data not comdat. */ #define TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT hook_bool_void_false +/* For efficiency, on Darwin the RTTI information that is always + emitted in the standard C++ library should not be COMDAT. */ +#define TARGET_CXX_LIBRARY_RTTI_COMDAT hook_bool_void_false + /* We make exception information linkonce. */ #undef TARGET_USES_WEAK_UNWIND_INFO #define TARGET_USES_WEAK_UNWIND_INFO 1 Modified: stable/9/contrib/gcc/cp/Make-lang.in ============================================================================== --- stable/9/contrib/gcc/cp/Make-lang.in Fri Dec 27 16:06:08 2013 (r259947) +++ stable/9/contrib/gcc/cp/Make-lang.in Fri Dec 27 16:08:34 2013 (r259948) @@ -265,7 +265,7 @@ cp/tree.o: cp/tree.c $(CXX_TREE_H) $(TM_ $(TARGET_H) debug.h cp/ptree.o: cp/ptree.c $(CXX_TREE_H) $(TM_H) cp/rtti.o: cp/rtti.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) toplev.h convert.h \ - gt-cp-rtti.h + $(TARGET_H) gt-cp-rtti.h cp/except.o: cp/except.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) $(RTL_H) except.h \ toplev.h cp/cfns.h $(EXPR_H) libfuncs.h $(TREE_INLINE_H) $(TARGET_H) cp/expr.o: cp/expr.c $(CXX_TREE_H) $(TM_H) $(RTL_H) $(FLAGS_H) $(EXPR_H) \ Modified: stable/9/contrib/gcc/cp/mangle.c ============================================================================== --- stable/9/contrib/gcc/cp/mangle.c Fri Dec 27 16:06:08 2013 (r259947) +++ stable/9/contrib/gcc/cp/mangle.c Fri Dec 27 16:08:34 2013 (r259948) @@ -1340,7 +1340,7 @@ write_real_cst (const tree value) for (; i != limit; i += dir) { - sprintf (buffer, "%08lx", target_real[i]); + sprintf (buffer, "%08lx", (unsigned long) target_real[i]); write_chars (buffer, 8); } } Modified: stable/9/contrib/gcc/cp/rtti.c ============================================================================== --- stable/9/contrib/gcc/cp/rtti.c Fri Dec 27 16:06:08 2013 (r259947) +++ stable/9/contrib/gcc/cp/rtti.c Fri Dec 27 16:08:34 2013 (r259948) @@ -32,6 +32,7 @@ Boston, MA 02110-1301, USA. */ #include "assert.h" #include "toplev.h" #include "convert.h" +#include "target.h" /* C++ returns type information to the user in struct type_info objects. We also use type information to implement dynamic_cast and @@ -1427,8 +1428,11 @@ emit_support_tinfos (void) comdat_linkage for details.) Since we want these objects to have external linkage so that copies do not have to be emitted in code outside the runtime library, we make them - non-COMDAT here. */ - if (!flag_weak) + non-COMDAT here. + + It might also not be necessary to follow this detail of the + ABI. */ + if (!flag_weak || ! targetm.cxx.library_rtti_comdat ()) { gcc_assert (TREE_PUBLIC (tinfo) && !DECL_COMDAT (tinfo)); DECL_INTERFACE_KNOWN (tinfo) = 1; Modified: stable/9/contrib/gcc/cp/typeck.c ============================================================================== --- stable/9/contrib/gcc/cp/typeck.c Fri Dec 27 16:06:08 2013 (r259947) +++ stable/9/contrib/gcc/cp/typeck.c Fri Dec 27 16:08:34 2013 (r259948) @@ -3476,7 +3476,7 @@ build_binary_op (enum tree_code code, tr || !same_scalar_type_ignoring_signedness (TREE_TYPE (type0), TREE_TYPE (type1))) { - binary_op_error (code); + binary_op_error (code, type0, type1); return error_mark_node; } arithmetic_types_p = 1; Modified: stable/9/contrib/gcc/doc/tm.texi ============================================================================== --- stable/9/contrib/gcc/doc/tm.texi Fri Dec 27 16:06:08 2013 (r259947) +++ stable/9/contrib/gcc/doc/tm.texi Fri Dec 27 16:08:34 2013 (r259948) @@ -8953,6 +8953,12 @@ classes whose virtual table will be emit unit will not be COMDAT. @end deftypefn +@deftypefn {Target Hook} bool TARGET_CXX_LIBRARY_RTTI_COMDAT (void) +This hook returns true (the default) if the RTTI information for +the basic types which is defined in the C++ runtime should always +be COMDAT, false if it should not be COMDAT. +@end deftypefn + @deftypefn {Target Hook} bool TARGET_CXX_USE_AEABI_ATEXIT (void) This hook returns true if @code{__aeabi_atexit} (as defined by the ARM EABI) should be used to register static destructors when @option{-fuse-cxa-atexit} Modified: stable/9/contrib/gcc/dwarf2out.c ============================================================================== --- stable/9/contrib/gcc/dwarf2out.c Fri Dec 27 16:06:08 2013 (r259947) +++ stable/9/contrib/gcc/dwarf2out.c Fri Dec 27 16:08:34 2013 (r259948) @@ -5741,11 +5741,11 @@ print_die (dw_die_ref die, FILE *outfile unsigned ix; print_spaces (outfile); - fprintf (outfile, "DIE %4lu: %s\n", + fprintf (outfile, "DIE %4ld: %s\n", die->die_offset, dwarf_tag_name (die->die_tag)); print_spaces (outfile); fprintf (outfile, " abbrev id: %lu", die->die_abbrev); - fprintf (outfile, " offset: %lu\n", die->die_offset); + fprintf (outfile, " offset: %ld\n", die->die_offset); for (ix = 0; VEC_iterate (dw_attr_node, die->die_attr, ix, a); ix++) { @@ -5793,7 +5793,7 @@ print_die (dw_die_ref die, FILE *outfile if (AT_ref (a)->die_symbol) fprintf (outfile, "die -> label: %s", AT_ref (a)->die_symbol); else - fprintf (outfile, "die -> %lu", AT_ref (a)->die_offset); + fprintf (outfile, "die -> %ld", AT_ref (a)->die_offset); } else fprintf (outfile, "die -> "); @@ -7063,7 +7063,8 @@ output_die (dw_die_ref die) output_die_symbol (die); dw2_asm_output_data_uleb128 (die->die_abbrev, "(DIE (0x%lx) %s)", - die->die_offset, dwarf_tag_name (die->die_tag)); + (unsigned long)die->die_offset, + dwarf_tag_name (die->die_tag)); for (ix = 0; VEC_iterate (dw_attr_node, die->die_attr, ix, a); ix++) { @@ -7245,7 +7246,7 @@ output_die (dw_die_ref die) /* Add null byte to terminate sibling list. */ if (die->die_child != NULL) dw2_asm_output_data (1, 0, "end of children of DIE 0x%lx", - die->die_offset); + (unsigned long) die->die_offset); } /* Output the compilation unit that appears at the beginning of the Modified: stable/9/contrib/gcc/sched-vis.c ============================================================================== --- stable/9/contrib/gcc/sched-vis.c Fri Dec 27 16:06:08 2013 (r259947) +++ stable/9/contrib/gcc/sched-vis.c Fri Dec 27 16:08:34 2013 (r259948) @@ -430,7 +430,10 @@ print_value (char *buf, rtx x, int verbo if (FLOAT_MODE_P (GET_MODE (x))) real_to_decimal (t, CONST_DOUBLE_REAL_VALUE (x), sizeof (t), 0, 1); else - sprintf (t, "<0x%lx,0x%lx>", (long) CONST_DOUBLE_LOW (x), (long) CONST_DOUBLE_HIGH (x)); + sprintf (t, + "<" HOST_WIDE_INT_PRINT_HEX "," HOST_WIDE_INT_PRINT_HEX ">", + (unsigned HOST_WIDE_INT) CONST_DOUBLE_LOW (x), + (unsigned HOST_WIDE_INT) CONST_DOUBLE_HIGH (x)); cur = safe_concat (buf, cur, t); break; case CONST_STRING: Modified: stable/9/contrib/gcc/target-def.h ============================================================================== --- stable/9/contrib/gcc/target-def.h Fri Dec 27 16:06:08 2013 (r259947) +++ stable/9/contrib/gcc/target-def.h Fri Dec 27 16:08:34 2013 (r259948) @@ -587,6 +587,10 @@ Foundation, 51 Franklin Street, Fifth Fl #define TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT hook_bool_void_true #endif +#ifndef TARGET_CXX_LIBRARY_RTTI_COMDAT +#define TARGET_CXX_LIBRARY_RTTI_COMDAT hook_bool_void_true +#endif + #ifndef TARGET_CXX_USE_AEABI_ATEXIT #define TARGET_CXX_USE_AEABI_ATEXIT hook_bool_void_false #endif @@ -606,6 +610,7 @@ Foundation, 51 Franklin Street, Fifth Fl TARGET_CXX_KEY_METHOD_MAY_BE_INLINE, \ TARGET_CXX_DETERMINE_CLASS_DATA_VISIBILITY, \ TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT, \ + TARGET_CXX_LIBRARY_RTTI_COMDAT, \ TARGET_CXX_USE_AEABI_ATEXIT, \ TARGET_CXX_ADJUST_CLASS_AT_DEFINITION \ } Modified: stable/9/contrib/gcc/target.h ============================================================================== --- stable/9/contrib/gcc/target.h Fri Dec 27 16:06:08 2013 (r259947) +++ stable/9/contrib/gcc/target.h Fri Dec 27 16:08:34 2013 (r259948) @@ -783,6 +783,10 @@ struct gcc_target class data for classes whose virtual table will be emitted in only one translation unit will not be COMDAT. */ bool (*class_data_always_comdat) (void); + /* Returns true (the default) if the RTTI for the basic types, + which is always defined in the C++ runtime, should be COMDAT; + false if it should not be COMDAT. */ + bool (*library_rtti_comdat) (void); /* Returns true if __aeabi_atexit should be used to register static destructors. */ bool (*use_aeabi_atexit) (void); Modified: stable/9/contrib/gcc/tree-dump.c ============================================================================== --- stable/9/contrib/gcc/tree-dump.c Fri Dec 27 16:06:08 2013 (r259947) +++ stable/9/contrib/gcc/tree-dump.c Fri Dec 27 16:08:34 2013 (r259948) @@ -166,7 +166,7 @@ void dump_pointer (dump_info_p di, const char *field, void *ptr) { dump_maybe_newline (di); - fprintf (di->stream, "%-4s: %-8lx ", field, (long) ptr); + fprintf (di->stream, "%-4s: %-8lx ", field, (unsigned long) ptr); di->column += 15; } From owner-svn-src-stable@FreeBSD.ORG Fri Dec 27 16:20:18 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53651C8 for ; Fri, 27 Dec 2013 16:20:18 +0000 (UTC) Received: from nm9-vm0.bullet.mail.bf1.yahoo.com (nm9-vm0.bullet.mail.bf1.yahoo.com [98.139.213.154]) by mx1.freebsd.org (Postfix) with SMTP id BAFC71B3C for ; Fri, 27 Dec 2013 16:20:17 +0000 (UTC) Received: from [66.196.81.170] by nm9.bullet.mail.bf1.yahoo.com with NNFMP; 27 Dec 2013 16:13:21 -0000 Received: from [98.139.213.13] by tm16.bullet.mail.bf1.yahoo.com with NNFMP; 27 Dec 2013 16:13:21 -0000 Received: from [127.0.0.1] by smtp113.mail.bf1.yahoo.com with NNFMP; 27 Dec 2013 16:13:21 -0000 X-Yahoo-Newman-Id: 10052.9577.bm@smtp113.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: VnD1CHUVM1lbh9djZIP3UCl2nH0C5CHJT8oaP8ooglgOZvp Mp0XIJ5NUgjIPm02Opd64Me2ReDL17oPxa6ZUprNmaPnAI0j0BYJ.CVji5MR bkRVQk5vwS2si2GB98Bg6rC6jMezbvWM_REAyJiPUMscUTH7ON5XaSwg2kSK 8lilbNfsaMwmXN33WY9jn52pvFNufcG9Ykohw_NnJTU8UPtlO7herKII2iH. CAwdYsnIeC7Fq.rQiLzqkheCCKNT_vdRAdnSjjO._zwBuGX93DuOAL51P.P0 36S.MjQUAowMNurigfJhj9kd5ieTEDdcUz1F2fb7T_zaB2vFbv3drhS1PF4m mUbkGkhmdX03v93Nogn7_2OlQeUKeVaX63puB7OjiMmMjCxVzzGKaxPZKRsU W4DO.msVUfvw.b55u75Z.EyuZ21l11hHqvfdpDQdeGpJZBbtKkFRAgV2_swM HyPAAPMo8_iGdDyXnEzEPfkHBXNiS5gQJbTf3m9e4ZtGMolPuSk9jcZVcxwB vTK.g90cGjPA.A2TJZtyZUNEUVPzDLtF7GUU.jkOxKCulKY7KD70j4mnH7Ax dLLiunf0hSTI8KaMRb0MUrgCaSQ7wkc.sXAR0HvWiXgg5lt738iU.t.DtNWd adCGNM117uSHwZNYu03NCkR0Zt0Z4Jypuq51uVFA7SzdEO238xadUxV76DuG k_z9enXdpcSE- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf X-Rocket-Received: from [192.168.0.102] (pfg@190.157.126.109 with plain [98.138.105.21]) by smtp113.mail.bf1.yahoo.com with SMTP; 27 Dec 2013 08:13:20 -0800 PST Message-ID: <52BDA71D.7060209@FreeBSD.org> Date: Fri, 27 Dec 2013 11:13:17 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r259947 - in stable/10/contrib/gcc: . config cp doc References: <201312271606.rBRG68ed004465@svn.freebsd.org> In-Reply-To: <201312271606.rBRG68ed004465@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 16:20:18 -0000 On 27.12.2013 11:06, Pedro F. Giffuni wrote: > Author: pfg > Date: Fri Dec 27 16:06:08 2013 > New Revision: 259947 > URL: http://svnweb.freebsd.org/changeset/base/259947 > > Log: > gcc: Merge upstream changes. > > Include types in error message for build_binary_op. > > Mostly cosmetic changes, to reduce differences with Apple's gcc. > > Obtained from: gcc 4.3 (rev. 120611, 124839, 125239; GPLv2) > > Modified: > stable/10/contrib/gcc/ChangeLog.gcc43 > stable/10/contrib/gcc/c-common.c > stable/10/contrib/gcc/c-common.h > stable/10/contrib/gcc/c-typeck.c > stable/10/contrib/gcc/config/darwin.h > stable/10/contrib/gcc/cp/ChangeLog.gcc43 > stable/10/contrib/gcc/cp/Make-lang.in > stable/10/contrib/gcc/cp/mangle.c > stable/10/contrib/gcc/cp/rtti.c > stable/10/contrib/gcc/cp/typeck.c > stable/10/contrib/gcc/doc/tm.texi > stable/10/contrib/gcc/dwarf2out.c > stable/10/contrib/gcc/sched-vis.c > stable/10/contrib/gcc/target-def.h > stable/10/contrib/gcc/target.h > stable/10/contrib/gcc/tree-dump.c > Directory Properties: > stable/10/ (props changed) > > For the record: The log should have said: MFC r259022, r259649 From owner-svn-src-stable@FreeBSD.ORG Fri Dec 27 17:32:48 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D4E2BCB5; Fri, 27 Dec 2013 17:32:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C01361149; Fri, 27 Dec 2013 17:32:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBRHWmNc039168; Fri, 27 Dec 2013 17:32:48 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBRHWmg0039167; Fri, 27 Dec 2013 17:32:48 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312271732.rBRHWmg0039167@svn.freebsd.org> From: Glen Barber Date: Fri, 27 Dec 2013 17:32:48 +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: r259954 - stable/9/release X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 17:32:48 -0000 Author: gjb Date: Fri Dec 27 17:32:48 2013 New Revision: 259954 URL: http://svnweb.freebsd.org/changeset/base/259954 Log: MFC r254298: Remove get_rev_branch(), functionality exists in the release/Makefile. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/release.sh Directory Properties: stable/9/release/ (props changed) Modified: stable/9/release/release.sh ============================================================================== --- stable/9/release/release.sh Fri Dec 27 17:09:59 2013 (r259953) +++ stable/9/release/release.sh Fri Dec 27 17:32:48 2013 (r259954) @@ -81,17 +81,6 @@ NOPORTS= # Set to non-empty value to build dvd1.iso as part of the release. WITH_DVD= -get_rev_branch () { - # Set up the OSVERSION, BRANCH, and REVISION based on the src/ tree - # checked out. - OSVERSION=$(grep '#define __FreeBSD_version' ${CHROOTDIR}/usr/src/sys/sys/param.h | awk '{print $3}') - BRANCH=$(grep '^BRANCH=' ${CHROOTDIR}/usr/src/sys/conf/newvers.sh \ - | awk -F\= '{print $2}' | sed -e 's,",,g') - REVISION=$(grep '^REVISION=' ${CHROOTDIR}/usr/src/sys/conf/newvers.sh \ - | awk -F\= '{print $2}' | sed -e 's,",,g') - OSRELEASE="${REVISION}-${BRANCH}" -} - usage() { echo "Usage: $0 [-c release.conf]" exit 1 @@ -175,8 +164,6 @@ if [ "x${NOPORTS}" = "x" ]; then svn co ${SVNROOT}/${PORTBRANCH} ${CHROOTDIR}/usr/ports $PORTREVISION fi -get_rev_branch - cp /etc/resolv.conf ${CHROOTDIR}/etc/resolv.conf cd ${CHROOTDIR}/usr/src make ${CHROOT_WMAKEFLAGS} buildworld From owner-svn-src-stable@FreeBSD.ORG Fri Dec 27 19:53:45 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F774E04; Fri, 27 Dec 2013 19:53: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EDF871AB3; Fri, 27 Dec 2013 19:53:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBRJriwE093425; Fri, 27 Dec 2013 19:53:44 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBRJrhiJ093416; Fri, 27 Dec 2013 19:53:43 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201312271953.rBRJrhiJ093416@svn.freebsd.org> From: John Baldwin Date: Fri, 27 Dec 2013 19:53:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259960 - in stable/10: tools/regression/usr.sbin/etcupdate usr.sbin/etcupdate X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 19:53:45 -0000 Author: jhb Date: Fri Dec 27 19:53:42 2013 New Revision: 259960 URL: http://svnweb.freebsd.org/changeset/base/259960 Log: MFC 258063,258064,258066,258097,258185,259134: - Add an -s option to the regression tests that specifies a path to an alternate etcupdate.sh script to test. This allows a non-installed version of the script to be tested more easily. - Add a pre-world mode of updating similar to the -p option that can be passed to mergemaster. - Fix a couple of issues with -F: - Fix ALWAYS_INSTALL to take precedence over the FreeBSD ID checks. - Fix the -F option in the case that the only upstream change is a change in the FreeBSD ID and the local file is removed. - Refresh /etc/localtime after each update using tzsetup -r. - Regenerate /var/db/services.db when /etc/services changes. Added: stable/10/tools/regression/usr.sbin/etcupdate/preworld.sh - copied, changed from r258066, head/tools/regression/usr.sbin/etcupdate/preworld.sh stable/10/tools/regression/usr.sbin/etcupdate/tzsetup.sh - copied unchanged from r259134, head/tools/regression/usr.sbin/etcupdate/tzsetup.sh Modified: stable/10/tools/regression/usr.sbin/etcupdate/always.sh stable/10/tools/regression/usr.sbin/etcupdate/conflicts.sh stable/10/tools/regression/usr.sbin/etcupdate/fbsdid.sh stable/10/tools/regression/usr.sbin/etcupdate/ignore.sh stable/10/tools/regression/usr.sbin/etcupdate/tests.sh stable/10/usr.sbin/etcupdate/etcupdate.8 stable/10/usr.sbin/etcupdate/etcupdate.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/regression/usr.sbin/etcupdate/always.sh ============================================================================== --- stable/10/tools/regression/usr.sbin/etcupdate/always.sh Fri Dec 27 19:51:17 2013 (r259959) +++ stable/10/tools/regression/usr.sbin/etcupdate/always.sh Fri Dec 27 19:53:42 2013 (r259960) @@ -33,13 +33,17 @@ WORKDIR=work usage() { - echo "Usage: always.sh [-w workdir]" + echo "Usage: always.sh [-s script] [-w workdir]" exit 1 } -# Allow the user to specify an alternate work directory. -while getopts "w:" option; do +# Allow the user to specify an alternate work directory or script. +COMMAND=etcupdate +while getopts "s:w:" option; do case $option in + s) + COMMAND="sh $OPTARG" + ;; w) WORKDIR=$OPTARG ;; @@ -372,7 +376,7 @@ fi build_trees -etcupdate -r -d $WORKDIR -D $TEST > $WORKDIR/test.out +$COMMAND -r -d $WORKDIR -D $TEST > $WORKDIR/test.out cat > $WORKDIR/correct.out < \ +$COMMAND -r -A '/first*' -A '/second* /*di*' -d $WORKDIR -D $TEST > \ $WORKDIR/test1.out cat > $WORKDIR/correct1.out </dev/null + $COMMAND -r -d $WORKDIR -D $TEST >/dev/null } # This is used to verify special handling for /etc/mail/aliases and @@ -122,7 +126,7 @@ MAILER-DAEMON: postmaster postmaster: foo EOF - etcupdate -r -d $WORKDIR -D $TEST >/dev/null + $COMMAND -r -d $WORKDIR -D $TEST >/dev/null } # $1 - relative path to file that should be missing from TEST @@ -201,7 +205,7 @@ build_login_conflict # Verify that 'p' doesn't do anything. echo "Checking 'p':" -echo 'p' | etcupdate resolve -d $WORKDIR -D $TEST >/dev/null +echo 'p' | $COMMAND resolve -d $WORKDIR -D $TEST >/dev/null file /etc/login.conf "" 95de92ea3f1bb1bf4f612a8b5908cddd missing /etc/login.conf.db @@ -209,7 +213,7 @@ conflict /etc/login.conf # Verify that 'mf' removes the conflict, but does nothing else. echo "Checking 'mf':" -echo 'mf' | etcupdate resolve -d $WORKDIR -D $TEST >/dev/null +echo 'mf' | $COMMAND resolve -d $WORKDIR -D $TEST >/dev/null file /etc/login.conf "" 95de92ea3f1bb1bf4f612a8b5908cddd missing /etc/login.conf.db @@ -219,7 +223,7 @@ build_login_conflict # Verify that 'tf' installs the new version of the file. echo "Checking 'tf':" -echo 'tf' | etcupdate resolve -d $WORKDIR -D $TEST >/dev/null +echo 'tf' | $COMMAND resolve -d $WORKDIR -D $TEST >/dev/null file /etc/login.conf "" 7774a0f9a3a372c7c109c32fd31c4b6b file /etc/login.conf.db @@ -238,7 +242,7 @@ default:\\ :welcome=/etc/motd: EOF -echo 'r' | etcupdate resolve -d $WORKDIR -D $TEST >/dev/null +echo 'r' | $COMMAND resolve -d $WORKDIR -D $TEST >/dev/null file /etc/login.conf "" 966e25984b9b63da8eaac8479dcb0d4d file /etc/login.conf.db @@ -248,12 +252,12 @@ build_aliases_conflict # Verify that 'p' and 'mf' do not generate the newaliases warning. echo "Checking newalias warning for 'p'": -echo 'p' | etcupdate resolve -d $WORKDIR -D $TEST | grep -q newalias +echo 'p' | $COMMAND resolve -d $WORKDIR -D $TEST | grep -q newalias if [ $? -eq 0 ]; then echo "+ Extra warning" fi echo "Checking newalias warning for 'mf'": -echo 'mf' | etcupdate resolve -d $WORKDIR -D $TEST | grep -q newalias +echo 'mf' | $COMMAND resolve -d $WORKDIR -D $TEST | grep -q newalias if [ $? -eq 0 ]; then echo "+ Extra warning" fi @@ -261,14 +265,14 @@ fi # Verify that 'tf' and 'r' do generate the newaliases warning. build_aliases_conflict echo "Checking newalias warning for 'tf'": -echo 'tf' | etcupdate resolve -d $WORKDIR -D $TEST | grep -q newalias +echo 'tf' | $COMMAND resolve -d $WORKDIR -D $TEST | grep -q newalias if [ $? -ne 0 ]; then echo "- Missing warning" fi build_aliases_conflict cp $TEST/etc/mail/aliases $CONFLICTS/etc/mail/aliases -echo 'r' | etcupdate resolve -d $WORKDIR -D $TEST | grep -q newalias +echo 'r' | $COMMAND resolve -d $WORKDIR -D $TEST | grep -q newalias if [ $? -ne 0 ]; then echo "- Missing warning" fi Modified: stable/10/tools/regression/usr.sbin/etcupdate/fbsdid.sh ============================================================================== --- stable/10/tools/regression/usr.sbin/etcupdate/fbsdid.sh Fri Dec 27 19:51:17 2013 (r259959) +++ stable/10/tools/regression/usr.sbin/etcupdate/fbsdid.sh Fri Dec 27 19:53:42 2013 (r259960) @@ -33,13 +33,17 @@ WORKDIR=work usage() { - echo "Usage: fbsdid.sh [-w workdir]" + echo "Usage: fbsdid.sh [-s script] [-w workdir]" exit 1 } -# Allow the user to specify an alternate work directory. -while getopts "w:" option; do +# Allow the user to specify an alternate work directory or script. +COMMAND=etcupdate +while getopts "s:w:" option; do case $option in + s) + COMMAND="sh $OPTARG" + ;; w) WORKDIR=$OPTARG ;; @@ -191,6 +195,17 @@ EOF these are some local mods to the file EOF + + # local-remove: A file removed locally changed it's FreeBSD ID + # but nothing else + store_id $OLD/local-remove ": head/local-remove 12000 jhb " + store_id $NEW/local-remove ": head/local-remove 12345 jhb " + for i in $OLD $NEW; do + cat >> $i/local-remove < $WORKDIR/test.out +$COMMAND -r -d $WORKDIR -D $TEST > $WORKDIR/test.out cat > $WORKDIR/correct.out < $WORKDIR/correct.out < $WORKDIR/testF.out +$COMMAND -rF -d $WORKDIR -D $TEST > $WORKDIR/testF.out cat > $WORKDIR/correctF.out < $WORKDIR/testAF.out + +cat > $WORKDIR/correctAF.out < $WORKDIR/test.out +$COMMAND -r -d $WORKDIR -D $TEST > $WORKDIR/test.out cat > $WORKDIR/correct.out < $WORKDIR/test1.out +$COMMAND -r -I '/tree/*' -d $WORKDIR -D $TEST > $WORKDIR/test1.out cat > $WORKDIR/correct1.out < \ +$COMMAND -r -I '/tree/*' -I '/rmdir*' -d $WORKDIR -D $TEST > \ $WORKDIR/test2.out cat > $WORKDIR/correct2.out < \ +$COMMAND -r -I '/tree/* /rmdir/*' -d $WORKDIR -D $TEST > \ $WORKDIR/test3.out cat > $WORKDIR/correct3.out < $OLD/etc/services < $NEW/etc/services < $WORKDIR/testn.out +$COMMAND -nr -d $WORKDIR -D $TEST > $WORKDIR/testn.out cat > $WORKDIR/correct.out < $WORKDIR/correct.out < $WORKDIR/test.out +$COMMAND -r -d $WORKDIR -D $TEST > $WORKDIR/test.out echo "Differences for real:" diff -u -L "correct" $WORKDIR/correct.out -L "test" $WORKDIR/test.out Copied: stable/10/tools/regression/usr.sbin/etcupdate/tzsetup.sh (from r259134, head/tools/regression/usr.sbin/etcupdate/tzsetup.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/regression/usr.sbin/etcupdate/tzsetup.sh Fri Dec 27 19:53:42 2013 (r259960, copy of r259134, head/tools/regression/usr.sbin/etcupdate/tzsetup.sh) @@ -0,0 +1,221 @@ +#!/bin/sh +# +# Copyright (c) 2013 Advanced Computing Technologies LLC +# Written by: John H. Baldwin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +# Various regression tests for the tzsetup handling in the 'update' command. + +WORKDIR=work + +usage() +{ + echo "Usage: tzsetup.sh [-s script] [-w workdir]" + exit 1 +} + +# Allow the user to specify an alternate work directory or script. +COMMAND=etcupdate +while getopts "s:w:" option; do + case $option in + s) + COMMAND="sh $OPTARG" + ;; + w) + WORKDIR=$OPTARG + ;; + *) + echo + usage + ;; + esac +done +shift $((OPTIND - 1)) +if [ $# -ne 0 ]; then + usage +fi + +CONFLICTS=$WORKDIR/conflicts +OLD=$WORKDIR/old +NEW=$WORKDIR/current +TEST=$WORKDIR/test + +build_trees() +{ + + # Build the base tree, but not /etc/localtime itself + local i j k + + rm -rf $OLD $NEW $TEST $CONFLICTS + mkdir -p $OLD $NEW $TEST + mkdir -p $TEST/etc + mkdir -p $TEST/var/db + mkdir -p $TEST/usr/share/zoneinfo + + # Create a dummy timezone file + echo "foo" > $TEST/usr/share/zoneinfo/foo + +} + +# $1 - relative path to file that should be missing from TEST +missing() +{ + if [ -e $TEST/$1 -o -L $TEST/$1 ]; then + echo "File $1 should be missing" + fi +} + +# $1 - relative path to file that should be a symlink in TEST +# $2 - optional value of the link +link() +{ + local val + + if ! [ -L $TEST/$1 ]; then + echo "File $1 should be a link" + elif [ $# -gt 1 ]; then + val=`readlink $TEST/$1` + if [ "$val" != "$2" ]; then + echo "Link $1 should link to \"$2\"" + fi + fi +} + +# $1 - relative path to regular file that should be present in TEST +# $2 - optional string that should match file contents +# $3 - optional MD5 of the flie contents, overrides $2 if present +file() +{ + local contents sum + + if ! [ -f $TEST/$1 ]; then + echo "File $1 should be a regular file" + elif [ $# -eq 2 ]; then + contents=`cat $TEST/$1` + if [ "$contents" != "$2" ]; then + echo "File $1 has wrong contents" + fi + elif [ $# -eq 3 ]; then + sum=`md5 -q $TEST/$1` + if [ "$sum" != "$3" ]; then + echo "File $1 has wrong contents" + fi + fi +} + +if [ `id -u` -ne 0 ]; then + echo "must be root" +fi + +if [ -r /etc/etcupdate.conf ]; then + echo "WARNING: /etc/etcupdate.conf settings may break some tests." +fi + +# First, test for /etc/localtime not existing + +build_trees + +$COMMAND -nr -d $WORKDIR -D $TEST > $WORKDIR/testn.out + +cat > $WORKDIR/correct.out < $WORKDIR/test.out + +echo "Differences for no /etc/localtime:" +diff -u -L "correct" $WORKDIR/correct.out -L "test" $WORKDIR/test.out + +missing /etc/localtime +missing /var/db/zoneinfo + +# Second, test for /etc/localtime being a symlink + +build_trees +ln -s /dev/null $TEST/etc/localtime + +$COMMAND -nr -d $WORKDIR -D $TEST > $WORKDIR/testn.out + +cat > $WORKDIR/correct.out < $WORKDIR/test.out + +echo "Differences for symlinked /etc/localtime:" +diff -u -L "correct" $WORKDIR/correct.out -L "test" $WORKDIR/test.out + +link /etc/localtime "/dev/null" +missing /var/db/zoneinfo + +# Third, test for /etc/localtime as a file and a missing /var/db/zoneinfo + +build_trees +echo "bar" > $TEST/etc/localtime + +$COMMAND -nr -d $WORKDIR -D $TEST > $WORKDIR/testn.out + +cat > $WORKDIR/correct.out < $WORKDIR/test.out + +echo "Differences for missing /var/db/zoneinfo:" +diff -u -L "correct" $WORKDIR/correct.out -L "test" $WORKDIR/test.out + +file /etc/localtime "bar" +missing /var/db/zoneinfo + +# Finally, test the case where it should update /etc/localtime + +build_trees +echo "bar" > $TEST/etc/localtime +echo "foo" > $TEST/var/db/zoneinfo + +$COMMAND -nr -d $WORKDIR -D $TEST > $WORKDIR/testn.out + +cat > $WORKDIR/correct.out < $WORKDIR/test.out + +echo "Differences for real update:" +diff -u -L "correct" $WORKDIR/correct.out -L "test" $WORKDIR/test.out + +file /etc/localtime "foo" +file /var/db/zoneinfo "foo" Modified: stable/10/usr.sbin/etcupdate/etcupdate.8 ============================================================================== --- stable/10/usr.sbin/etcupdate/etcupdate.8 Fri Dec 27 19:51:17 2013 (r259959) +++ stable/10/usr.sbin/etcupdate/etcupdate.8 Fri Dec 27 19:53:42 2013 (r259960) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2010-2012 Advanced Computing Technologies LLC +.\" Copyright (c) 2010-2013 Advanced Computing Technologies LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 16, 2012 +.Dd December 9, 2013 .Dt ETCUPDATE 8 .Os .Sh NAME @@ -33,7 +33,7 @@ .Nd "manage updates to system files not updated by installworld" .Sh SYNOPSIS .Nm -.Op Fl nBF +.Op Fl npBF .Op Fl d Ar workdir .Op Fl r | Fl s Ar source | Fl t Ar tarball .Op Fl A Ar patterns @@ -64,6 +64,7 @@ .Op Fl M Ar options .Nm .Cm resolve +.Op Fl p .Op Fl d Ar workdir .Op Fl D Ar destdir .Op Fl L Ar logfile @@ -342,27 +343,7 @@ then nothing will be output. .Sh OPTIONS The following options are available. Note that most options do not apply to all modes. -.Bl -tag -width ".Fl d Ar workdir" -.It Fl B -Do not build generated files in a private object tree. -Instead, -reuse the generated files from a previously built object tree that matches -the source tree. -This can be useful to avoid gratuitous conflicts in -.Xr sendmail 8 -configuration -files when bootstrapping. -It can also be useful for building a tarball that matches a specific -world build. -.It Fl d Ar workdir -Specify an alternate directory to use as the work directory. -The work directory is used to store the -.Dq current -and -.Dq previous -trees as well as unresolved conflicts. -The default work directory is -.Pa /var/db/etcupdate . +.Bl -tag -width ".Fl A Ar patterns" .It Fl A Ar patterns Always install the new version of any files that match any of the patterns listed in @@ -378,6 +359,17 @@ Note that ignored files specified via th variable or the .Fl I option will not be installed. +.It Fl B +Do not build generated files in a private object tree. +Instead, +reuse the generated files from a previously built object tree that matches +the source tree. +This can be useful to avoid gratuitous conflicts in +.Xr sendmail 8 +configuration +files when bootstrapping. +It can also be useful for building a tarball that matches a specific +world build. .It Fl D Ar destdir Specify an alternate destination directory as the target of a merge. This is analogous to the @@ -388,6 +380,15 @@ The default destination directory is an merges updating .Pa /etc on the local machine. +.It Fl d Ar workdir +Specify an alternate directory to use as the work directory. +The work directory is used to store the +.Dq current +and +.Dq previous +trees as well as unresolved conflicts. +The default work directory is +.Pa /var/db/etcupdate . .It Fl F Ignore changes in the FreeBSD ID string when comparing files in the destination directory to files in either of the @@ -481,6 +482,33 @@ option is not specified, then a temporary .Dq current tree will be extracted to perform the comparison. +.It Fl p +Enable +.Dq pre-world +mode. +Only merge changes to files that are necessary to successfully run +.Sq make installworld +or +.Sq make installkernel . +When this flag is enabled, +the existing +.Dq current +and +.Dq previous +trees are left alone. +Instead, +a temporary tree is populated with the necessary files. +This temporary tree is compared against the +.Dq current +tree. +This allows a normal update to be run after +.Sq make installworld +has completed. +Any conflicts generated during a +.Dq pre-world +update should be resolved by a +.Dq pre-world +.Cm resolve . .It Fl r Do not update the .Dq current @@ -667,6 +695,25 @@ has been removed from the tree, but it has been locally modified. The modified version of the file remains in the destination directory. +.It "Needs update: /etc/localtime (required manual update via tzsetup(1))" +The +.Fa /var/db/zoneinfo +file does not exist, +so +.Nm +was not able to refresh +.Fa /etc/localtime +from its source file in +.Fa /usr/share/zoneinfo . +Running +.Xr tzsetup 1 +will both refresh +.Fa /etc/localtime +and generate +.Fa /var/db/zoneinfo +permitting future updates to refresh +.Fa /etc/localtime +automatically. .It "Needs update: /etc/mail/aliases.db (required manual update via newaliases(1))" The file .Pa /etc/mail/aliases Modified: stable/10/usr.sbin/etcupdate/etcupdate.sh ============================================================================== --- stable/10/usr.sbin/etcupdate/etcupdate.sh Fri Dec 27 19:51:17 2013 (r259959) +++ stable/10/usr.sbin/etcupdate/etcupdate.sh Fri Dec 27 19:53:42 2013 (r259960) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010-2013 Advanced Computing Technologies LLC # Written by: John H. Baldwin # All rights reserved. # @@ -61,14 +61,15 @@ usage() { cat < etcupdate diff [-d workdir] [-D destdir] [-I patterns] [-L logfile] etcupdate extract [-B] [-d workdir] [-s source | -t tarball] [-L logfile] [-M options] - etcupdate resolve [-d workdir] [-D destdir] [-L logfile] + etcupdate resolve [-p] [-d workdir] [-D destdir] [-L logfile] etcupdate status [-d workdir] [-D destdir] EOF exit 1 @@ -181,22 +182,31 @@ always_install() # $1 - directory to store new tree in build_tree() { - local make + local destdir dir file make make="make $MAKE_OPTIONS" log "Building tree at $1 with $make" mkdir -p $1/usr/obj >&3 2>&1 - (cd $SRCDIR; $make DESTDIR=$1 distrib-dirs) >&3 2>&1 || return 1 + destdir=`realpath $1` - if ! [ -n "$nobuild" ]; then - (cd $SRCDIR; \ - MAKEOBJDIRPREFIX=$1/usr/obj $make _obj SUBDIR_OVERRIDE=etc && - MAKEOBJDIRPREFIX=$1/usr/obj $make everything SUBDIR_OVERRIDE=etc && - MAKEOBJDIRPREFIX=$1/usr/obj $make DESTDIR=$1 distribution) \ + if [ -n "$preworld" ]; then + # Build a limited tree that only contains files that are + # crucial to installworld. + for file in $PREWORLD_FILES; do + dir=`dirname /$file` + mkdir -p $1/$dir >&3 2>&1 || return 1 + cp -p $SRCDIR/$file $1/$file || return 1 + done + elif ! [ -n "$nobuild" ]; then + (cd $SRCDIR; $make DESTDIR=$destdir distrib-dirs && + MAKEOBJDIRPREFIX=$destdir/usr/obj $make _obj SUBDIR_OVERRIDE=etc && + MAKEOBJDIRPREFIX=$destdir/usr/obj $make everything SUBDIR_OVERRIDE=etc && + MAKEOBJDIRPREFIX=$destdir/usr/obj $make DESTDIR=$destdir distribution) \ >&3 2>&1 || return 1 else - (cd $SRCDIR; $make DESTDIR=$1 distribution) >&3 2>&1 || return 1 + (cd $SRCDIR; $make DESTDIR=$destdir distrib-dirs && + $make DESTDIR=$destdir distribution) >&3 2>&1 || return 1 fi chflags -R noschg $1 >&3 2>&1 || return 1 rm -rf $1/usr/obj >&3 2>&1 || return 1 @@ -218,9 +228,15 @@ build_tree() # source tree. extract_tree() { + local files + # If we have a tarball, extract that into the new directory. if [ -n "$tarball" ]; then - if ! (mkdir -p $NEWTREE && tar xf $tarball -C $NEWTREE) \ + files= + if [ -n "$preworld" ]; then + files="$PREWORLD_FILES" + fi + if ! (mkdir -p $NEWTREE && tar xf $tarball -C $NEWTREE $files) \ >&3 2>&1; then echo "Failed to extract new tree." remove_tree $NEWTREE @@ -470,6 +486,39 @@ diffnode() esac } +# Run one-off commands after an update has completed. These commands +# are not tied to a specific file, so they cannot be handled by +# post_install_file(). +post_update() +{ + local args + + # None of these commands should be run for a pre-world update. + if [ -n "$preworld" ]; then + return + fi + + # If /etc/localtime exists and is not a symlink and /var/db/zoneinfo + # exists, run tzsetup -r to refresh /etc/localtime. + if [ -f ${DESTDIR}/etc/localtime -a \ + ! -L ${DESTDIR}/etc/localtime ]; then + if [ -f ${DESTDIR}/var/db/zoneinfo ]; then + if [ -n "${DESTDIR}" ]; then + args="-C ${DESTDIR}" + else + args="" + fi + log "tzsetup -r ${args}" + if [ -z "$dryrun" ]; then + tzsetup -r ${args} >&3 2>&1 + fi + else + warn "Needs update: /etc/localtime (required" \ + "manual update via tzsetup(1))" + fi + fi +} + # Create missing parent directories of a node in a target tree # preserving the owner, group, and permissions from a specified # template tree. @@ -567,6 +616,14 @@ post_install_file() fi fi ;; + /etc/services) + log "services_mkdb -q -o $DESTDIR/var/db/services.db" \ + "${DESTDIR}$1" + if [ -z "$dryrun" ]; then + services_mkdb -q -o $DESTDIR/var/db/services.db \ + ${DESTDIR}$1 >&3 2>&1 + fi + ;; esac } @@ -1010,16 +1067,6 @@ handle_modified_file() fi fi - # If the only change in the new file versus the old file is a - # change in the FreeBSD ID string and -F is specified, just - # update the FreeBSD ID string in the local file. - if [ -n "$FREEBSD_ID" -a $cmp -eq $COMPARE_DIFFFILES ] && \ - fbsdid_only $OLDTREE/$file $NEWTREE/$file; then - if update_freebsdid $file; then - continue - fi - fi - # If the file was removed from the dest tree, just whine. if [ $newdestcmp -eq $COMPARE_ONLYFIRST ]; then # If the removed file matches an ALWAYS_INSTALL glob, @@ -1034,6 +1081,14 @@ handle_modified_file() return fi + # If the only change in the new file versus the old + # file is a change in the FreeBSD ID string and -F is + # specified, don't warn. + if [ -n "$FREEBSD_ID" -a $cmp -eq $COMPARE_DIFFFILES ] && \ + fbsdid_only $OLDTREE/$file $NEWTREE/$file; then + return + fi + case $cmp in $COMPARE_DIFFTYPE) old=`file_type $OLDTREE/$file` @@ -1064,6 +1119,16 @@ handle_modified_file() fi fi + # If the only change in the new file versus the old file is a + # change in the FreeBSD ID string and -F is specified, just + # update the FreeBSD ID string in the local file. + if [ -n "$FREEBSD_ID" -a $cmp -eq $COMPARE_DIFFFILES ] && \ + fbsdid_only $OLDTREE/$file $NEWTREE/$file; then + if update_freebsdid $file; then + continue + fi + fi + # If the file changed types between the old and new trees but # the files in the new and dest tree are both of the same # type, treat it like an added file just comparing the new and @@ -1298,6 +1363,11 @@ resolve_cmd() return fi + if ! [ -d $NEWTREE ]; then + echo "The current tree is not present to resolve conflicts." *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Fri Dec 27 22:00:24 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B2FFC3; Fri, 27 Dec 2013 22:00:24 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7532F12D1; Fri, 27 Dec 2013 22:00:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBRM0Oga040887; Fri, 27 Dec 2013 22:00:24 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBRM0Nxr040876; Fri, 27 Dec 2013 22:00:23 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201312272200.rBRM0Nxr040876@svn.freebsd.org> From: Julio Merino Date: Fri, 27 Dec 2013 22:00:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259962 - in stable/10: lib/libcrypt/tests share/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 22:00:24 -0000 Author: jmmv Date: Fri Dec 27 22:00:22 2013 New Revision: 259962 URL: http://svnweb.freebsd.org/changeset/base/259962 Log: Split and extend bsd.test.mk into {atf,plain,tap}.test.mk. This is a MFC of: - r256761 Clearly split the logic to build ATF and plain tests apart. - r256762 Add the automatic generation of Atffile files. - r256763 Add the automatic generation of Kyuafile files. - r256764 Plug atf-run into the 'test' target. - r256765 Plug kyua into the 'test' target. - r257096 Move the TESTSBASE definition to bsd.own.mk. - r257099 Add missing plain.test.mk. - r258297 Remove registration of C++ test programs into PROGS. - r258298 Fix the build of plain test programs. - r258551 Install plain.test.mk. - r259208 Add tap.test.mk. Approved by: rpaulo (mentor) Added: stable/10/share/mk/plain.test.mk - copied, changed from r257099, head/share/mk/plain.test.mk stable/10/share/mk/tap.test.mk - copied unchanged from r259208, head/share/mk/tap.test.mk Modified: stable/10/lib/libcrypt/tests/Makefile stable/10/share/mk/Makefile stable/10/share/mk/atf.test.mk stable/10/share/mk/bsd.own.mk stable/10/share/mk/bsd.test.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libcrypt/tests/Makefile ============================================================================== --- stable/10/lib/libcrypt/tests/Makefile Fri Dec 27 20:18:19 2013 (r259961) +++ stable/10/lib/libcrypt/tests/Makefile Fri Dec 27 22:00:22 2013 (r259962) @@ -2,7 +2,7 @@ # exercise libcrypt -TESTS_C= crypt_tests +ATF_TESTS_C= crypt_tests CFLAGS+= -I${.CURDIR:H} LDADD+= -L${.OBJDIR:H} -lcrypt Modified: stable/10/share/mk/Makefile ============================================================================== --- stable/10/share/mk/Makefile Fri Dec 27 20:18:19 2013 (r259961) +++ stable/10/share/mk/Makefile Fri Dec 27 22:00:22 2013 (r259962) @@ -45,6 +45,8 @@ FILESDIR= ${BINDIR}/mk .if ${MK_ATF} != "no" FILES+= atf.test.mk +FILES+= plain.test.mk +FILES+= tap.test.mk .endif .include Modified: stable/10/share/mk/atf.test.mk ============================================================================== --- stable/10/share/mk/atf.test.mk Fri Dec 27 20:18:19 2013 (r259961) +++ stable/10/share/mk/atf.test.mk Fri Dec 27 22:00:22 2013 (r259962) @@ -1,49 +1,99 @@ -# $NetBSD$ # $FreeBSD$ # +# Logic to build and install ATF test programs; i.e. test programs linked +# against the ATF libraries. .include -ATF_TESTS:= - -.if make(*test) -TESTSDIR?= . -.endif +# List of C, C++ and shell test programs to build. +# +# Programs listed here are built using PROGS, PROGS_CXX and SCRIPTS, +# respectively, from bsd.prog.mk. However, the build rules are tweaked to +# require the ATF libraries. +# +# Test programs registered in this manner are set to be installed into TESTSDIR +# (which should be overriden by the Makefile) and are not required to provide a +# manpage. +ATF_TESTS_C?= +ATF_TESTS_CXX?= +ATF_TESTS_SH?= -.if defined(ATF_TESTS_SUBDIRS) -# Only visit subdirs when building, etc because ATF does this it on its own. -.if !make(atf-test) -SUBDIR+= ${ATF_TESTS_SUBDIRS} -.endif -ATF_TESTS+= ${ATF_TESTS_SUBDIRS} +# Whether to allow using the deprecated ATF tools or not. +# +# If 'yes', this file will generate Atffiles when requested and will also +# support using the deprecated atf-run tool to execute the tests. +ALLOW_DEPRECATED_ATF_TOOLS?= no -.include -.endif +# Knob to control the handling of the Atffile for this Makefile. +# +# If 'yes', an Atffile exists in the source tree and is installed into +# TESTSDIR. +# +# If 'auto', an Atffile is automatically generated based on the list of test +# programs built by the Makefile and is installed into TESTSDIR. This is the +# default and is sufficient in the majority of the cases. +# +# If 'no', no Atffile is installed. +ATFFILE?= auto -.if defined(TESTS_C) -ATF_TESTS+= ${TESTS_C} -.for _T in ${TESTS_C} +# Path to the prefix of the installed ATF tools, if any. +# +# If atf-run and atf-report are installed from ports, we automatically define a +# realtest target below to run the tests using these tools. The tools are +# searched for in the hierarchy specified by this variable. +ATF_PREFIX?= /usr/local + +# C compiler passed to ATF tests that need to build code. +ATF_BUILD_CC?= ${DESTDIR}/usr/bin/cc +TESTS_ENV+= ATF_BUILD_CC=${ATF_BUILD_CC} + +# C preprocessor passed to ATF tests that need to build code. +ATF_BUILD_CPP?= ${DESTDIR}/usr/bin/cpp +TESTS_ENV+= ATF_BUILD_CPP=${ATF_BUILD_CPP} + +# C++ compiler passed to ATF tests that need to build code. +ATF_BUILD_CXX?= ${DESTDIR}/usr/bin/c++ +TESTS_ENV+= ATF_BUILD_CXX=${ATF_BUILD_CXX} + +# Shell interpreter used to run atf-sh(1) based tests. +ATF_SHELL?= ${DESTDIR}/bin/sh +TESTS_ENV+= ATF_SHELL=${ATF_SHELL} + +.if !empty(ATF_TESTS_C) +PROGS+= ${ATF_TESTS_C} +_TESTS+= ${ATF_TESTS_C} +.for _T in ${ATF_TESTS_C} +BINDIR.${_T}= ${TESTSDIR} +MAN.${_T}?= # empty SRCS.${_T}?= ${_T}.c DPADD.${_T}+= ${LIBATF_C} LDADD.${_T}+= -latf-c +TEST_INTERFACE.${_T}= atf .endfor .endif -.if defined(TESTS_CXX) -ATF_TESTS+= ${TESTS_CXX} -.for _T in ${TESTS_CXX} +.if !empty(ATF_TESTS_CXX) +PROGS_CXX+= ${ATF_TESTS_CXX} +_TESTS+= ${ATF_TESTS_CXX} +.for _T in ${ATF_TESTS_CXX} +BINDIR.${_T}= ${TESTSDIR} +MAN.${_T}?= # empty SRCS.${_T}?= ${_T}${CXX_SUFFIX:U.cc} DPADD.${_T}+= ${LIBATF_CXX} ${LIBATF_C} LDADD.${_T}+= -latf-c++ -latf-c +TEST_INTERFACE.${_T}= atf .endfor .endif -.if defined(TESTS_SH) -ATF_TESTS+= ${TESTS_SH} -.for _T in ${TESTS_SH} +.if !empty(ATF_TESTS_SH) +SCRIPTS+= ${ATF_TESTS_SH} +_TESTS+= ${ATF_TESTS_SH} +.for _T in ${ATF_TESTS_SH} +SCRIPTSDIR_${_T}= ${TESTSDIR} +TEST_INTERFACE.${_T}= atf CLEANFILES+= ${_T} ${_T}.tmp -TESTS_SH_SRC_${_T}?= ${_T}.sh -${_T}: ${TESTS_SH_SRC_${_T}} +ATF_TESTS_SH_SRC_${_T}?= ${_T}.sh +${_T}: ${ATF_TESTS_SH_SRC_${_T}} echo '#! /usr/bin/atf-sh' > ${.TARGET}.tmp cat ${.ALLSRC} >> ${.TARGET}.tmp chmod +x ${.TARGET}.tmp @@ -51,4 +101,68 @@ ${_T}: ${TESTS_SH_SRC_${_T}} .endfor .endif +.if ${ALLOW_DEPRECATED_ATF_TOOLS} != "no" + +.if ${ATFFILE:tl} != "no" +FILES+= Atffile +FILESDIR_Atffile= ${TESTSDIR} + +.if ${ATFFILE:tl} == "auto" +CLEANFILES+= Atffile Atffile.tmp + +Atffile: Makefile + @{ echo 'Content-Type: application/X-atf-atffile; version="1"'; \ + echo; \ + echo '# Automatically generated by atf-test.mk.'; \ + echo; \ + echo 'prop: test-suite = "'${TESTSUITE}'"'; \ + echo; \ + for tp in ${ATF_TESTS_C} ${ATF_TESTS_CXX} ${ATF_TESTS_SH} \ + ${TESTS_SUBDIRS}; \ + do \ + echo "tp: $${tp}"; \ + done; } >Atffile.tmp + @mv Atffile.tmp Atffile +.endif +.endif + +ATF_REPORT?= ${ATF_PREFIX}/bin/atf-report +ATF_RUN?= ${ATF_PREFIX}/bin/atf-run +.if exists(${ATF_RUN}) && exists(${ATF_REPORT}) +# Definition of the "make test" target and supporting variables. +# +# This target, by necessity, can only work for native builds (i.e. a freeBSD +# host building a release for the same system). The target runs ATF, which is +# not in the toolchain, and the tests execute code built for the target host. +# +# Due to the dependencies of the binaries built by the source tree and how they +# are used by tests, it is highly possible for a execution of "make test" to +# report bogus results unless the new binaries are put in place. +_TESTS_FIFO= ${.OBJDIR}/atf-run.fifo +_TESTS_LOG= ${.OBJDIR}/atf-run.log +CLEANFILES+= ${_TESTS_FIFO} ${_TESTS_LOG} +realtest: .PHONY + @set -e; \ + if [ -z "${TESTSDIR}" ]; then \ + echo "*** No TESTSDIR defined; nothing to do."; \ + exit 0; \ + fi; \ + cd ${DESTDIR}${TESTSDIR}; \ + rm -f ${_TESTS_FIFO}; \ + mkfifo ${_TESTS_FIFO}; \ + tee ${_TESTS_LOG} < ${_TESTS_FIFO} | ${TESTS_ENV} ${ATF_REPORT} & \ + set +e; \ + ${TESTS_ENV} ${ATF_RUN} >> ${_TESTS_FIFO}; \ + result=$${?}; \ + wait; \ + rm -f ${_TESTS_FIFO}; \ + echo; \ + echo "*** The verbatim output of atf-run has been saved to ${_TESTS_LOG}"; \ + echo "***"; \ + echo "*** WARNING: atf-run is deprecated; please install kyua instead"; \ + exit $${result} +.endif + +.endif + .include Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Fri Dec 27 20:18:19 2013 (r259961) +++ stable/10/share/mk/bsd.own.mk Fri Dec 27 22:00:22 2013 (r259962) @@ -659,4 +659,8 @@ $xGRP= ${_gid} .endif # !_WITHOUT_SRCCONF +# Pointer to the top directory into which tests are installed. Should not be +# overriden by Makefiles, but the user may choose to set this in src.conf(5). +TESTSBASE?= /usr/tests + .endif # !target(____) Modified: stable/10/share/mk/bsd.test.mk ============================================================================== --- stable/10/share/mk/bsd.test.mk Fri Dec 27 20:18:19 2013 (r259961) +++ stable/10/share/mk/bsd.test.mk Fri Dec 27 22:00:22 2013 (r259962) @@ -1,34 +1,74 @@ -# $NetBSD: bsd.test.mk,v 1.21 2012/08/25 22:21:16 jmmv Exp $ # $FreeBSD$ +# +# Generic build infrastructure for test programs. +# +# The code in this file is independent of the implementation of the test +# programs being built; this file just provides generic infrastructure for the +# build and the definition of various helper variables and targets. +# +# Makefiles should never include this file directly. Instead, they should +# include one of the various *.test.mk depending on the specific test programs +# being built. .include -.if defined(TESTS_C) -PROGS+= ${TESTS_C} -.for _T in ${TESTS_C} -BINDIR.${_T}= ${TESTSDIR} -MAN.${_T}?= # empty -.endfor -.endif +# Directory in which to install tests defined by the current Makefile. +# Makefiles have to override this to point to a subdirectory of TESTSBASE. +TESTSDIR?= . + +# Name of the test suite these tests belong to. Should rarely be changed for +# Makefiles built into the FreeBSD src tree. +TESTSUITE?= FreeBSD + +# List of subdirectories containing tests into which to recurse. This has the +# same semantics as SUBDIR at build-time. However, the directories listed here +# get registered into the run-time test suite definitions so that the test +# engines know to recurse into these directories. +# +# In other words: list here any directories that contain test programs but use +# SUBDIR for directories that may contain helper binaries and/or data files. +TESTS_SUBDIRS?= + +# Knob to control the handling of the Kyuafile for this Makefile. +# +# If 'yes', a Kyuafile exists in the source tree and is installed into +# TESTSDIR. +# +# If 'auto', a Kyuafile is automatically generated based on the list of test +# programs built by the Makefile and is installed into TESTSDIR. This is the +# default and is sufficient in the majority of the cases. +# +# If 'no', no Kyuafile is installed. +KYUAFILE?= auto + +# List of variables to pass to the tests at run-time via the environment. +TESTS_ENV?= + +# Ordered list of directories to construct the PATH for the tests. +TESTS_PATH+= ${DESTDIR}/bin ${DESTDIR}/sbin \ + ${DESTDIR}/usr/bin ${DESTDIR}/usr/sbin +TESTS_ENV+= PATH=${TESTS_PATH:tW:C/ +/:/g} + +# Ordered list of directories to construct the LD_LIBRARY_PATH for the tests. +TESTS_LD_LIBRARY_PATH+= ${DESTDIR}/lib ${DESTDIR}/usr/lib +TESTS_ENV+= LD_LIBRARY_PATH=${TESTS_LD_LIBRARY_PATH:tW:C/ +/:/g} + +# List of all tests being built. This variable is internal should not be +# defined by the Makefile. The various *.test.mk modules extend this variable +# as needed. +_TESTS?= + +# Path to the prefix of the installed Kyua CLI, if any. +# +# If kyua is installed from ports, we automatically define a realtest target +# below to run the tests using this tool. The tools are searched for in the +# hierarchy specified by this variable. +KYUA_PREFIX?= /usr/local -.if defined(TESTS_CXX) -PROGS_CXX+= ${TESTS_CXX} -PROGS+= ${TESTS_CXX} -.for _T in ${TESTS_CXX} -BINDIR.${_T}= ${TESTSDIR} -MAN.${_T}?= # empty -.endfor +.if !empty(TESTS_SUBDIRS) +SUBDIR+= ${TESTS_SUBDIRS} .endif -.if defined(TESTS_SH) -SCRIPTS+= ${TESTS_SH} -.for _T in ${TESTS_SH} -SCRIPTSDIR_${_T}= ${TESTSDIR} -.endfor -.endif - -TESTSBASE?= ${DESTDIR}/usr/tests - # it is rare for test cases to have man pages .if !defined(MAN) WITHOUT_MAN=yes @@ -39,8 +79,57 @@ WITHOUT_MAN=yes PROG_VARS+= BINDIR PROGS_TARGETS+= install -.if !empty(PROGS) || !empty(PROGS_CXX) || !empty(SCRIPTS) -.include +.if ${KYUAFILE:tl} != "no" +FILES+= Kyuafile +FILESDIR_Kyuafile= ${TESTSDIR} + +.if ${KYUAFILE:tl} == "auto" +CLEANFILES+= Kyuafile Kyuafile.tmp + +Kyuafile: Makefile + @{ \ + echo '-- Automatically generated by bsd.test.mk.'; \ + echo; \ + echo 'syntax(2)'; \ + echo; \ + echo 'test_suite("${TESTSUITE}")'; \ + echo; \ + } >Kyuafile.tmp +.for _T in ${_TESTS} + @echo "${TEST_INTERFACE.${_T}}_test_program{name=\"${_T}\"}" \ + >>Kyuafile.tmp +.endfor +.for _T in ${TESTS_SUBDIRS:N.WAIT} + @echo "include(\"${_T}/Kyuafile\")" >>Kyuafile.tmp +.endfor + @mv Kyuafile.tmp Kyuafile +.endif +.endif + +KYUA?= ${KYUA_PREFIX}/bin/kyua +.if exists(${KYUA}) +# Definition of the "make test" target and supporting variables. +# +# This target, by necessity, can only work for native builds (i.e. a FreeBSD +# host building a release for the same system). The target runs Kyua, which is +# not in the toolchain, and the tests execute code built for the target host. +# +# Due to the dependencies of the binaries built by the source tree and how they +# are used by tests, it is highly possible for a execution of "make test" to +# report bogus results unless the new binaries are put in place. +realtest: .PHONY + @echo "*** WARNING: make test is experimental" + @echo "***" + @echo "*** Using this test does not preclude you from running the tests" + @echo "*** installed in ${TESTSBASE}. This test run may raise false" + @echo "*** positives and/or false negatives." + @echo + @set -e; \ + ${KYUA} test -k ${DESTDIR}${TESTSDIR}/Kyuafile; \ + result=0; \ + echo; \ + echo "*** Once again, note that "make test" is unsupported."; \ + test $${result} -eq 0 .endif beforetest: .PHONY @@ -76,4 +165,14 @@ test: beforetest realtest test: aftertest .endif +.if !empty(SUBDIR) +.include +.endif + +.if !empty(PROGS) || !empty(PROGS_CXX) || !empty(SCRIPTS) +.include +.elif !empty(FILES) +.include +.endif + .include Copied and modified: stable/10/share/mk/plain.test.mk (from r257099, head/share/mk/plain.test.mk) ============================================================================== --- head/share/mk/plain.test.mk Fri Oct 25 05:31:26 2013 (r257099, copy source) +++ stable/10/share/mk/plain.test.mk Fri Dec 27 22:00:22 2013 (r259962) @@ -24,17 +24,18 @@ _TESTS+= ${PLAIN_TESTS_C} .for _T in ${PLAIN_TESTS_C} BINDIR.${_T}= ${TESTSDIR} MAN.${_T}?= # empty +SRCS.${_T}?= ${_T}.c TEST_INTERFACE.${_T}= plain .endfor .endif .if !empty(PLAIN_TESTS_CXX) PROGS_CXX+= ${PLAIN_TESTS_CXX} -PROGS+= ${PLAIN_TESTS_CXX} _TESTS+= ${PLAIN_TESTS_CXX} .for _T in ${PLAIN_TESTS_CXX} BINDIR.${_T}= ${TESTSDIR} MAN.${_T}?= # empty +SRCS.${_T}?= ${_T}.cc TEST_INTERFACE.${_T}= plain .endfor .endif Copied: stable/10/share/mk/tap.test.mk (from r259208, head/share/mk/tap.test.mk) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/mk/tap.test.mk Fri Dec 27 22:00:22 2013 (r259962, copy of r259208, head/share/mk/tap.test.mk) @@ -0,0 +1,64 @@ +# $FreeBSD$ +# +# Logic to build and install TAP-compliant test programs. +# +# This is provided to support existing tests in the FreeBSD source tree +# (particularly those coming from tools/regression/) that comply with the +# Test Anything Protocol. It should not be used for new tests. + +.include + +# List of C, C++ and shell test programs to build. +# +# Programs listed here are built according to the semantics of bsd.prog.mk for +# PROGS, PROGS_CXX and SCRIPTS, respectively. +# +# Test programs registered in this manner are set to be installed into TESTSDIR +# (which should be overriden by the Makefile) and are not required to provide a +# manpage. +TAP_TESTS_C?= +TAP_TESTS_CXX?= +TAP_TESTS_SH?= + +.if !empty(TAP_TESTS_C) +PROGS+= ${TAP_TESTS_C} +_TESTS+= ${TAP_TESTS_C} +.for _T in ${TAP_TESTS_C} +BINDIR.${_T}= ${TESTSDIR} +MAN.${_T}?= # empty +SRCS.${_T}?= ${_T}.c +TEST_INTERFACE.${_T}= tap +.endfor +.endif + +.if !empty(TAP_TESTS_CXX) +PROGS_CXX+= ${TAP_TESTS_CXX} +_TESTS+= ${TAP_TESTS_CXX} +.for _T in ${TAP_TESTS_CXX} +BINDIR.${_T}= ${TESTSDIR} +MAN.${_T}?= # empty +SRCS.${_T}?= ${_T}.cc +TEST_INTERFACE.${_T}= tap +.endfor +.endif + +.if !empty(TAP_TESTS_SH) +SCRIPTS+= ${TAP_TESTS_SH} +_TESTS+= ${TAP_TESTS_SH} +.for _T in ${TAP_TESTS_SH} +SCRIPTSDIR_${_T}= ${TESTSDIR} +TEST_INTERFACE.${_T}= tap +CLEANFILES+= ${_T} ${_T}.tmp +# TODO(jmmv): It seems to me that this SED and SRC functionality should +# exist in bsd.prog.mk along the support for SCRIPTS. Move it there if +# this proves to be useful within the tests. +TAP_TESTS_SH_SED_${_T}?= # empty +TAP_TESTS_SH_SRC_${_T}?= ${_T}.sh +${_T}: ${TAP_TESTS_SH_SRC_${_T}} + cat ${.ALLSRC} | sed ${TAP_TESTS_SH_SED_${_T}} >${.TARGET}.tmp + chmod +x ${.TARGET}.tmp + mv ${.TARGET}.tmp ${.TARGET} +.endfor +.endif + +.include From owner-svn-src-stable@FreeBSD.ORG Fri Dec 27 22:05:52 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3349B277; Fri, 27 Dec 2013 22:05: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1F5BE1349; Fri, 27 Dec 2013 22:05:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBRM5pVW043883; Fri, 27 Dec 2013 22:05:51 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBRM5pIf043882; Fri, 27 Dec 2013 22:05:51 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201312272205.rBRM5pIf043882@svn.freebsd.org> From: Adrian Chadd Date: Fri, 27 Dec 2013 22:05:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259963 - stable/10/sys/arm/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 22:05:52 -0000 Author: adrian Date: Fri Dec 27 22:05:51 2013 New Revision: 259963 URL: http://svnweb.freebsd.org/changeset/base/259963 Log: Revert r252694 from stable/10 to fix instabilities seen with jemalloc + dhclient/sshd. This is a direct commit to stable/10 as the VM code has changed since the stable/10 branch. PR: kern/185046 Modified: stable/10/sys/arm/arm/pmap-v6.c Modified: stable/10/sys/arm/arm/pmap-v6.c ============================================================================== --- stable/10/sys/arm/arm/pmap-v6.c Fri Dec 27 22:00:22 2013 (r259962) +++ stable/10/sys/arm/arm/pmap-v6.c Fri Dec 27 22:05:51 2013 (r259963) @@ -3087,13 +3087,8 @@ validate: } if (prot & VM_PROT_WRITE) { - /* - * Enable write permission if the access type - * indicates write intention. Emulate modified - * bit otherwise. - */ - if ((access & VM_PROT_WRITE) != 0) - npte &= ~(L2_APX); + /* Write enable */ + npte &= ~(L2_APX); if ((m->oflags & VPO_UNMANAGED) == 0) { vm_page_aflag_set(m, PGA_WRITEABLE); From owner-svn-src-stable@FreeBSD.ORG Fri Dec 27 22:14:04 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5ECF4571; Fri, 27 Dec 2013 22:14: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4A6A613DD; Fri, 27 Dec 2013 22:14:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBRME4tA047763; Fri, 27 Dec 2013 22:14:04 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBRME4WS047762; Fri, 27 Dec 2013 22:14:04 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201312272214.rBRME4WS047762@svn.freebsd.org> From: Mark Johnston Date: Fri, 27 Dec 2013 22:14:04 +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: r259964 - stable/9/lib/libproc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 22:14:04 -0000 Author: markj Date: Fri Dec 27 22:14:03 2013 New Revision: 259964 URL: http://svnweb.freebsd.org/changeset/base/259964 Log: MFC r257300: Fix an off-by-one error when checking whether a given address is within the extent of a symbol. Modified: stable/9/lib/libproc/proc_sym.c Directory Properties: stable/9/lib/libproc/ (props changed) Modified: stable/9/lib/libproc/proc_sym.c ============================================================================== --- stable/9/lib/libproc/proc_sym.c Fri Dec 27 22:05:51 2013 (r259963) +++ stable/9/lib/libproc/proc_sym.c Fri Dec 27 22:14:03 2013 (r259964) @@ -263,7 +263,7 @@ proc_addr2sym(struct proc_handle *p, uin * by rtld. */ rsym = map->pr_vaddr + sym.st_value; - if (addr >= rsym && addr <= (rsym + sym.st_size)) { + if (addr >= rsym && addr < rsym + sym.st_size) { s = elf_strptr(e, dynsymstridx, sym.st_name); if (s) { strlcpy(name, s, namesz); @@ -299,7 +299,7 @@ proc_addr2sym(struct proc_handle *p, uin rsym = map->pr_vaddr + sym.st_value; else rsym = sym.st_value; - if (addr >= rsym && addr <= (rsym + sym.st_size)) { + if (addr >= rsym && addr < rsym + sym.st_size) { s = elf_strptr(e, symtabstridx, sym.st_name); if (s) { strlcpy(name, s, namesz); From owner-svn-src-stable@FreeBSD.ORG Fri Dec 27 22:19:19 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9ED6E996; Fri, 27 Dec 2013 22:19: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8A649147F; Fri, 27 Dec 2013 22:19:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBRMJJsD048585; Fri, 27 Dec 2013 22:19:19 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBRMJJOl048584; Fri, 27 Dec 2013 22:19:19 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201312272219.rBRMJJOl048584@svn.freebsd.org> From: Mark Johnston Date: Fri, 27 Dec 2013 22:19:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259965 - stable/10/lib/libproc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 22:19:19 -0000 Author: markj Date: Fri Dec 27 22:19:19 2013 New Revision: 259965 URL: http://svnweb.freebsd.org/changeset/base/259965 Log: MFC r257300: Fix an off-by-one error when checking whether a given address is within the extent of a symbol. Modified: stable/10/lib/libproc/proc_sym.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libproc/proc_sym.c ============================================================================== --- stable/10/lib/libproc/proc_sym.c Fri Dec 27 22:14:03 2013 (r259964) +++ stable/10/lib/libproc/proc_sym.c Fri Dec 27 22:19:19 2013 (r259965) @@ -285,7 +285,7 @@ proc_addr2sym(struct proc_handle *p, uin * by rtld. */ rsym = map->pr_vaddr + sym.st_value; - if (addr >= rsym && addr <= (rsym + sym.st_size)) { + if (addr >= rsym && addr < rsym + sym.st_size) { s = elf_strptr(e, dynsymstridx, sym.st_name); if (s) { if (s[0] == '_' && s[1] == 'Z' && s[2]) @@ -325,7 +325,7 @@ symtab: rsym = map->pr_vaddr + sym.st_value; else rsym = sym.st_value; - if (addr >= rsym && addr <= (rsym + sym.st_size)) { + if (addr >= rsym && addr < rsym + sym.st_size) { s = elf_strptr(e, symtabstridx, sym.st_name); if (s) { if (s[0] == '_' && s[1] == 'Z' && s[2]) From owner-svn-src-stable@FreeBSD.ORG Fri Dec 27 22:29:21 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66543F72; Fri, 27 Dec 2013 22:29:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5146A15AA; Fri, 27 Dec 2013 22:29:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBRMTLjO052444; Fri, 27 Dec 2013 22:29:21 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBRMTLgl052443; Fri, 27 Dec 2013 22:29:21 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201312272229.rBRMTLgl052443@svn.freebsd.org> From: Mark Johnston Date: Fri, 27 Dec 2013 22:29: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: r259968 - stable/9/lib/libproc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 22:29:21 -0000 Author: markj Date: Fri Dec 27 22:29:20 2013 New Revision: 259968 URL: http://svnweb.freebsd.org/changeset/base/259968 Log: MFC r257670: Modify the libproc breakpoint add/remove functions to stop the target process if it has not already been stopped, since this is required for ptrace(2) to work. libdtrace does not seem to stop target processes before trying to remove their breakpoints, so we were previously failing to remove the breakpoint on r_debug_state() in rtld. This was causing processes to die with SIGTRAP if they called dlopen(3) after dtrace(1) had detached. Modified: stable/9/lib/libproc/proc_bkpt.c Directory Properties: stable/9/lib/libproc/ (props changed) Modified: stable/9/lib/libproc/proc_bkpt.c ============================================================================== --- stable/9/lib/libproc/proc_bkpt.c Fri Dec 27 22:26:43 2013 (r259967) +++ stable/9/lib/libproc/proc_bkpt.c Fri Dec 27 22:29:20 2013 (r259968) @@ -37,8 +37,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include +#include +#include #include "_libproc.h" #if defined(__i386__) || defined(__amd64__) @@ -48,12 +49,39 @@ __FBSDID("$FreeBSD$"); #error "Add support for your architecture" #endif +static void +proc_cont(struct proc_handle *phdl) +{ + + ptrace(PT_CONTINUE, proc_getpid(phdl), (caddr_t)1, 0); +} + +static int +proc_stop(struct proc_handle *phdl) +{ + int status; + + if (kill(proc_getpid(phdl), SIGSTOP) == -1) { + DPRINTF("kill %d", proc_getpid(phdl)); + return (-1); + } else if (waitpid(proc_getpid(phdl), &status, WSTOPPED) == -1) { + DPRINTF("waitpid %d", proc_getpid(phdl)); + return (-1); + } else if (!WIFSTOPPED(status)) { + DPRINTFX("waitpid: unexpected status 0x%x", status); + return (-1); + } + + return (0); +} + int proc_bkptset(struct proc_handle *phdl, uintptr_t address, unsigned long *saved) { struct ptrace_io_desc piod; unsigned long paddr, caddr; + int ret = 0; *saved = 0; if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || @@ -62,6 +90,12 @@ proc_bkptset(struct proc_handle *phdl, u return (-1); } + DPRINTFX("adding breakpoint at 0x%lx", address); + + if (phdl->status != PS_STOP) + if (proc_stop(phdl) != 0) + return (-1); + /* * Read the original instruction. */ @@ -74,7 +108,8 @@ proc_bkptset(struct proc_handle *phdl, u if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) { DPRINTF("ERROR: couldn't read instruction at address 0x%" PRIuPTR, address); - return (-1); + ret = -1; + goto done; } *saved = paddr; /* @@ -89,10 +124,16 @@ proc_bkptset(struct proc_handle *phdl, u if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) { DPRINTF("ERROR: couldn't write instruction at address 0x%" PRIuPTR, address); - return (-1); + ret = -1; + goto done; } - return (0); +done: + if (phdl->status != PS_STOP) + /* Restart the process if we had to stop it. */ + proc_cont(phdl); + + return (ret); } int @@ -101,13 +142,20 @@ proc_bkptdel(struct proc_handle *phdl, u { struct ptrace_io_desc piod; unsigned long paddr, caddr; + int ret = 0; if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || phdl->status == PS_IDLE) { errno = ENOENT; return (-1); } - DPRINTFX("removing breakpoint at 0x%lx\n", address); + + DPRINTFX("removing breakpoint at 0x%lx", address); + + if (phdl->status != PS_STOP) + if (proc_stop(phdl) != 0) + return (-1); + /* * Overwrite the breakpoint instruction that we setup previously. */ @@ -120,10 +168,14 @@ proc_bkptdel(struct proc_handle *phdl, u if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) { DPRINTF("ERROR: couldn't write instruction at address 0x%" PRIuPTR, address); - return (-1); + ret = -1; } + + if (phdl->status != PS_STOP) + /* Restart the process if we had to stop it. */ + proc_cont(phdl); - return (0); + return (ret); } /* From owner-svn-src-stable@FreeBSD.ORG Fri Dec 27 22:30:36 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9CF0C2EB; Fri, 27 Dec 2013 22:30:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 88FC3160A; Fri, 27 Dec 2013 22:30:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBRMUaC0053333; Fri, 27 Dec 2013 22:30:36 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBRMUaDi053302; Fri, 27 Dec 2013 22:30:36 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201312272230.rBRMUaDi053302@svn.freebsd.org> From: Mark Johnston Date: Fri, 27 Dec 2013 22:30:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259969 - stable/10/lib/libproc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 22:30:36 -0000 Author: markj Date: Fri Dec 27 22:30:36 2013 New Revision: 259969 URL: http://svnweb.freebsd.org/changeset/base/259969 Log: MFC r257670: Modify the libproc breakpoint add/remove functions to stop the target process if it has not already been stopped, since this is required for ptrace(2) to work. libdtrace does not seem to stop target processes before trying to remove their breakpoints, so we were previously failing to remove the breakpoint on r_debug_state() in rtld. This was causing processes to die with SIGTRAP if they called dlopen(3) after dtrace(1) had detached. Modified: stable/10/lib/libproc/proc_bkpt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libproc/proc_bkpt.c ============================================================================== --- stable/10/lib/libproc/proc_bkpt.c Fri Dec 27 22:29:20 2013 (r259968) +++ stable/10/lib/libproc/proc_bkpt.c Fri Dec 27 22:30:36 2013 (r259969) @@ -37,8 +37,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include +#include +#include #include "_libproc.h" #if defined(__i386__) || defined(__amd64__) @@ -54,12 +55,39 @@ __FBSDID("$FreeBSD$"); #error "Add support for your architecture" #endif +static void +proc_cont(struct proc_handle *phdl) +{ + + ptrace(PT_CONTINUE, proc_getpid(phdl), (caddr_t)1, 0); +} + +static int +proc_stop(struct proc_handle *phdl) +{ + int status; + + if (kill(proc_getpid(phdl), SIGSTOP) == -1) { + DPRINTF("kill %d", proc_getpid(phdl)); + return (-1); + } else if (waitpid(proc_getpid(phdl), &status, WSTOPPED) == -1) { + DPRINTF("waitpid %d", proc_getpid(phdl)); + return (-1); + } else if (!WIFSTOPPED(status)) { + DPRINTFX("waitpid: unexpected status 0x%x", status); + return (-1); + } + + return (0); +} + int proc_bkptset(struct proc_handle *phdl, uintptr_t address, unsigned long *saved) { struct ptrace_io_desc piod; unsigned long paddr, caddr; + int ret = 0; *saved = 0; if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || @@ -68,6 +96,12 @@ proc_bkptset(struct proc_handle *phdl, u return (-1); } + DPRINTFX("adding breakpoint at 0x%lx", address); + + if (phdl->status != PS_STOP) + if (proc_stop(phdl) != 0) + return (-1); + /* * Read the original instruction. */ @@ -80,7 +114,8 @@ proc_bkptset(struct proc_handle *phdl, u if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) { DPRINTF("ERROR: couldn't read instruction at address 0x%" PRIuPTR, address); - return (-1); + ret = -1; + goto done; } *saved = paddr; /* @@ -95,10 +130,16 @@ proc_bkptset(struct proc_handle *phdl, u if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) { DPRINTF("ERROR: couldn't write instruction at address 0x%" PRIuPTR, address); - return (-1); + ret = -1; + goto done; } - return (0); +done: + if (phdl->status != PS_STOP) + /* Restart the process if we had to stop it. */ + proc_cont(phdl); + + return (ret); } int @@ -107,13 +148,20 @@ proc_bkptdel(struct proc_handle *phdl, u { struct ptrace_io_desc piod; unsigned long paddr, caddr; + int ret = 0; if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || phdl->status == PS_IDLE) { errno = ENOENT; return (-1); } - DPRINTFX("removing breakpoint at 0x%lx\n", address); + + DPRINTFX("removing breakpoint at 0x%lx", address); + + if (phdl->status != PS_STOP) + if (proc_stop(phdl) != 0) + return (-1); + /* * Overwrite the breakpoint instruction that we setup previously. */ @@ -126,10 +174,14 @@ proc_bkptdel(struct proc_handle *phdl, u if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) { DPRINTF("ERROR: couldn't write instruction at address 0x%" PRIuPTR, address); - return (-1); + ret = -1; } + + if (phdl->status != PS_STOP) + /* Restart the process if we had to stop it. */ + proc_cont(phdl); - return (0); + return (ret); } /* From owner-svn-src-stable@FreeBSD.ORG Fri Dec 27 22:54:39 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38AEB892; Fri, 27 Dec 2013 22:54: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0AAF617A9; Fri, 27 Dec 2013 22:54:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBRMscPf062930; Fri, 27 Dec 2013 22:54:38 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBRMscDw062929; Fri, 27 Dec 2013 22:54:38 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201312272254.rBRMscDw062929@svn.freebsd.org> From: Mark Johnston Date: Fri, 27 Dec 2013 22:54: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: r259970 - stable/9/lib/libproc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 22:54:39 -0000 Author: markj Date: Fri Dec 27 22:54:38 2013 New Revision: 259970 URL: http://svnweb.freebsd.org/changeset/base/259970 Log: MFC r240040 (rpaulo): Make sure we visit both symbol sections even if one of them doesn't exist. This makes it possible to dtrace some C++ programs like devd. MFC r254177 (rpaulo): Fix the return value when we found a symbol in .dynstr. This nasty bug was preventing a lot of symbol lookups in dtruss -s, for example. Modified: stable/9/lib/libproc/proc_sym.c Directory Properties: stable/9/lib/libproc/ (props changed) Modified: stable/9/lib/libproc/proc_sym.c ============================================================================== --- stable/9/lib/libproc/proc_sym.c Fri Dec 27 22:30:36 2013 (r259969) +++ stable/9/lib/libproc/proc_sym.c Fri Dec 27 22:54:38 2013 (r259970) @@ -254,7 +254,7 @@ proc_addr2sym(struct proc_handle *p, uin */ if ((data = elf_getdata(dynsymscn, NULL)) == NULL) { DPRINTFX("ERROR: elf_getdata() failed: %s", elf_errmsg(-1)); - goto err2; + goto symtab; } i = 0; while (gelf_getsym(data, i++, &sym) != NULL) { @@ -279,6 +279,7 @@ proc_addr2sym(struct proc_handle *p, uin } } } +symtab: /* * Iterate over the Symbols Table to find the symbol. * Then look up the string name in STRTAB (.dynstr) @@ -430,17 +431,16 @@ proc_name2sym(struct proc_handle *p, con * Iterate over the Dynamic Symbols table to find the symbol. * Then look up the string name in STRTAB (.dynstr) */ - if ((data = elf_getdata(dynsymscn, NULL)) == NULL) { - goto err2; - } - i = 0; - while (gelf_getsym(data, i++, &sym) != NULL) { - s = elf_strptr(e, dynsymstridx, sym.st_name); - if (s && strcmp(s, symbol) == 0) { - memcpy(symcopy, &sym, sizeof(sym)); - symcopy->st_value = map->pr_vaddr + sym.st_value; - error = 0; - goto out; + if ((data = elf_getdata(dynsymscn, NULL))) { + i = 0; + while (gelf_getsym(data, i++, &sym) != NULL) { + s = elf_strptr(e, dynsymstridx, sym.st_name); + if (s && strcmp(s, symbol) == 0) { + memcpy(symcopy, &sym, sizeof(sym)); + symcopy->st_value = map->pr_vaddr + sym.st_value; + error = 0; + goto out; + } } } /* @@ -449,17 +449,15 @@ proc_name2sym(struct proc_handle *p, con */ if (symtabscn == NULL) goto err2; - if ((data = elf_getdata(symtabscn, NULL)) == NULL) { - DPRINTF("ERROR: elf_getdata() failed"); - goto err2; - } - i = 0; - while (gelf_getsym(data, i++, &sym) != NULL) { - s = elf_strptr(e, symtabstridx, sym.st_name); - if (s && strcmp(s, symbol) == 0) { - memcpy(symcopy, &sym, sizeof(sym)); - error = 0; - goto out; + if ((data = elf_getdata(symtabscn, NULL))) { + i = 0; + while (gelf_getsym(data, i++, &sym) != NULL) { + s = elf_strptr(e, symtabstridx, sym.st_name); + if (s && strcmp(s, symbol) == 0) { + memcpy(symcopy, &sym, sizeof(sym)); + error = 0; + goto out; + } } } out: From owner-svn-src-stable@FreeBSD.ORG Fri Dec 27 22:59:17 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D967EB4E; Fri, 27 Dec 2013 22:59:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B982617CC; Fri, 27 Dec 2013 22:59:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBRMxGiM063611; Fri, 27 Dec 2013 22:59:16 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBRMxGrw063610; Fri, 27 Dec 2013 22:59:16 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201312272259.rBRMxGrw063610@svn.freebsd.org> From: Mark Johnston Date: Fri, 27 Dec 2013 22:59:16 +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: r259971 - stable/9/lib/libproc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 22:59:17 -0000 Author: markj Date: Fri Dec 27 22:59:16 2013 New Revision: 259971 URL: http://svnweb.freebsd.org/changeset/base/259971 Log: MFC r258000: Consistently add the relocation offset only when the ELF type is not ET_EXEC. This fixes several problems with the DTrace pid provider not being able to match probes. Modified: stable/9/lib/libproc/proc_sym.c Directory Properties: stable/9/lib/libproc/ (props changed) Modified: stable/9/lib/libproc/proc_sym.c ============================================================================== --- stable/9/lib/libproc/proc_sym.c Fri Dec 27 22:54:38 2013 (r259970) +++ stable/9/lib/libproc/proc_sym.c Fri Dec 27 22:59:16 2013 (r259971) @@ -262,7 +262,10 @@ proc_addr2sym(struct proc_handle *p, uin * Calculate the address mapped to the virtual memory * by rtld. */ - rsym = map->pr_vaddr + sym.st_value; + if (ehdr.e_type != ET_EXEC) + rsym = map->pr_vaddr + sym.st_value; + else + rsym = sym.st_value; if (addr >= rsym && addr < rsym + sym.st_size) { s = elf_strptr(e, dynsymstridx, sym.st_name); if (s) { @@ -284,8 +287,6 @@ symtab: * Iterate over the Symbols Table to find the symbol. * Then look up the string name in STRTAB (.dynstr) */ - if (symtabscn == NULL) - goto err2; if ((data = elf_getdata(symtabscn, NULL)) == NULL) { DPRINTFX("ERROR: elf_getdata() failed: %s", elf_errmsg(-1)); goto err2; @@ -437,7 +438,8 @@ proc_name2sym(struct proc_handle *p, con s = elf_strptr(e, dynsymstridx, sym.st_name); if (s && strcmp(s, symbol) == 0) { memcpy(symcopy, &sym, sizeof(sym)); - symcopy->st_value = map->pr_vaddr + sym.st_value; + if (ehdr.e_type != ET_EXEC) + symcopy->st_value += map->pr_vaddr; error = 0; goto out; } @@ -447,20 +449,21 @@ proc_name2sym(struct proc_handle *p, con * Iterate over the Symbols Table to find the symbol. * Then look up the string name in STRTAB (.dynstr) */ - if (symtabscn == NULL) - goto err2; if ((data = elf_getdata(symtabscn, NULL))) { i = 0; while (gelf_getsym(data, i++, &sym) != NULL) { s = elf_strptr(e, symtabstridx, sym.st_name); if (s && strcmp(s, symbol) == 0) { memcpy(symcopy, &sym, sizeof(sym)); + if (ehdr.e_type != ET_EXEC) + symcopy->st_value += map->pr_vaddr; error = 0; goto out; } } } out: + DPRINTFX("found addr 0x%lx for %s", symcopy->st_value, symbol); err2: elf_end(e); err1: @@ -481,6 +484,7 @@ proc_iter_symbyaddr(struct proc_handle * prmap_t *map; Elf_Scn *scn, *foundscn = NULL; Elf_Data *data; + GElf_Ehdr ehdr; GElf_Shdr shdr; GElf_Sym sym; unsigned long stridx = -1; @@ -497,6 +501,10 @@ proc_iter_symbyaddr(struct proc_handle * DPRINTFX("ERROR: elf_begin() failed: %s", elf_errmsg(-1)); goto err1; } + if (gelf_getehdr(e, &ehdr) == NULL) { + DPRINTFX("ERROR: gelf_getehdr() failed: %s", elf_errmsg(-1)); + goto err2; + } /* * Find the section we are looking for. */ @@ -547,7 +555,8 @@ proc_iter_symbyaddr(struct proc_handle * (mask & TYPE_FILE) == 0) continue; s = elf_strptr(e, stridx, sym.st_name); - sym.st_value += map->pr_vaddr; + if (ehdr.e_type != ET_EXEC) + sym.st_value += map->pr_vaddr; (*func)(cd, &sym, s); } error = 0; From owner-svn-src-stable@FreeBSD.ORG Fri Dec 27 23:00:57 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 16FA0C93; Fri, 27 Dec 2013 23:00:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EBD641848; Fri, 27 Dec 2013 23:00:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBRN0uh4066480; Fri, 27 Dec 2013 23:00:56 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBRN0uSr066479; Fri, 27 Dec 2013 23:00:56 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201312272300.rBRN0uSr066479@svn.freebsd.org> From: Mark Johnston Date: Fri, 27 Dec 2013 23:00:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259972 - stable/10/lib/libproc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 23:00:57 -0000 Author: markj Date: Fri Dec 27 23:00:56 2013 New Revision: 259972 URL: http://svnweb.freebsd.org/changeset/base/259972 Log: MFC r258000: Consistently add the relocation offset only when the ELF type is not ET_EXEC. This fixes several problems with the DTrace pid provider not being able to match probes. Modified: stable/10/lib/libproc/proc_sym.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libproc/proc_sym.c ============================================================================== --- stable/10/lib/libproc/proc_sym.c Fri Dec 27 22:59:16 2013 (r259971) +++ stable/10/lib/libproc/proc_sym.c Fri Dec 27 23:00:56 2013 (r259972) @@ -284,7 +284,10 @@ proc_addr2sym(struct proc_handle *p, uin * Calculate the address mapped to the virtual memory * by rtld. */ - rsym = map->pr_vaddr + sym.st_value; + if (ehdr.e_type != ET_EXEC) + rsym = map->pr_vaddr + sym.st_value; + else + rsym = sym.st_value; if (addr >= rsym && addr < rsym + sym.st_size) { s = elf_strptr(e, dynsymstridx, sym.st_name); if (s) { @@ -309,8 +312,6 @@ symtab: * Iterate over the Symbols Table to find the symbol. * Then look up the string name in STRTAB (.dynstr) */ - if (symtabscn == NULL) - goto err2; if ((data = elf_getdata(symtabscn, NULL)) == NULL) { DPRINTFX("ERROR: elf_getdata() failed: %s", elf_errmsg(-1)); goto err2; @@ -465,7 +466,8 @@ proc_name2sym(struct proc_handle *p, con s = elf_strptr(e, dynsymstridx, sym.st_name); if (s && strcmp(s, symbol) == 0) { memcpy(symcopy, &sym, sizeof(sym)); - symcopy->st_value = map->pr_vaddr + sym.st_value; + if (ehdr.e_type != ET_EXEC) + symcopy->st_value += map->pr_vaddr; error = 0; goto out; } @@ -475,20 +477,21 @@ proc_name2sym(struct proc_handle *p, con * Iterate over the Symbols Table to find the symbol. * Then look up the string name in STRTAB (.dynstr) */ - if (symtabscn == NULL) - goto err2; if ((data = elf_getdata(symtabscn, NULL))) { i = 0; while (gelf_getsym(data, i++, &sym) != NULL) { s = elf_strptr(e, symtabstridx, sym.st_name); if (s && strcmp(s, symbol) == 0) { memcpy(symcopy, &sym, sizeof(sym)); + if (ehdr.e_type != ET_EXEC) + symcopy->st_value += map->pr_vaddr; error = 0; goto out; } } } out: + DPRINTFX("found addr 0x%lx for %s", symcopy->st_value, symbol); err2: elf_end(e); err1: @@ -509,6 +512,7 @@ proc_iter_symbyaddr(struct proc_handle * prmap_t *map; Elf_Scn *scn, *foundscn = NULL; Elf_Data *data; + GElf_Ehdr ehdr; GElf_Shdr shdr; GElf_Sym sym; unsigned long stridx = -1; @@ -525,6 +529,10 @@ proc_iter_symbyaddr(struct proc_handle * DPRINTFX("ERROR: elf_begin() failed: %s", elf_errmsg(-1)); goto err1; } + if (gelf_getehdr(e, &ehdr) == NULL) { + DPRINTFX("ERROR: gelf_getehdr() failed: %s", elf_errmsg(-1)); + goto err2; + } /* * Find the section we are looking for. */ @@ -575,7 +583,8 @@ proc_iter_symbyaddr(struct proc_handle * (mask & TYPE_FILE) == 0) continue; s = elf_strptr(e, stridx, sym.st_name); - sym.st_value += map->pr_vaddr; + if (ehdr.e_type != ET_EXEC) + sym.st_value += map->pr_vaddr; (*func)(cd, &sym, s); } error = 0; From owner-svn-src-stable@FreeBSD.ORG Fri Dec 27 23:09:41 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 163291DA; Fri, 27 Dec 2013 23:09: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DB8C4188F; Fri, 27 Dec 2013 23:09:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBRN9eYh067965; Fri, 27 Dec 2013 23:09:40 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBRN9ew3067964; Fri, 27 Dec 2013 23:09:40 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201312272309.rBRN9ew3067964@svn.freebsd.org> From: Xin LI Date: Fri, 27 Dec 2013 23:09:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r259974 - in stable: 10/etc 8/etc 9/etc X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 23:09:41 -0000 Author: delphij Date: Fri Dec 27 23:09:40 2013 New Revision: 259974 URL: http://svnweb.freebsd.org/changeset/base/259974 Log: MFC r259973: Tighten default restrictions for ntpd(8) server and provide a link to NTP access restriction documentation. Modified: stable/8/etc/ntp.conf Directory Properties: stable/8/etc/ (props changed) Changes in other areas also in this revision: Modified: stable/10/etc/ntp.conf stable/9/etc/ntp.conf Directory Properties: stable/10/ (props changed) stable/9/etc/ (props changed) Modified: stable/8/etc/ntp.conf ============================================================================== --- stable/8/etc/ntp.conf Fri Dec 27 23:06:15 2013 (r259973) +++ stable/8/etc/ntp.conf Fri Dec 27 23:09:40 2013 (r259974) @@ -17,7 +17,7 @@ # users with a static IP and good upstream NTP servers to add a server # to the pool. See http://www.pool.ntp.org/join.html if you are interested. # -# The option `iburst' is used for faster initial synchronisation. +# The option `iburst' is used for faster initial synchronization. # server 0.freebsd.pool.ntp.org iburst server 1.freebsd.pool.ntp.org iburst @@ -35,21 +35,37 @@ server 2.freebsd.pool.ntp.org iburst # server 2.CC.pool.ntp.org iburst # -# Security: Only accept NTP traffic from the following hosts. -# The following configuration example only accepts traffic from the -# above defined servers. +# Security: +# +# By default, only allow time queries and block all other requests +# from unauthenticated clients. +# +# See http://support.ntp.org/bin/view/Support/AccessRestrictions +# for more information. +# +restrict default kod nomodify notrap nopeer noquery +restrict -6 default kod nomodify notrap nopeer noquery +# +# Alternatively, the following rules would block all unauthorized access. +# +#restrict default ignore +#restrict -6 default ignore +# +# In this case, all remote NTP time servers also need to be explicitly +# allowed or they would not be able to exchange time information with +# this server. # # Please note that this example doesn't work for the servers in # the pool.ntp.org domain since they return multiple A records. -# (This is the reason that by default they are commented out) # -#restrict default ignore #restrict 0.pool.ntp.org nomodify nopeer noquery notrap #restrict 1.pool.ntp.org nomodify nopeer noquery notrap #restrict 2.pool.ntp.org nomodify nopeer noquery notrap -#restrict 127.0.0.1 -#restrict -6 ::1 -#restrict 127.127.1.0 +# +# The following settings allow unrestricted access from the localhost +restrict 127.0.0.1 +restrict -6 ::1 +restrict 127.127.1.0 # # If a server loses sync with all upstream servers, NTP clients From owner-svn-src-stable@FreeBSD.ORG Fri Dec 27 23:09:40 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B63351D9; Fri, 27 Dec 2013 23:09: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8726B188E; Fri, 27 Dec 2013 23:09:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBRN9eo0067956; Fri, 27 Dec 2013 23:09:40 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBRN9ebN067955; Fri, 27 Dec 2013 23:09:40 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201312272309.rBRN9ebN067955@svn.freebsd.org> From: Xin LI Date: Fri, 27 Dec 2013 23:09:40 +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: r259974 - in stable: 10/etc 8/etc 9/etc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 23:09:40 -0000 Author: delphij Date: Fri Dec 27 23:09:40 2013 New Revision: 259974 URL: http://svnweb.freebsd.org/changeset/base/259974 Log: MFC r259973: Tighten default restrictions for ntpd(8) server and provide a link to NTP access restriction documentation. Modified: stable/9/etc/ntp.conf Directory Properties: stable/9/etc/ (props changed) Changes in other areas also in this revision: Modified: stable/10/etc/ntp.conf stable/8/etc/ntp.conf Directory Properties: stable/10/ (props changed) stable/8/etc/ (props changed) Modified: stable/9/etc/ntp.conf ============================================================================== --- stable/9/etc/ntp.conf Fri Dec 27 23:06:15 2013 (r259973) +++ stable/9/etc/ntp.conf Fri Dec 27 23:09:40 2013 (r259974) @@ -17,7 +17,7 @@ # users with a static IP and good upstream NTP servers to add a server # to the pool. See http://www.pool.ntp.org/join.html if you are interested. # -# The option `iburst' is used for faster initial synchronisation. +# The option `iburst' is used for faster initial synchronization. # server 0.freebsd.pool.ntp.org iburst server 1.freebsd.pool.ntp.org iburst @@ -35,21 +35,37 @@ server 2.freebsd.pool.ntp.org iburst # server 2.CC.pool.ntp.org iburst # -# Security: Only accept NTP traffic from the following hosts. -# The following configuration example only accepts traffic from the -# above defined servers. +# Security: +# +# By default, only allow time queries and block all other requests +# from unauthenticated clients. +# +# See http://support.ntp.org/bin/view/Support/AccessRestrictions +# for more information. +# +restrict default kod nomodify notrap nopeer noquery +restrict -6 default kod nomodify notrap nopeer noquery +# +# Alternatively, the following rules would block all unauthorized access. +# +#restrict default ignore +#restrict -6 default ignore +# +# In this case, all remote NTP time servers also need to be explicitly +# allowed or they would not be able to exchange time information with +# this server. # # Please note that this example doesn't work for the servers in # the pool.ntp.org domain since they return multiple A records. -# (This is the reason that by default they are commented out) # -#restrict default ignore #restrict 0.pool.ntp.org nomodify nopeer noquery notrap #restrict 1.pool.ntp.org nomodify nopeer noquery notrap #restrict 2.pool.ntp.org nomodify nopeer noquery notrap -#restrict 127.0.0.1 -#restrict -6 ::1 -#restrict 127.127.1.0 +# +# The following settings allow unrestricted access from the localhost +restrict 127.0.0.1 +restrict -6 ::1 +restrict 127.127.1.0 # # If a server loses sync with all upstream servers, NTP clients From owner-svn-src-stable@FreeBSD.ORG Fri Dec 27 23:09:41 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 68F6D1DB; Fri, 27 Dec 2013 23:09: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3A77F1890; Fri, 27 Dec 2013 23:09:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBRN9fb5067971; Fri, 27 Dec 2013 23:09:41 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBRN9fnL067970; Fri, 27 Dec 2013 23:09:41 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201312272309.rBRN9fnL067970@svn.freebsd.org> From: Xin LI Date: Fri, 27 Dec 2013 23:09:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259974 - in stable: 10/etc 8/etc 9/etc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 23:09:41 -0000 Author: delphij Date: Fri Dec 27 23:09:40 2013 New Revision: 259974 URL: http://svnweb.freebsd.org/changeset/base/259974 Log: MFC r259973: Tighten default restrictions for ntpd(8) server and provide a link to NTP access restriction documentation. Modified: stable/10/etc/ntp.conf Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/8/etc/ntp.conf stable/9/etc/ntp.conf Directory Properties: stable/8/etc/ (props changed) stable/9/etc/ (props changed) Modified: stable/10/etc/ntp.conf ============================================================================== --- stable/10/etc/ntp.conf Fri Dec 27 23:06:15 2013 (r259973) +++ stable/10/etc/ntp.conf Fri Dec 27 23:09:40 2013 (r259974) @@ -17,7 +17,7 @@ # users with a static IP and good upstream NTP servers to add a server # to the pool. See http://www.pool.ntp.org/join.html if you are interested. # -# The option `iburst' is used for faster initial synchronisation. +# The option `iburst' is used for faster initial synchronization. # server 0.freebsd.pool.ntp.org iburst server 1.freebsd.pool.ntp.org iburst @@ -35,21 +35,37 @@ server 2.freebsd.pool.ntp.org iburst # server 2.CC.pool.ntp.org iburst # -# Security: Only accept NTP traffic from the following hosts. -# The following configuration example only accepts traffic from the -# above defined servers. +# Security: +# +# By default, only allow time queries and block all other requests +# from unauthenticated clients. +# +# See http://support.ntp.org/bin/view/Support/AccessRestrictions +# for more information. +# +restrict default kod nomodify notrap nopeer noquery +restrict -6 default kod nomodify notrap nopeer noquery +# +# Alternatively, the following rules would block all unauthorized access. +# +#restrict default ignore +#restrict -6 default ignore +# +# In this case, all remote NTP time servers also need to be explicitly +# allowed or they would not be able to exchange time information with +# this server. # # Please note that this example doesn't work for the servers in # the pool.ntp.org domain since they return multiple A records. -# (This is the reason that by default they are commented out) # -#restrict default ignore #restrict 0.pool.ntp.org nomodify nopeer noquery notrap #restrict 1.pool.ntp.org nomodify nopeer noquery notrap #restrict 2.pool.ntp.org nomodify nopeer noquery notrap -#restrict 127.0.0.1 -#restrict -6 ::1 -#restrict 127.127.1.0 +# +# The following settings allow unrestricted access from the localhost +restrict 127.0.0.1 +restrict -6 ::1 +restrict 127.127.1.0 # # If a server loses sync with all upstream servers, NTP clients From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 00:03:16 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C0A4176; Sat, 28 Dec 2013 00:03:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 463B01CE2; Sat, 28 Dec 2013 00:03:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS03G5p090455; Sat, 28 Dec 2013 00:03:16 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS03GBR090453; Sat, 28 Dec 2013 00:03:16 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280003.rBS03GBR090453@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 00:03:16 +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: r259976 - in stable: 10/contrib/gperf/lib 8/contrib/gperf/lib 9/contrib/gperf/lib X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 00:03:16 -0000 Author: dim Date: Sat Dec 28 00:03:15 2013 New Revision: 259976 URL: http://svnweb.freebsd.org/changeset/base/259976 Log: MFC r259756: Get rid of register keyword usage in gperf, it is totally obsolete for C++, and this allows gperf to be compiled for C++11 without a warning about it. Modified: stable/9/contrib/gperf/lib/getline.cc Directory Properties: stable/9/contrib/gperf/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/gperf/lib/getline.cc stable/8/contrib/gperf/lib/getline.cc Directory Properties: stable/10/ (props changed) stable/8/contrib/gperf/ (props changed) Modified: stable/9/contrib/gperf/lib/getline.cc ============================================================================== --- stable/9/contrib/gperf/lib/getline.cc Fri Dec 27 23:13:38 2013 (r259975) +++ stable/9/contrib/gperf/lib/getline.cc Sat Dec 28 00:03:15 2013 (r259976) @@ -57,7 +57,7 @@ getstr (char **lineptr, size_t *n, FILE for (;;) { - register int c = getc (stream); + int c = getc (stream); /* We always want at least one char left in the buffer, since we always (unless we get an error while reading the first char) From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 00:03:16 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AFFA0177; Sat, 28 Dec 2013 00:03:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9B40D1CE3; Sat, 28 Dec 2013 00:03:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS03GV7090463; Sat, 28 Dec 2013 00:03:16 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS03G6m090462; Sat, 28 Dec 2013 00:03:16 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280003.rBS03G6m090462@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 00:03:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r259976 - in stable: 10/contrib/gperf/lib 8/contrib/gperf/lib 9/contrib/gperf/lib X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 00:03:16 -0000 Author: dim Date: Sat Dec 28 00:03:15 2013 New Revision: 259976 URL: http://svnweb.freebsd.org/changeset/base/259976 Log: MFC r259756: Get rid of register keyword usage in gperf, it is totally obsolete for C++, and this allows gperf to be compiled for C++11 without a warning about it. Modified: stable/8/contrib/gperf/lib/getline.cc Directory Properties: stable/8/contrib/gperf/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/gperf/lib/getline.cc stable/9/contrib/gperf/lib/getline.cc Directory Properties: stable/10/ (props changed) stable/9/contrib/gperf/ (props changed) Modified: stable/8/contrib/gperf/lib/getline.cc ============================================================================== --- stable/8/contrib/gperf/lib/getline.cc Fri Dec 27 23:13:38 2013 (r259975) +++ stable/8/contrib/gperf/lib/getline.cc Sat Dec 28 00:03:15 2013 (r259976) @@ -57,7 +57,7 @@ getstr (char **lineptr, size_t *n, FILE for (;;) { - register int c = getc (stream); + int c = getc (stream); /* We always want at least one char left in the buffer, since we always (unless we get an error while reading the first char) From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 00:03:17 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 145F8178; Sat, 28 Dec 2013 00:03:17 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F06731CE4; Sat, 28 Dec 2013 00:03:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS03G2H090471; Sat, 28 Dec 2013 00:03:16 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS03GYK090470; Sat, 28 Dec 2013 00:03:16 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280003.rBS03GYK090470@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 00:03:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259976 - in stable: 10/contrib/gperf/lib 8/contrib/gperf/lib 9/contrib/gperf/lib X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 00:03:17 -0000 Author: dim Date: Sat Dec 28 00:03:15 2013 New Revision: 259976 URL: http://svnweb.freebsd.org/changeset/base/259976 Log: MFC r259756: Get rid of register keyword usage in gperf, it is totally obsolete for C++, and this allows gperf to be compiled for C++11 without a warning about it. Modified: stable/10/contrib/gperf/lib/getline.cc Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/8/contrib/gperf/lib/getline.cc stable/9/contrib/gperf/lib/getline.cc Directory Properties: stable/8/contrib/gperf/ (props changed) stable/9/contrib/gperf/ (props changed) Modified: stable/10/contrib/gperf/lib/getline.cc ============================================================================== --- stable/10/contrib/gperf/lib/getline.cc Fri Dec 27 23:13:38 2013 (r259975) +++ stable/10/contrib/gperf/lib/getline.cc Sat Dec 28 00:03:15 2013 (r259976) @@ -57,7 +57,7 @@ getstr (char **lineptr, size_t *n, FILE for (;;) { - register int c = getc (stream); + int c = getc (stream); /* We always want at least one char left in the buffer, since we always (unless we get an error while reading the first char) From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 00:16:59 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A4B83616; Sat, 28 Dec 2013 00:16:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 900A41D79; Sat, 28 Dec 2013 00:16:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS0GxQO095002; Sat, 28 Dec 2013 00:16:59 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS0GxmN095001; Sat, 28 Dec 2013 00:16:59 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280016.rBS0GxmN095001@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 00:16:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259977 - in stable: 10/sys/dev/advansys 9/sys/dev/advansys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 00:16:59 -0000 Author: dim Date: Sat Dec 28 00:16:58 2013 New Revision: 259977 URL: http://svnweb.freebsd.org/changeset/base/259977 Log: MFC r259825: Remove unused static function adwccbstatus() from adw(4). Reviewed by: gibbs Modified: stable/10/sys/dev/advansys/adwcam.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/dev/advansys/adwcam.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/dev/advansys/adwcam.c ============================================================================== --- stable/10/sys/dev/advansys/adwcam.c Sat Dec 28 00:03:15 2013 (r259976) +++ stable/10/sys/dev/advansys/adwcam.c Sat Dec 28 00:16:58 2013 (r259977) @@ -75,7 +75,6 @@ __FBSDID("$FreeBSD$"); #define ccb_acb_ptr spriv_ptr0 #define ccb_adw_ptr spriv_ptr1 -static __inline cam_status adwccbstatus(union ccb*); static __inline struct acb* adwgetacb(struct adw_softc *adw); static __inline void adwfreeacb(struct adw_softc *adw, struct acb *acb); @@ -100,12 +99,6 @@ static void adw_handle_device_reset(str static void adw_handle_bus_reset(struct adw_softc *adw, int initiated); -static __inline cam_status -adwccbstatus(union ccb* ccb) -{ - return (ccb->ccb_h.status & CAM_STATUS_MASK); -} - static __inline struct acb* adwgetacb(struct adw_softc *adw) { From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 00:16:59 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 58B1C615; Sat, 28 Dec 2013 00:16:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3B6911D78; Sat, 28 Dec 2013 00:16:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS0GxbN094996; Sat, 28 Dec 2013 00:16:59 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS0GxL0094995; Sat, 28 Dec 2013 00:16:59 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280016.rBS0GxL0094995@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 00:16: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: r259977 - in stable: 10/sys/dev/advansys 9/sys/dev/advansys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 00:16:59 -0000 Author: dim Date: Sat Dec 28 00:16:58 2013 New Revision: 259977 URL: http://svnweb.freebsd.org/changeset/base/259977 Log: MFC r259825: Remove unused static function adwccbstatus() from adw(4). Reviewed by: gibbs Modified: stable/9/sys/dev/advansys/adwcam.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/advansys/adwcam.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/dev/advansys/adwcam.c ============================================================================== --- stable/9/sys/dev/advansys/adwcam.c Sat Dec 28 00:03:15 2013 (r259976) +++ stable/9/sys/dev/advansys/adwcam.c Sat Dec 28 00:16:58 2013 (r259977) @@ -75,7 +75,6 @@ __FBSDID("$FreeBSD$"); #define ccb_acb_ptr spriv_ptr0 #define ccb_adw_ptr spriv_ptr1 -static __inline cam_status adwccbstatus(union ccb*); static __inline struct acb* adwgetacb(struct adw_softc *adw); static __inline void adwfreeacb(struct adw_softc *adw, struct acb *acb); @@ -100,12 +99,6 @@ static void adw_handle_device_reset(str static void adw_handle_bus_reset(struct adw_softc *adw, int initiated); -static __inline cam_status -adwccbstatus(union ccb* ccb) -{ - return (ccb->ccb_h.status & CAM_STATUS_MASK); -} - static __inline struct acb* adwgetacb(struct adw_softc *adw) { From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 00:53:21 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D26ECF0; Sat, 28 Dec 2013 00:53:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 091501F5C; Sat, 28 Dec 2013 00:53:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS0rKhK009107; Sat, 28 Dec 2013 00:53:20 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS0rKwf009106; Sat, 28 Dec 2013 00:53:20 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280053.rBS0rKwf009106@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 00:53:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259979 - in stable: 10/sys/dev/aic7xxx 9/sys/dev/aic7xxx X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 00:53:21 -0000 Author: dim Date: Sat Dec 28 00:53:20 2013 New Revision: 259979 URL: http://svnweb.freebsd.org/changeset/base/259979 Log: MFC r259827: Remove unused static const variable num_chip_names from aic79xx.c. Reviewed by: gibbs Modified: stable/10/sys/dev/aic7xxx/aic79xx.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/dev/aic7xxx/aic79xx.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/dev/aic7xxx/aic79xx.c ============================================================================== --- stable/10/sys/dev/aic7xxx/aic79xx.c Sat Dec 28 00:20:55 2013 (r259978) +++ stable/10/sys/dev/aic7xxx/aic79xx.c Sat Dec 28 00:53:20 2013 (r259979) @@ -64,7 +64,6 @@ char *ahd_chip_names[] = "aic7902", "aic7901A" }; -static const u_int num_chip_names = NUM_ELEMENTS(ahd_chip_names); /* * Hardware error codes. From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 00:53:20 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C63D6CEF; Sat, 28 Dec 2013 00:53: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B1E9D1F5B; Sat, 28 Dec 2013 00:53:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS0rKJ8009101; Sat, 28 Dec 2013 00:53:20 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS0rKZZ009100; Sat, 28 Dec 2013 00:53:20 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280053.rBS0rKZZ009100@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 00:53: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: r259979 - in stable: 10/sys/dev/aic7xxx 9/sys/dev/aic7xxx X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 00:53:20 -0000 Author: dim Date: Sat Dec 28 00:53:20 2013 New Revision: 259979 URL: http://svnweb.freebsd.org/changeset/base/259979 Log: MFC r259827: Remove unused static const variable num_chip_names from aic79xx.c. Reviewed by: gibbs Modified: stable/9/sys/dev/aic7xxx/aic79xx.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/aic7xxx/aic79xx.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/dev/aic7xxx/aic79xx.c ============================================================================== --- stable/9/sys/dev/aic7xxx/aic79xx.c Sat Dec 28 00:20:55 2013 (r259978) +++ stable/9/sys/dev/aic7xxx/aic79xx.c Sat Dec 28 00:53:20 2013 (r259979) @@ -64,7 +64,6 @@ char *ahd_chip_names[] = "aic7902", "aic7901A" }; -static const u_int num_chip_names = NUM_ELEMENTS(ahd_chip_names); /* * Hardware error codes. From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 01:03:31 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84959338; Sat, 28 Dec 2013 01:03: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6B12E101D; Sat, 28 Dec 2013 01:03:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS13VbW013088; Sat, 28 Dec 2013 01:03:31 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS13V2Y013086; Sat, 28 Dec 2013 01:03:31 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201312280103.rBS13V2Y013086@svn.freebsd.org> From: Peter Wemm Date: Sat, 28 Dec 2013 01:03:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259980 - in stable/10/sys: conf opencrypto X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 01:03:31 -0000 Author: peter Date: Sat Dec 28 01:03:30 2013 New Revision: 259980 URL: http://svnweb.freebsd.org/changeset/base/259980 Log: MFC r259109: allow ZFS to co-habitate with crypto / aesni Added: stable/10/sys/opencrypto/cryptodeflate.c - copied unchanged from r259979, stable/10/sys/opencrypto/deflate.c Deleted: stable/10/sys/opencrypto/deflate.c Modified: stable/10/sys/conf/files Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Sat Dec 28 00:53:20 2013 (r259979) +++ stable/10/sys/conf/files Sat Dec 28 01:03:30 2013 (r259980) @@ -3711,7 +3711,7 @@ opencrypto/crypto.c optional crypto opencrypto/cryptodev.c optional cryptodev opencrypto/cryptodev_if.m optional crypto opencrypto/cryptosoft.c optional crypto -opencrypto/deflate.c optional crypto +opencrypto/cryptodeflate.c optional crypto opencrypto/rmd160.c optional crypto | ipsec opencrypto/skipjack.c optional crypto opencrypto/xform.c optional crypto Copied: stable/10/sys/opencrypto/cryptodeflate.c (from r259979, stable/10/sys/opencrypto/deflate.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/opencrypto/cryptodeflate.c Sat Dec 28 01:03:30 2013 (r259980, copy of r259979, stable/10/sys/opencrypto/deflate.c) @@ -0,0 +1,265 @@ +/* $OpenBSD: deflate.c,v 1.3 2001/08/20 02:45:22 hugh Exp $ */ + +/*- + * Copyright (c) 2001 Jean-Jacques Bernard-Gundol (jj@wabbitt.org) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * This file contains a wrapper around the deflate algo compression + * functions using the zlib library (see net/zlib.{c,h}) + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_kdtrace.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +SDT_PROVIDER_DECLARE(opencrypto); +SDT_PROBE_DEFINE2(opencrypto, deflate, deflate_global, entry, entry, + "int", "u_int32_t"); +SDT_PROBE_DEFINE5(opencrypto, deflate, deflate_global, bad, bad, + "int", "int", "int", "int", "int"); +SDT_PROBE_DEFINE5(opencrypto, deflate, deflate_global, iter, iter, + "int", "int", "int", "int", "int"); +SDT_PROBE_DEFINE2(opencrypto, deflate, deflate_global, return, return, + "int", "u_int32_t"); + +int window_inflate = -1 * MAX_WBITS; +int window_deflate = -12; + +/* + * This function takes a block of data and (de)compress it using the deflate + * algorithm + */ + +u_int32_t +deflate_global(data, size, decomp, out) + u_int8_t *data; + u_int32_t size; + int decomp; + u_int8_t **out; +{ + /* decomp indicates whether we compress (0) or decompress (1) */ + + z_stream zbuf; + u_int8_t *output; + u_int32_t count, result; + int error, i; + struct deflate_buf *bufh, *bufp; + + SDT_PROBE2(opencrypto, deflate, deflate_global, entry, decomp, size); + + bufh = bufp = NULL; + if (!decomp) { + i = 1; + } else { + /* + * Choose a buffer with 4x the size of the input buffer + * for the size of the output buffer in the case of + * decompression. If it's not sufficient, it will need to be + * updated while the decompression is going on. + */ + i = 4; + } + /* + * Make sure we do have enough output space. Repeated calls to + * deflate need at least 6 bytes of output buffer space to avoid + * repeated markers. We will always provide at least 16 bytes. + */ + while ((size * i) < 16) + i++; + + bufh = bufp = malloc(sizeof(*bufp) + (size_t)(size * i), + M_CRYPTO_DATA, M_NOWAIT); + if (bufp == NULL) { + SDT_PROBE3(opencrypto, deflate, deflate_global, bad, + decomp, 0, __LINE__); + goto bad2; + } + bufp->next = NULL; + bufp->size = size * i; + + bzero(&zbuf, sizeof(z_stream)); + zbuf.zalloc = z_alloc; + zbuf.zfree = z_free; + zbuf.opaque = Z_NULL; + zbuf.next_in = data; /* Data that is going to be processed. */ + zbuf.avail_in = size; /* Total length of data to be processed. */ + zbuf.next_out = bufp->data; + zbuf.avail_out = bufp->size; + + error = decomp ? inflateInit2(&zbuf, window_inflate) : + deflateInit2(&zbuf, Z_DEFAULT_COMPRESSION, Z_METHOD, + window_deflate, Z_MEMLEVEL, Z_DEFAULT_STRATEGY); + if (error != Z_OK) { + SDT_PROBE3(opencrypto, deflate, deflate_global, bad, + decomp, error, __LINE__); + goto bad; + } + + for (;;) { + error = decomp ? inflate(&zbuf, Z_SYNC_FLUSH) : + deflate(&zbuf, Z_FINISH); + if (error != Z_OK && error != Z_STREAM_END) { + /* + * Unfortunately we are limited to 5 arguments, + * thus use two probes. + */ + SDT_PROBE5(opencrypto, deflate, deflate_global, bad, + decomp, error, __LINE__, + zbuf.avail_in, zbuf.avail_out); + SDT_PROBE5(opencrypto, deflate, deflate_global, bad, + decomp, error, __LINE__, + zbuf.state->dummy, zbuf.total_out); + goto bad; + } + SDT_PROBE5(opencrypto, deflate, deflate_global, iter, + decomp, error, __LINE__, + zbuf.avail_in, zbuf.avail_out); + SDT_PROBE5(opencrypto, deflate, deflate_global, iter, + decomp, error, __LINE__, + zbuf.state->dummy, zbuf.total_out); + if (decomp && zbuf.avail_in == 0 && error == Z_STREAM_END) { + /* Done. */ + break; + } else if (!decomp && error == Z_STREAM_END) { + /* Done. */ + break; + } else if (zbuf.avail_out == 0) { + struct deflate_buf *p; + + /* We need more output space for another iteration. */ + p = malloc(sizeof(*p) + (size_t)(size * i), + M_CRYPTO_DATA, M_NOWAIT); + if (p == NULL) { + SDT_PROBE3(opencrypto, deflate, deflate_global, + bad, decomp, 0, __LINE__); + goto bad; + } + p->next = NULL; + p->size = size * i; + bufp->next = p; + bufp = p; + zbuf.next_out = bufp->data; + zbuf.avail_out = bufp->size; + } else { + /* Unexpect result. */ + /* + * Unfortunately we are limited to 5 arguments, + * thus, again, use two probes. + */ + SDT_PROBE5(opencrypto, deflate, deflate_global, bad, + decomp, error, __LINE__, + zbuf.avail_in, zbuf.avail_out); + SDT_PROBE5(opencrypto, deflate, deflate_global, bad, + decomp, error, __LINE__, + zbuf.state->dummy, zbuf.total_out); + goto bad; + } + } + + result = count = zbuf.total_out; + + *out = malloc(result, M_CRYPTO_DATA, M_NOWAIT); + if (*out == NULL) { + SDT_PROBE3(opencrypto, deflate, deflate_global, bad, + decomp, 0, __LINE__); + goto bad; + } + if (decomp) + inflateEnd(&zbuf); + else + deflateEnd(&zbuf); + output = *out; + for (bufp = bufh; bufp != NULL; ) { + if (count > bufp->size) { + struct deflate_buf *p; + + bcopy(bufp->data, *out, bufp->size); + *out += bufp->size; + count -= bufp->size; + p = bufp; + bufp = bufp->next; + free(p, M_CRYPTO_DATA); + } else { + /* It should be the last buffer. */ + bcopy(bufp->data, *out, count); + *out += count; + free(bufp, M_CRYPTO_DATA); + bufp = NULL; + count = 0; + } + } + *out = output; + SDT_PROBE2(opencrypto, deflate, deflate_global, return, decomp, result); + return result; + +bad: + if (decomp) + inflateEnd(&zbuf); + else + deflateEnd(&zbuf); + for (bufp = bufh; bufp != NULL; ) { + struct deflate_buf *p; + + p = bufp; + bufp = bufp->next; + free(p, M_CRYPTO_DATA); + } +bad2: + *out = NULL; + return 0; +} + +void * +z_alloc(nil, type, size) + void *nil; + u_int type, size; +{ + void *ptr; + + ptr = malloc(type *size, M_CRYPTO_DATA, M_NOWAIT); + return ptr; +} + +void +z_free(nil, ptr) + void *nil, *ptr; +{ + free(ptr, M_CRYPTO_DATA); +} From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 01:08:41 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 364FD5C9; Sat, 28 Dec 2013 01:08: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1ECEF1050; Sat, 28 Dec 2013 01:08:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS18eKP013918; Sat, 28 Dec 2013 01:08:40 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS18et3013917; Sat, 28 Dec 2013 01:08:40 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280108.rBS18et3013917@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 01:08:40 +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: r259981 - in stable: 10/sys/dev/aic7xxx 9/sys/dev/aic7xxx X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 01:08:41 -0000 Author: dim Date: Sat Dec 28 01:08:40 2013 New Revision: 259981 URL: http://svnweb.freebsd.org/changeset/base/259981 Log: MFC r259833: Remove another unused static const variable num_chip_names, from aic7xxx.c this time. Noticed by: pluknet Modified: stable/9/sys/dev/aic7xxx/aic7xxx.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/aic7xxx/aic7xxx.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/dev/aic7xxx/aic7xxx.c ============================================================================== --- stable/9/sys/dev/aic7xxx/aic7xxx.c Sat Dec 28 01:03:30 2013 (r259980) +++ stable/9/sys/dev/aic7xxx/aic7xxx.c Sat Dec 28 01:08:40 2013 (r259981) @@ -73,7 +73,6 @@ char *ahc_chip_names[] = "aic7892", "aic7899" }; -static const u_int num_chip_names = NUM_ELEMENTS(ahc_chip_names); /* * Hardware error codes. From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 01:08:41 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 891955CA; Sat, 28 Dec 2013 01:08: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7447A1051; Sat, 28 Dec 2013 01:08:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS18fU1013924; Sat, 28 Dec 2013 01:08:41 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS18fgF013923; Sat, 28 Dec 2013 01:08:41 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280108.rBS18fgF013923@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 01:08:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259981 - in stable: 10/sys/dev/aic7xxx 9/sys/dev/aic7xxx X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 01:08:41 -0000 Author: dim Date: Sat Dec 28 01:08:40 2013 New Revision: 259981 URL: http://svnweb.freebsd.org/changeset/base/259981 Log: MFC r259833: Remove another unused static const variable num_chip_names, from aic7xxx.c this time. Noticed by: pluknet Modified: stable/10/sys/dev/aic7xxx/aic7xxx.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/dev/aic7xxx/aic7xxx.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/dev/aic7xxx/aic7xxx.c ============================================================================== --- stable/10/sys/dev/aic7xxx/aic7xxx.c Sat Dec 28 01:03:30 2013 (r259980) +++ stable/10/sys/dev/aic7xxx/aic7xxx.c Sat Dec 28 01:08:40 2013 (r259981) @@ -73,7 +73,6 @@ char *ahc_chip_names[] = "aic7892", "aic7899" }; -static const u_int num_chip_names = NUM_ELEMENTS(ahc_chip_names); /* * Hardware error codes. From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 01:15:35 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 13354A68; Sat, 28 Dec 2013 01:15:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F2BF510DE; Sat, 28 Dec 2013 01:15:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS1FY4T017488; Sat, 28 Dec 2013 01:15:34 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS1FYos017487; Sat, 28 Dec 2013 01:15:34 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280115.rBS1FYos017487@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 01:15: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: r259982 - in stable: 10/sys/netinet 9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 01:15:35 -0000 Author: dim Date: Sat Dec 28 01:15:34 2013 New Revision: 259982 URL: http://svnweb.freebsd.org/changeset/base/259982 Log: MFC r259839: In sys/netinet/in_mcast.c, inm_is_ifp_detached() is only used whenever KTR is defined, so put it between #ifdef KTR guards. This avoids a warning about a unused function if KTR is not enabled. Modified: stable/9/sys/netinet/in_mcast.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/netinet/in_mcast.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/netinet/in_mcast.c ============================================================================== --- stable/9/sys/netinet/in_mcast.c Sat Dec 28 01:08:40 2013 (r259981) +++ stable/9/sys/netinet/in_mcast.c Sat Dec 28 01:15:34 2013 (r259982) @@ -138,7 +138,9 @@ static int in_getmulti(struct ifnet *, c struct in_multi **); static int inm_get_source(struct in_multi *inm, const in_addr_t haddr, const int noalloc, struct ip_msource **pims); +#ifdef KTR static int inm_is_ifp_detached(const struct in_multi *); +#endif static int inm_merge(struct in_multi *, /*const*/ struct in_mfilter *); static void inm_purge(struct in_multi *); static void inm_reap(struct in_multi *); @@ -179,6 +181,7 @@ static SYSCTL_NODE(_net_inet_ip_mcast, O CTLFLAG_RD | CTLFLAG_MPSAFE, sysctl_ip_mcast_filters, "Per-interface stack-wide source filters"); +#ifdef KTR /* * Inline function which wraps assertions for a valid ifp. * The ifnet layer will set the ifma's ifp pointer to NULL if the ifp @@ -201,6 +204,7 @@ inm_is_ifp_detached(const struct in_mult return (ifp == NULL); } +#endif /* * Initialize an in_mfilter structure to a known state at t0, t1 From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 01:15:35 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5ABA1A69; Sat, 28 Dec 2013 01:15:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4607910DF; Sat, 28 Dec 2013 01:15:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS1FZFP017495; Sat, 28 Dec 2013 01:15:35 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS1FZ1X017494; Sat, 28 Dec 2013 01:15:35 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280115.rBS1FZ1X017494@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 01:15:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259982 - in stable: 10/sys/netinet 9/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 01:15:35 -0000 Author: dim Date: Sat Dec 28 01:15:34 2013 New Revision: 259982 URL: http://svnweb.freebsd.org/changeset/base/259982 Log: MFC r259839: In sys/netinet/in_mcast.c, inm_is_ifp_detached() is only used whenever KTR is defined, so put it between #ifdef KTR guards. This avoids a warning about a unused function if KTR is not enabled. Modified: stable/10/sys/netinet/in_mcast.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/netinet/in_mcast.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/netinet/in_mcast.c ============================================================================== --- stable/10/sys/netinet/in_mcast.c Sat Dec 28 01:08:40 2013 (r259981) +++ stable/10/sys/netinet/in_mcast.c Sat Dec 28 01:15:34 2013 (r259982) @@ -139,7 +139,9 @@ static int in_getmulti(struct ifnet *, c struct in_multi **); static int inm_get_source(struct in_multi *inm, const in_addr_t haddr, const int noalloc, struct ip_msource **pims); +#ifdef KTR static int inm_is_ifp_detached(const struct in_multi *); +#endif static int inm_merge(struct in_multi *, /*const*/ struct in_mfilter *); static void inm_purge(struct in_multi *); static void inm_reap(struct in_multi *); @@ -186,6 +188,7 @@ static STAILQ_HEAD(, ip_moptions) imo_gc STAILQ_HEAD_INITIALIZER(imo_gc_list); static struct task imo_gc_task = TASK_INITIALIZER(0, inp_gcmoptions, NULL); +#ifdef KTR /* * Inline function which wraps assertions for a valid ifp. * The ifnet layer will set the ifma's ifp pointer to NULL if the ifp @@ -208,6 +211,7 @@ inm_is_ifp_detached(const struct in_mult return (ifp == NULL); } +#endif /* * Initialize an in_mfilter structure to a known state at t0, t1 From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 01:19:48 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0EB7D79; Sat, 28 Dec 2013 01:19:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AC20B10F9; Sat, 28 Dec 2013 01:19:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS1JmDi017953; Sat, 28 Dec 2013 01:19:48 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS1JmlQ017952; Sat, 28 Dec 2013 01:19:48 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280119.rBS1JmlQ017952@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 01:19:48 +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: r259983 - in stable: 10/sys/netinet6 9/sys/netinet6 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 01:19:48 -0000 Author: dim Date: Sat Dec 28 01:19:48 2013 New Revision: 259983 URL: http://svnweb.freebsd.org/changeset/base/259983 Log: MFC r259840: In sys/netinet6/in6_mcast.c, in6m_is_ifp_detached() is only used whenever KTR is defined, so put it between #ifdef KTR guards. This avoids a warning about a unused function if KTR is not enabled. Modified: stable/9/sys/netinet6/in6_mcast.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/netinet6/in6_mcast.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/netinet6/in6_mcast.c ============================================================================== --- stable/9/sys/netinet6/in6_mcast.c Sat Dec 28 01:15:34 2013 (r259982) +++ stable/9/sys/netinet6/in6_mcast.c Sat Dec 28 01:19:48 2013 (r259983) @@ -131,7 +131,9 @@ static int in6_mc_get(struct ifnet *, co static int in6m_get_source(struct in6_multi *inm, const struct in6_addr *addr, const int noalloc, struct ip6_msource **pims); +#ifdef KTR static int in6m_is_ifp_detached(const struct in6_multi *); +#endif static int in6m_merge(struct in6_multi *, /*const*/ struct in6_mfilter *); static void in6m_purge(struct in6_multi *); static void in6m_reap(struct in6_multi *); @@ -175,6 +177,7 @@ static SYSCTL_NODE(_net_inet6_ip6_mcast, CTLFLAG_RD | CTLFLAG_MPSAFE, sysctl_ip6_mcast_filters, "Per-interface stack-wide source filters"); +#ifdef KTR /* * Inline function which wraps assertions for a valid ifp. * The ifnet layer will set the ifma's ifp pointer to NULL if the ifp @@ -197,6 +200,7 @@ in6m_is_ifp_detached(const struct in6_mu return (ifp == NULL); } +#endif /* * Initialize an in6_mfilter structure to a known state at t0, t1 From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 01:19:49 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 22CE0D7A; Sat, 28 Dec 2013 01:19:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0E52C10FC; Sat, 28 Dec 2013 01:19:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS1JmiK017959; Sat, 28 Dec 2013 01:19:48 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS1Jm9U017958; Sat, 28 Dec 2013 01:19:48 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280119.rBS1Jm9U017958@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 01:19:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259983 - in stable: 10/sys/netinet6 9/sys/netinet6 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 01:19:49 -0000 Author: dim Date: Sat Dec 28 01:19:48 2013 New Revision: 259983 URL: http://svnweb.freebsd.org/changeset/base/259983 Log: MFC r259840: In sys/netinet6/in6_mcast.c, in6m_is_ifp_detached() is only used whenever KTR is defined, so put it between #ifdef KTR guards. This avoids a warning about a unused function if KTR is not enabled. Modified: stable/10/sys/netinet6/in6_mcast.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/netinet6/in6_mcast.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/netinet6/in6_mcast.c ============================================================================== --- stable/10/sys/netinet6/in6_mcast.c Sat Dec 28 01:15:34 2013 (r259982) +++ stable/10/sys/netinet6/in6_mcast.c Sat Dec 28 01:19:48 2013 (r259983) @@ -131,7 +131,9 @@ static int in6_mc_get(struct ifnet *, co static int in6m_get_source(struct in6_multi *inm, const struct in6_addr *addr, const int noalloc, struct ip6_msource **pims); +#ifdef KTR static int in6m_is_ifp_detached(const struct in6_multi *); +#endif static int in6m_merge(struct in6_multi *, /*const*/ struct in6_mfilter *); static void in6m_purge(struct in6_multi *); static void in6m_reap(struct in6_multi *); @@ -175,6 +177,7 @@ static SYSCTL_NODE(_net_inet6_ip6_mcast, CTLFLAG_RD | CTLFLAG_MPSAFE, sysctl_ip6_mcast_filters, "Per-interface stack-wide source filters"); +#ifdef KTR /* * Inline function which wraps assertions for a valid ifp. * The ifnet layer will set the ifma's ifp pointer to NULL if the ifp @@ -197,6 +200,7 @@ in6m_is_ifp_detached(const struct in6_mu return (ifp == NULL); } +#endif /* * Initialize an in6_mfilter structure to a known state at t0, t1 From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 01:26:27 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 890DB186; Sat, 28 Dec 2013 01:26: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5A8681168; Sat, 28 Dec 2013 01:26:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS1QRvf021253; Sat, 28 Dec 2013 01:26:27 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS1QQdL021250; Sat, 28 Dec 2013 01:26:26 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280126.rBS1QQdL021250@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 01:26:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259984 - in stable: 10/sys/rpc 9/sys/rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 01:26:27 -0000 Author: dim Date: Sat Dec 28 01:26:26 2013 New Revision: 259984 URL: http://svnweb.freebsd.org/changeset/base/259984 Log: MFC r259842: Remove some unused static const strings under sys/rpc, which have never been used since the initial commit (r177633). MFC r259843: Move a static const variable to the #if 0 part where it is only used. (Note the #if 0 part has been inactive since the initial commit, r177633, so maybe it should be removed altogether). Modified: stable/9/sys/rpc/clnt_dg.c stable/9/sys/rpc/clnt_vc.c stable/9/sys/rpc/rpcb_clnt.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/rpc/clnt_dg.c stable/10/sys/rpc/clnt_vc.c stable/10/sys/rpc/rpcb_clnt.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/rpc/clnt_dg.c ============================================================================== --- stable/9/sys/rpc/clnt_dg.c Sat Dec 28 01:19:48 2013 (r259983) +++ stable/9/sys/rpc/clnt_dg.c Sat Dec 28 01:26:26 2013 (r259984) @@ -93,8 +93,6 @@ static struct clnt_ops clnt_dg_ops = { .cl_control = clnt_dg_control }; -static const char mem_err_clnt_dg[] = "clnt_dg_create: out of memory"; - /* * A pending RPC request which awaits a reply. Requests which have * received their reply will have cr_xid set to zero and cr_mrep to Modified: stable/9/sys/rpc/clnt_vc.c ============================================================================== --- stable/9/sys/rpc/clnt_vc.c Sat Dec 28 01:19:48 2013 (r259983) +++ stable/9/sys/rpc/clnt_vc.c Sat Dec 28 01:26:26 2013 (r259984) @@ -145,11 +145,6 @@ struct ct_data { static void clnt_vc_upcallsdone(struct ct_data *); -static const char clnt_vc_errstr[] = "%s : %s"; -static const char clnt_vc_str[] = "clnt_vc_create"; -static const char clnt_read_vc_str[] = "read_vc"; -static const char __no_mem_str[] = "out of memory"; - /* * Create a client handle for a connection. * Default options are set, which the user can change using clnt_control()'s. Modified: stable/9/sys/rpc/rpcb_clnt.c ============================================================================== --- stable/9/sys/rpc/rpcb_clnt.c Sat Dec 28 01:19:48 2013 (r259983) +++ stable/9/sys/rpc/rpcb_clnt.c Sat Dec 28 01:26:26 2013 (r259984) @@ -82,13 +82,13 @@ __FBSDID("$FreeBSD$"); #include static struct timeval tottimeout = { 60, 0 }; -static const struct timeval rmttimeout = { 3, 0 }; static const char nullstring[] = "\000"; static CLIENT *local_rpcb(void); #if 0 +static const struct timeval rmttimeout = { 3, 0 }; static struct timeval rpcbrmttime = { 15, 0 }; #define CACHESIZE 6 From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 01:26:28 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F7C5187; Sat, 28 Dec 2013 01:26:28 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 211761169; Sat, 28 Dec 2013 01:26:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS1QRPH021261; Sat, 28 Dec 2013 01:26:27 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS1QRIv021258; Sat, 28 Dec 2013 01:26:27 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280126.rBS1QRIv021258@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 01:26:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259984 - in stable: 10/sys/rpc 9/sys/rpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 01:26:28 -0000 Author: dim Date: Sat Dec 28 01:26:26 2013 New Revision: 259984 URL: http://svnweb.freebsd.org/changeset/base/259984 Log: MFC r259842: Remove some unused static const strings under sys/rpc, which have never been used since the initial commit (r177633). MFC r259843: Move a static const variable to the #if 0 part where it is only used. (Note the #if 0 part has been inactive since the initial commit, r177633, so maybe it should be removed altogether). Modified: stable/10/sys/rpc/clnt_dg.c stable/10/sys/rpc/clnt_vc.c stable/10/sys/rpc/rpcb_clnt.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/rpc/clnt_dg.c stable/9/sys/rpc/clnt_vc.c stable/9/sys/rpc/rpcb_clnt.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/rpc/clnt_dg.c ============================================================================== --- stable/10/sys/rpc/clnt_dg.c Sat Dec 28 01:19:48 2013 (r259983) +++ stable/10/sys/rpc/clnt_dg.c Sat Dec 28 01:26:26 2013 (r259984) @@ -93,8 +93,6 @@ static struct clnt_ops clnt_dg_ops = { .cl_control = clnt_dg_control }; -static const char mem_err_clnt_dg[] = "clnt_dg_create: out of memory"; - /* * A pending RPC request which awaits a reply. Requests which have * received their reply will have cr_xid set to zero and cr_mrep to Modified: stable/10/sys/rpc/clnt_vc.c ============================================================================== --- stable/10/sys/rpc/clnt_vc.c Sat Dec 28 01:19:48 2013 (r259983) +++ stable/10/sys/rpc/clnt_vc.c Sat Dec 28 01:26:26 2013 (r259984) @@ -108,11 +108,6 @@ static struct clnt_ops clnt_vc_ops = { static void clnt_vc_upcallsdone(struct ct_data *); -static const char clnt_vc_errstr[] = "%s : %s"; -static const char clnt_vc_str[] = "clnt_vc_create"; -static const char clnt_read_vc_str[] = "read_vc"; -static const char __no_mem_str[] = "out of memory"; - /* * Create a client handle for a connection. * Default options are set, which the user can change using clnt_control()'s. Modified: stable/10/sys/rpc/rpcb_clnt.c ============================================================================== --- stable/10/sys/rpc/rpcb_clnt.c Sat Dec 28 01:19:48 2013 (r259983) +++ stable/10/sys/rpc/rpcb_clnt.c Sat Dec 28 01:26:26 2013 (r259984) @@ -82,13 +82,13 @@ __FBSDID("$FreeBSD$"); #include static struct timeval tottimeout = { 60, 0 }; -static const struct timeval rmttimeout = { 3, 0 }; static const char nullstring[] = "\000"; static CLIENT *local_rpcb(void); #if 0 +static const struct timeval rmttimeout = { 3, 0 }; static struct timeval rpcbrmttime = { 15, 0 }; #define CACHESIZE 6 From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 01:33:43 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 68CAF626; Sat, 28 Dec 2013 01:33:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5408A11FA; Sat, 28 Dec 2013 01:33:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS1XhTZ024593; Sat, 28 Dec 2013 01:33:43 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS1Xh73024592; Sat, 28 Dec 2013 01:33:43 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280133.rBS1Xh73024592@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 01:33:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259985 - in stable: 10/sys/dev/mwl 9/sys/dev/mwl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 01:33:43 -0000 Author: dim Date: Sat Dec 28 01:33:42 2013 New Revision: 259985 URL: http://svnweb.freebsd.org/changeset/base/259985 Log: MFC r259869: In sys/dev/mwl/if_mwl.c, put the static RD4() function under #ifdef MWL_DEBUG guards, since it only used in DPRINTF statements. Modified: stable/10/sys/dev/mwl/if_mwl.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/dev/mwl/if_mwl.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/dev/mwl/if_mwl.c ============================================================================== --- stable/10/sys/dev/mwl/if_mwl.c Sat Dec 28 01:26:26 2013 (r259984) +++ stable/10/sys/dev/mwl/if_mwl.c Sat Dec 28 01:33:42 2013 (r259985) @@ -281,11 +281,13 @@ struct mwltxrec { * that all BAR 1 operations are done in the "hal" and * there should be no reference to them here. */ +#ifdef MWL_DEBUG static __inline uint32_t RD4(struct mwl_softc *sc, bus_size_t off) { return bus_space_read_4(sc->sc_io0t, sc->sc_io0h, off); } +#endif static __inline void WR4(struct mwl_softc *sc, bus_size_t off, uint32_t val) From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 01:33:43 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14D28625; Sat, 28 Dec 2013 01:33:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F352711F9; Sat, 28 Dec 2013 01:33:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS1XgiA024587; Sat, 28 Dec 2013 01:33:42 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS1XgUC024586; Sat, 28 Dec 2013 01:33:42 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280133.rBS1XgUC024586@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 01:33:42 +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: r259985 - in stable: 10/sys/dev/mwl 9/sys/dev/mwl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 01:33:43 -0000 Author: dim Date: Sat Dec 28 01:33:42 2013 New Revision: 259985 URL: http://svnweb.freebsd.org/changeset/base/259985 Log: MFC r259869: In sys/dev/mwl/if_mwl.c, put the static RD4() function under #ifdef MWL_DEBUG guards, since it only used in DPRINTF statements. Modified: stable/9/sys/dev/mwl/if_mwl.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/mwl/if_mwl.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/dev/mwl/if_mwl.c ============================================================================== --- stable/9/sys/dev/mwl/if_mwl.c Sat Dec 28 01:26:26 2013 (r259984) +++ stable/9/sys/dev/mwl/if_mwl.c Sat Dec 28 01:33:42 2013 (r259985) @@ -280,11 +280,13 @@ struct mwltxrec { * that all BAR 1 operations are done in the "hal" and * there should be no reference to them here. */ +#ifdef MWL_DEBUG static __inline uint32_t RD4(struct mwl_softc *sc, bus_size_t off) { return bus_space_read_4(sc->sc_io0t, sc->sc_io0h, off); } +#endif static __inline void WR4(struct mwl_softc *sc, bus_size_t off, uint32_t val) From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 01:42:20 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3C8D972; Sat, 28 Dec 2013 01:42: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8FA01128C; Sat, 28 Dec 2013 01:42:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS1gKtV027995; Sat, 28 Dec 2013 01:42:20 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS1gKAo027994; Sat, 28 Dec 2013 01:42:20 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280142.rBS1gKAo027994@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 01:42: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: r259986 - in stable: 10/sys/kern 9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 01:42:20 -0000 Author: dim Date: Sat Dec 28 01:42:20 2013 New Revision: 259986 URL: http://svnweb.freebsd.org/changeset/base/259986 Log: MFC r259875: In sys/kern/sched_ule.c, remove static function sched_both(), which is unused since r232207. Modified: stable/9/sys/kern/sched_ule.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/kern/sched_ule.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/kern/sched_ule.c ============================================================================== --- stable/9/sys/kern/sched_ule.c Sat Dec 28 01:33:42 2013 (r259985) +++ stable/9/sys/kern/sched_ule.c Sat Dec 28 01:42:20 2013 (r259986) @@ -779,30 +779,6 @@ sched_highest(const struct cpu_group *cg return high.cs_cpu; } -/* - * Simultaneously find the highest and lowest loaded cpu reachable via - * cg. - */ -static inline void -sched_both(const struct cpu_group *cg, cpuset_t mask, int *lowcpu, int *highcpu) -{ - struct cpu_search high; - struct cpu_search low; - - low.cs_cpu = -1; - low.cs_prefer = -1; - low.cs_pri = -1; - low.cs_limit = INT_MAX; - low.cs_mask = mask; - high.cs_cpu = -1; - high.cs_limit = -1; - high.cs_mask = mask; - cpu_search_both(cg, &low, &high); - *lowcpu = low.cs_cpu; - *highcpu = high.cs_cpu; - return; -} - static void sched_balance_group(struct cpu_group *cg) { From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 01:42:21 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04E04973; Sat, 28 Dec 2013 01:42:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E4E73128D; Sat, 28 Dec 2013 01:42:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS1gKD6028001; Sat, 28 Dec 2013 01:42:20 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS1gKGb028000; Sat, 28 Dec 2013 01:42:20 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280142.rBS1gKGb028000@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 01:42:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259986 - in stable: 10/sys/kern 9/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 01:42:21 -0000 Author: dim Date: Sat Dec 28 01:42:20 2013 New Revision: 259986 URL: http://svnweb.freebsd.org/changeset/base/259986 Log: MFC r259875: In sys/kern/sched_ule.c, remove static function sched_both(), which is unused since r232207. Modified: stable/10/sys/kern/sched_ule.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/kern/sched_ule.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/kern/sched_ule.c ============================================================================== --- stable/10/sys/kern/sched_ule.c Sat Dec 28 01:33:42 2013 (r259985) +++ stable/10/sys/kern/sched_ule.c Sat Dec 28 01:42:20 2013 (r259986) @@ -814,30 +814,6 @@ sched_highest(const struct cpu_group *cg return high.cs_cpu; } -/* - * Simultaneously find the highest and lowest loaded cpu reachable via - * cg. - */ -static inline void -sched_both(const struct cpu_group *cg, cpuset_t mask, int *lowcpu, int *highcpu) -{ - struct cpu_search high; - struct cpu_search low; - - low.cs_cpu = -1; - low.cs_prefer = -1; - low.cs_pri = -1; - low.cs_limit = INT_MAX; - low.cs_mask = mask; - high.cs_cpu = -1; - high.cs_limit = -1; - high.cs_mask = mask; - cpu_search_both(cg, &low, &high); - *lowcpu = low.cs_cpu; - *highcpu = high.cs_cpu; - return; -} - static void sched_balance_group(struct cpu_group *cg) { From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 01:47:19 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D2FC6D23; Sat, 28 Dec 2013 01:47: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BE72812A7; Sat, 28 Dec 2013 01:47:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS1lJGb028613; Sat, 28 Dec 2013 01:47:19 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS1lJdB028612; Sat, 28 Dec 2013 01:47:19 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280147.rBS1lJdB028612@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 01:47:19 +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: r259987 - in stable: 10/sys/dev/sym 9/sys/dev/sym X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 01:47:19 -0000 Author: dim Date: Sat Dec 28 01:47:19 2013 New Revision: 259987 URL: http://svnweb.freebsd.org/changeset/base/259987 Log: MFC r259880: In sys/dev/sym/sym_hipd.c, remove static functions sym_que_first(), sym_que_last() and sym_remque_tail(), which are all unused since r53790. Modified: stable/9/sys/dev/sym/sym_hipd.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/sym/sym_hipd.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/dev/sym/sym_hipd.c ============================================================================== --- stable/9/sys/dev/sym/sym_hipd.c Sat Dec 28 01:42:20 2013 (r259986) +++ stable/9/sys/dev/sym/sym_hipd.c Sat Dec 28 01:47:19 2013 (r259987) @@ -151,16 +151,6 @@ typedef struct sym_quehead { (ptr)->flink = (ptr); (ptr)->blink = (ptr); \ } while (0) -static __inline struct sym_quehead *sym_que_first(struct sym_quehead *head) -{ - return (head->flink == head) ? NULL : head->flink; -} - -static __inline struct sym_quehead *sym_que_last(struct sym_quehead *head) -{ - return (head->blink == head) ? NULL : head->blink; -} - static __inline void __sym_que_add(struct sym_quehead * new, struct sym_quehead * blink, struct sym_quehead * flink) @@ -222,17 +212,6 @@ static __inline struct sym_quehead *sym_ #define sym_insque_tail(new, head) __sym_que_add(new, (head)->blink, head) -static __inline struct sym_quehead *sym_remque_tail(struct sym_quehead *head) -{ - struct sym_quehead *elem = head->blink; - - if (elem != head) - __sym_que_del(elem->blink, head); - else - elem = NULL; - return elem; -} - /* * This one may be useful. */ From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 01:47:20 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 351C1D24; Sat, 28 Dec 2013 01:47: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2044012A8; Sat, 28 Dec 2013 01:47:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS1lJSK028619; Sat, 28 Dec 2013 01:47:19 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS1lJkT028618; Sat, 28 Dec 2013 01:47:19 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280147.rBS1lJkT028618@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 01:47:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259987 - in stable: 10/sys/dev/sym 9/sys/dev/sym X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 01:47:20 -0000 Author: dim Date: Sat Dec 28 01:47:19 2013 New Revision: 259987 URL: http://svnweb.freebsd.org/changeset/base/259987 Log: MFC r259880: In sys/dev/sym/sym_hipd.c, remove static functions sym_que_first(), sym_que_last() and sym_remque_tail(), which are all unused since r53790. Modified: stable/10/sys/dev/sym/sym_hipd.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/dev/sym/sym_hipd.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/dev/sym/sym_hipd.c ============================================================================== --- stable/10/sys/dev/sym/sym_hipd.c Sat Dec 28 01:42:20 2013 (r259986) +++ stable/10/sys/dev/sym/sym_hipd.c Sat Dec 28 01:47:19 2013 (r259987) @@ -154,16 +154,6 @@ typedef struct sym_quehead { (ptr)->flink = (ptr); (ptr)->blink = (ptr); \ } while (0) -static __inline struct sym_quehead *sym_que_first(struct sym_quehead *head) -{ - return (head->flink == head) ? NULL : head->flink; -} - -static __inline struct sym_quehead *sym_que_last(struct sym_quehead *head) -{ - return (head->blink == head) ? NULL : head->blink; -} - static __inline void __sym_que_add(struct sym_quehead * new, struct sym_quehead * blink, struct sym_quehead * flink) @@ -225,17 +215,6 @@ static __inline struct sym_quehead *sym_ #define sym_insque_tail(new, head) __sym_que_add(new, (head)->blink, head) -static __inline struct sym_quehead *sym_remque_tail(struct sym_quehead *head) -{ - struct sym_quehead *elem = head->blink; - - if (elem != head) - __sym_que_del(elem->blink, head); - else - elem = NULL; - return elem; -} - /* * This one may be useful. */ From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 01:52:52 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC6A5FE8; Sat, 28 Dec 2013 01:52: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B7A35130E; Sat, 28 Dec 2013 01:52:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS1qq36031692; Sat, 28 Dec 2013 01:52:52 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS1qqtv031691; Sat, 28 Dec 2013 01:52:52 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280152.rBS1qqtv031691@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 01:52:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259988 - in stable: 10/sys/kern 9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 01:52:52 -0000 Author: dim Date: Sat Dec 28 01:52:52 2013 New Revision: 259988 URL: http://svnweb.freebsd.org/changeset/base/259988 Log: MFC r259876: In sys/kern/subr_witness.c, remove static function witness_lock_order_key_empty(), which is unused since r181695. Modified: stable/9/sys/kern/subr_witness.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/kern/subr_witness.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/kern/subr_witness.c ============================================================================== --- stable/9/sys/kern/subr_witness.c Sat Dec 28 01:47:19 2013 (r259987) +++ stable/9/sys/kern/subr_witness.c Sat Dec 28 01:52:52 2013 (r259988) @@ -305,13 +305,6 @@ witness_lock_type_equal(struct witness * } static __inline int -witness_lock_order_key_empty(const struct witness_lock_order_key *key) -{ - - return (key->from == 0 && key->to == 0); -} - -static __inline int witness_lock_order_key_equal(const struct witness_lock_order_key *a, const struct witness_lock_order_key *b) { From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 01:52:53 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2CCC1FE9; Sat, 28 Dec 2013 01:52:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1845F130F; Sat, 28 Dec 2013 01:52:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS1qqpK031698; Sat, 28 Dec 2013 01:52:52 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS1qqum031697; Sat, 28 Dec 2013 01:52:52 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280152.rBS1qqum031697@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 01:52:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259988 - in stable: 10/sys/kern 9/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 01:52:53 -0000 Author: dim Date: Sat Dec 28 01:52:52 2013 New Revision: 259988 URL: http://svnweb.freebsd.org/changeset/base/259988 Log: MFC r259876: In sys/kern/subr_witness.c, remove static function witness_lock_order_key_empty(), which is unused since r181695. Modified: stable/10/sys/kern/subr_witness.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/kern/subr_witness.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/kern/subr_witness.c ============================================================================== --- stable/10/sys/kern/subr_witness.c Sat Dec 28 01:47:19 2013 (r259987) +++ stable/10/sys/kern/subr_witness.c Sat Dec 28 01:52:52 2013 (r259988) @@ -305,13 +305,6 @@ witness_lock_type_equal(struct witness * } static __inline int -witness_lock_order_key_empty(const struct witness_lock_order_key *key) -{ - - return (key->from == 0 && key->to == 0); -} - -static __inline int witness_lock_order_key_equal(const struct witness_lock_order_key *a, const struct witness_lock_order_key *b) { From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 01:56:05 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42675426; Sat, 28 Dec 2013 01:56:05 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 14141131C; Sat, 28 Dec 2013 01:56:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS1u45P032132; Sat, 28 Dec 2013 01:56:04 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS1u4Hh032131; Sat, 28 Dec 2013 01:56:04 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280156.rBS1u4Hh032131@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 01:56:04 +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: r259989 - in stable: 10/contrib/llvm/lib/Target/X86 9/contrib/llvm/lib/Target/X86 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 01:56:05 -0000 Author: dim Date: Sat Dec 28 01:56:04 2013 New Revision: 259989 URL: http://svnweb.freebsd.org/changeset/base/259989 Log: MFC r259888: Pull in r183971 from upstream llvm trunk: X86: cvtpi2ps is just an SSE instruction with MMX operands. It has no AVX equivalent. Give it the right register format so we can also emit it when AVX is enabled. This should fix a "Cannot select: intrinsic %llvm.x86.sse.cvtpi2ps" fatal error in clang while building the gnuradio port for amd64. Reported by: db Modified: stable/9/contrib/llvm/lib/Target/X86/X86InstrMMX.td Directory Properties: stable/9/contrib/llvm/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/llvm/lib/Target/X86/X86InstrMMX.td Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/llvm/lib/Target/X86/X86InstrMMX.td ============================================================================== --- stable/9/contrib/llvm/lib/Target/X86/X86InstrMMX.td Sat Dec 28 01:52:52 2013 (r259988) +++ stable/9/contrib/llvm/lib/Target/X86/X86InstrMMX.td Sat Dec 28 01:56:04 2013 (r259989) @@ -189,13 +189,14 @@ multiclass sse12_cvt_pint opc, R multiclass sse12_cvt_pint_3addr opc, RegisterClass SrcRC, RegisterClass DstRC, Intrinsic Int, X86MemOperand x86memop, PatFrag ld_frag, string asm, Domain d> { - def irr : PI; - def irm : PI; + def irr : MMXPI; + def irm : MMXPI; } //===----------------------------------------------------------------------===// From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 01:56:05 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B1AA427; Sat, 28 Dec 2013 01:56:05 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5CD6B131D; Sat, 28 Dec 2013 01:56:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS1u5cC032138; Sat, 28 Dec 2013 01:56:05 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS1u5er032137; Sat, 28 Dec 2013 01:56:05 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280156.rBS1u5er032137@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 01:56:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259989 - in stable: 10/contrib/llvm/lib/Target/X86 9/contrib/llvm/lib/Target/X86 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 01:56:05 -0000 Author: dim Date: Sat Dec 28 01:56:04 2013 New Revision: 259989 URL: http://svnweb.freebsd.org/changeset/base/259989 Log: MFC r259888: Pull in r183971 from upstream llvm trunk: X86: cvtpi2ps is just an SSE instruction with MMX operands. It has no AVX equivalent. Give it the right register format so we can also emit it when AVX is enabled. This should fix a "Cannot select: intrinsic %llvm.x86.sse.cvtpi2ps" fatal error in clang while building the gnuradio port for amd64. Reported by: db Modified: stable/10/contrib/llvm/lib/Target/X86/X86InstrMMX.td Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/contrib/llvm/lib/Target/X86/X86InstrMMX.td Directory Properties: stable/9/contrib/llvm/ (props changed) Modified: stable/10/contrib/llvm/lib/Target/X86/X86InstrMMX.td ============================================================================== --- stable/10/contrib/llvm/lib/Target/X86/X86InstrMMX.td Sat Dec 28 01:52:52 2013 (r259988) +++ stable/10/contrib/llvm/lib/Target/X86/X86InstrMMX.td Sat Dec 28 01:56:04 2013 (r259989) @@ -189,13 +189,14 @@ multiclass sse12_cvt_pint opc, R multiclass sse12_cvt_pint_3addr opc, RegisterClass SrcRC, RegisterClass DstRC, Intrinsic Int, X86MemOperand x86memop, PatFrag ld_frag, string asm, Domain d> { - def irr : PI; - def irm : PI; + def irr : MMXPI; + def irm : MMXPI; } //===----------------------------------------------------------------------===// From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 02:00:33 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC4537EA; Sat, 28 Dec 2013 02:00:33 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D81FB132B; Sat, 28 Dec 2013 02:00:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS20XDr033457; Sat, 28 Dec 2013 02:00:33 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS20Xna033456; Sat, 28 Dec 2013 02:00:33 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280200.rBS20Xna033456@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 02:00:33 +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: r259990 - in stable: 10/sys/kern 9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 02:00:34 -0000 Author: dim Date: Sat Dec 28 02:00:33 2013 New Revision: 259990 URL: http://svnweb.freebsd.org/changeset/base/259990 Log: MFC r259892: In sys/kern/vfs_mountroot.c, remove static function parse_isspace(), which is unused since r214006. Modified: stable/9/sys/kern/vfs_mountroot.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/kern/vfs_mountroot.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/kern/vfs_mountroot.c ============================================================================== --- stable/9/sys/kern/vfs_mountroot.c Sat Dec 28 01:56:04 2013 (r259989) +++ stable/9/sys/kern/vfs_mountroot.c Sat Dec 28 02:00:33 2013 (r259990) @@ -389,13 +389,6 @@ parse_advance(char **conf) (*conf)++; } -static __inline int -parse_isspace(int c) -{ - - return ((c == ' ' || c == '\t' || c == '\n') ? 1 : 0); -} - static int parse_skipto(char **conf, int mc) { From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 02:00:34 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4CFF17EB; Sat, 28 Dec 2013 02:00: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 39667132C; Sat, 28 Dec 2013 02:00:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS20Y6L033464; Sat, 28 Dec 2013 02:00:34 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS20Y1t033463; Sat, 28 Dec 2013 02:00:34 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280200.rBS20Y1t033463@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 02:00:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259990 - in stable: 10/sys/kern 9/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 02:00:34 -0000 Author: dim Date: Sat Dec 28 02:00:33 2013 New Revision: 259990 URL: http://svnweb.freebsd.org/changeset/base/259990 Log: MFC r259892: In sys/kern/vfs_mountroot.c, remove static function parse_isspace(), which is unused since r214006. Modified: stable/10/sys/kern/vfs_mountroot.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/kern/vfs_mountroot.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/kern/vfs_mountroot.c ============================================================================== --- stable/10/sys/kern/vfs_mountroot.c Sat Dec 28 01:56:04 2013 (r259989) +++ stable/10/sys/kern/vfs_mountroot.c Sat Dec 28 02:00:33 2013 (r259990) @@ -389,13 +389,6 @@ parse_advance(char **conf) (*conf)++; } -static __inline int -parse_isspace(int c) -{ - - return ((c == ' ' || c == '\t' || c == '\n') ? 1 : 0); -} - static int parse_skipto(char **conf, int mc) { From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 02:07:30 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19166A86; Sat, 28 Dec 2013 02:07:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0528813A3; Sat, 28 Dec 2013 02:07:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS27Tvr036404; Sat, 28 Dec 2013 02:07:29 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS27TJh036403; Sat, 28 Dec 2013 02:07:29 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280207.rBS27TJh036403@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 02:07:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259991 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 02:07:30 -0000 Author: dim Date: Sat Dec 28 02:07:29 2013 New Revision: 259991 URL: http://svnweb.freebsd.org/changeset/base/259991 Log: MFC r259893: In sys/vm/vm_pageout.c, since vm_pageout_worker() takes a void * as argument, cast the incoming 0 argument to void *, to silence a warning from clang 3.4 ("expression which evaluates to zero treated as a null pointer constant of type 'void *' [-Wnon-literal-null-conversion]"). Modified: stable/10/sys/vm/vm_pageout.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_pageout.c ============================================================================== --- stable/10/sys/vm/vm_pageout.c Sat Dec 28 02:00:33 2013 (r259990) +++ stable/10/sys/vm/vm_pageout.c Sat Dec 28 02:07:29 2013 (r259991) @@ -1699,7 +1699,7 @@ vm_pageout(void) } } #endif - vm_pageout_worker((uintptr_t)0); + vm_pageout_worker((void *)(uintptr_t)0); } /* From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 02:11:18 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 066EDBC3; Sat, 28 Dec 2013 02:11:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E490813AC; Sat, 28 Dec 2013 02:11:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS2BH5a039630; Sat, 28 Dec 2013 02:11:17 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS2BHpB039629; Sat, 28 Dec 2013 02:11:17 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280211.rBS2BHpB039629@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 02:11:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259992 - in stable: 10/sys/dev/cxgb/common 9/sys/dev/cxgb/common X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 02:11:18 -0000 Author: dim Date: Sat Dec 28 02:11:17 2013 New Revision: 259992 URL: http://svnweb.freebsd.org/changeset/base/259992 Log: MFC r259896: In sys/dev/cxgb/common/cxgb_mc5.c, remove static function dbgi_wr_addr3(), which is unused since r167514. Modified: stable/9/sys/dev/cxgb/common/cxgb_mc5.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/cxgb/common/cxgb_mc5.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/dev/cxgb/common/cxgb_mc5.c ============================================================================== --- stable/9/sys/dev/cxgb/common/cxgb_mc5.c Sat Dec 28 02:07:29 2013 (r259991) +++ stable/9/sys/dev/cxgb/common/cxgb_mc5.c Sat Dec 28 02:11:17 2013 (r259992) @@ -98,13 +98,6 @@ static int mc5_cmd_write(adapter_t *adap F_DBGIRSPVALID, 1, MAX_WRITE_ATTEMPTS, 1); } -static inline void dbgi_wr_addr3(adapter_t *adapter, u32 v1, u32 v2, u32 v3) -{ - t3_write_reg(adapter, A_MC5_DB_DBGI_REQ_ADDR0, v1); - t3_write_reg(adapter, A_MC5_DB_DBGI_REQ_ADDR1, v2); - t3_write_reg(adapter, A_MC5_DB_DBGI_REQ_ADDR2, v3); -} - static inline void dbgi_wr_data3(adapter_t *adapter, u32 v1, u32 v2, u32 v3) { t3_write_reg(adapter, A_MC5_DB_DBGI_REQ_DATA0, v1); From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 02:11:18 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 587E8BC4; Sat, 28 Dec 2013 02:11:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 444FC13AD; Sat, 28 Dec 2013 02:11:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS2BINK039637; Sat, 28 Dec 2013 02:11:18 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS2BIME039636; Sat, 28 Dec 2013 02:11:18 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280211.rBS2BIME039636@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 02:11:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259992 - in stable: 10/sys/dev/cxgb/common 9/sys/dev/cxgb/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 02:11:18 -0000 Author: dim Date: Sat Dec 28 02:11:17 2013 New Revision: 259992 URL: http://svnweb.freebsd.org/changeset/base/259992 Log: MFC r259896: In sys/dev/cxgb/common/cxgb_mc5.c, remove static function dbgi_wr_addr3(), which is unused since r167514. Modified: stable/10/sys/dev/cxgb/common/cxgb_mc5.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/dev/cxgb/common/cxgb_mc5.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/dev/cxgb/common/cxgb_mc5.c ============================================================================== --- stable/10/sys/dev/cxgb/common/cxgb_mc5.c Sat Dec 28 02:07:29 2013 (r259991) +++ stable/10/sys/dev/cxgb/common/cxgb_mc5.c Sat Dec 28 02:11:17 2013 (r259992) @@ -98,13 +98,6 @@ static int mc5_cmd_write(adapter_t *adap F_DBGIRSPVALID, 1, MAX_WRITE_ATTEMPTS, 1); } -static inline void dbgi_wr_addr3(adapter_t *adapter, u32 v1, u32 v2, u32 v3) -{ - t3_write_reg(adapter, A_MC5_DB_DBGI_REQ_ADDR0, v1); - t3_write_reg(adapter, A_MC5_DB_DBGI_REQ_ADDR1, v2); - t3_write_reg(adapter, A_MC5_DB_DBGI_REQ_ADDR2, v3); -} - static inline void dbgi_wr_data3(adapter_t *adapter, u32 v1, u32 v2, u32 v3) { t3_write_reg(adapter, A_MC5_DB_DBGI_REQ_DATA0, v1); From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 02:15:31 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1C4E6ED5; Sat, 28 Dec 2013 02:15: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E1C921451; Sat, 28 Dec 2013 02:15:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS2FUk2040324; Sat, 28 Dec 2013 02:15:30 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS2FUgV040323; Sat, 28 Dec 2013 02:15:30 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280215.rBS2FUgV040323@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 02:15:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259993 - in stable: 10/sys/dev/cxgb/ulp/tom 9/sys/dev/cxgb/ulp/tom X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 02:15:31 -0000 Author: dim Date: Sat Dec 28 02:15:30 2013 New Revision: 259993 URL: http://svnweb.freebsd.org/changeset/base/259993 Log: MFC r259897: In sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c, remove static functions mk_cpl_barrier_ulp(), mk_get_tcb_ulp() and mk_set_tcb_field_ulp(), which are all unused since r237263. Modified: stable/9/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c ============================================================================== --- stable/9/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Sat Dec 28 02:11:17 2013 (r259992) +++ stable/9/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Sat Dec 28 02:15:30 2013 (r259993) @@ -1794,53 +1794,6 @@ do_wr_ack(struct sge_qset *qs, struct rs return (0); } -/* - * Build a CPL_BARRIER message as payload of a ULP_TX_PKT command. - */ -static inline void -mk_cpl_barrier_ulp(struct cpl_barrier *b) -{ - struct ulp_txpkt *txpkt = (struct ulp_txpkt *)b; - - txpkt->cmd_dest = htonl(V_ULPTX_CMD(ULP_TXPKT)); - txpkt->len = htonl(V_ULPTX_NFLITS(sizeof(*b) / 8)); - b->opcode = CPL_BARRIER; -} - -/* - * Build a CPL_GET_TCB message as payload of a ULP_TX_PKT command. - */ -static inline void -mk_get_tcb_ulp(struct cpl_get_tcb *req, unsigned int tid, unsigned int cpuno) -{ - struct ulp_txpkt *txpkt = (struct ulp_txpkt *)req; - - txpkt = (struct ulp_txpkt *)req; - txpkt->cmd_dest = htonl(V_ULPTX_CMD(ULP_TXPKT)); - txpkt->len = htonl(V_ULPTX_NFLITS(sizeof(*req) / 8)); - OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_GET_TCB, tid)); - req->cpuno = htons(cpuno); -} - -/* - * Build a CPL_SET_TCB_FIELD message as payload of a ULP_TX_PKT command. - */ -static inline void -mk_set_tcb_field_ulp(struct cpl_set_tcb_field *req, unsigned int tid, - unsigned int word, uint64_t mask, uint64_t val) -{ - struct ulp_txpkt *txpkt = (struct ulp_txpkt *)req; - - txpkt->cmd_dest = htonl(V_ULPTX_CMD(ULP_TXPKT)); - txpkt->len = htonl(V_ULPTX_NFLITS(sizeof(*req) / 8)); - OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_SET_TCB_FIELD, tid)); - req->reply = V_NO_REPLY(1); - req->cpu_idx = 0; - req->word = htons(word); - req->mask = htobe64(mask); - req->val = htobe64(val); -} - void t3_init_cpl_io(struct adapter *sc) { From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 02:15:31 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70BE9ED6; Sat, 28 Dec 2013 02:15: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4464D1452; Sat, 28 Dec 2013 02:15:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS2FVgx040330; Sat, 28 Dec 2013 02:15:31 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS2FVA2040329; Sat, 28 Dec 2013 02:15:31 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280215.rBS2FVA2040329@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 02:15:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259993 - in stable: 10/sys/dev/cxgb/ulp/tom 9/sys/dev/cxgb/ulp/tom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 02:15:31 -0000 Author: dim Date: Sat Dec 28 02:15:30 2013 New Revision: 259993 URL: http://svnweb.freebsd.org/changeset/base/259993 Log: MFC r259897: In sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c, remove static functions mk_cpl_barrier_ulp(), mk_get_tcb_ulp() and mk_set_tcb_field_ulp(), which are all unused since r237263. Modified: stable/10/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c ============================================================================== --- stable/10/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Sat Dec 28 02:11:17 2013 (r259992) +++ stable/10/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Sat Dec 28 02:15:30 2013 (r259993) @@ -1794,53 +1794,6 @@ do_wr_ack(struct sge_qset *qs, struct rs return (0); } -/* - * Build a CPL_BARRIER message as payload of a ULP_TX_PKT command. - */ -static inline void -mk_cpl_barrier_ulp(struct cpl_barrier *b) -{ - struct ulp_txpkt *txpkt = (struct ulp_txpkt *)b; - - txpkt->cmd_dest = htonl(V_ULPTX_CMD(ULP_TXPKT)); - txpkt->len = htonl(V_ULPTX_NFLITS(sizeof(*b) / 8)); - b->opcode = CPL_BARRIER; -} - -/* - * Build a CPL_GET_TCB message as payload of a ULP_TX_PKT command. - */ -static inline void -mk_get_tcb_ulp(struct cpl_get_tcb *req, unsigned int tid, unsigned int cpuno) -{ - struct ulp_txpkt *txpkt = (struct ulp_txpkt *)req; - - txpkt = (struct ulp_txpkt *)req; - txpkt->cmd_dest = htonl(V_ULPTX_CMD(ULP_TXPKT)); - txpkt->len = htonl(V_ULPTX_NFLITS(sizeof(*req) / 8)); - OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_GET_TCB, tid)); - req->cpuno = htons(cpuno); -} - -/* - * Build a CPL_SET_TCB_FIELD message as payload of a ULP_TX_PKT command. - */ -static inline void -mk_set_tcb_field_ulp(struct cpl_set_tcb_field *req, unsigned int tid, - unsigned int word, uint64_t mask, uint64_t val) -{ - struct ulp_txpkt *txpkt = (struct ulp_txpkt *)req; - - txpkt->cmd_dest = htonl(V_ULPTX_CMD(ULP_TXPKT)); - txpkt->len = htonl(V_ULPTX_NFLITS(sizeof(*req) / 8)); - OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_SET_TCB_FIELD, tid)); - req->reply = V_NO_REPLY(1); - req->cpu_idx = 0; - req->word = htons(word); - req->mask = htobe64(mask); - req->val = htobe64(val); -} - void t3_init_cpl_io(struct adapter *sc) { From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 13:08:48 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52C4D785; Sat, 28 Dec 2013 13:08:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2304D1B61; Sat, 28 Dec 2013 13:08:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBSD8mLH093332; Sat, 28 Dec 2013 13:08:48 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBSD8lFo093330; Sat, 28 Dec 2013 13:08:47 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201312281308.rBSD8lFo093330@svn.freebsd.org> From: Julio Merino Date: Sat, 28 Dec 2013 13:08:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260002 - in stable/10: share/misc usr.bin/calendar/calendars X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 13:08:48 -0000 Author: jmmv Date: Sat Dec 28 13:08:47 2013 New Revision: 260002 URL: http://svnweb.freebsd.org/changeset/base/260002 Log: MFC r257631: Add myself to the committers-src list and to the calendar. Modified: stable/10/share/misc/committers-src.dot stable/10/usr.bin/calendar/calendars/calendar.freebsd Directory Properties: stable/10/ (props changed) Modified: stable/10/share/misc/committers-src.dot ============================================================================== --- stable/10/share/misc/committers-src.dot Sat Dec 28 05:50:53 2013 (r260001) +++ stable/10/share/misc/committers-src.dot Sat Dec 28 13:08:47 2013 (r260002) @@ -190,6 +190,7 @@ jkoshy [label="A. Joseph Koshy\njkoshy@F jlh [label="Jeremie Le Hen\njlh@FreeBSD.org\n2012/04/22"] jls [label="Jordan Sissel\njls@FreeBSD.org\n2006/12/06"] jmg [label="John-Mark Gurney\njmg@FreeBSD.org\n1997/02/13"] +jmmv [label="Julio Merino\njmmv@FreeBSD.org\n2013/11/02"] joerg [label="Joerg Wunsch\njoerg@FreeBSD.org\n1993/11/14"] jon [label="Jonathan Chen\njon@FreeBSD.org\n2000/10/17"] jonathan [label="Jonathan Anderson\njonathan@FreeBSD.org\n2010/10/07"] @@ -607,6 +608,7 @@ rmacklem -> jwd rpaulo -> avg rpaulo -> bschmidt rpaulo -> dim +rpaulo -> jmmv rrs -> brucec rrs -> jchandra Modified: stable/10/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- stable/10/usr.bin/calendar/calendars/calendar.freebsd Sat Dec 28 05:50:53 2013 (r260001) +++ stable/10/usr.bin/calendar/calendars/calendar.freebsd Sat Dec 28 13:08:47 2013 (r260002) @@ -252,6 +252,7 @@ 08/06 Damjan Marion born in Rijeka, Croatia, 1978 08/07 Jonathan Mini born in San Mateo, California, United States, 1979 08/08 Mikolaj Golub born in Kharkov, USSR, 1977 +08/10 Julio Merino born in Barcelona, Spain, 1984 08/10 Peter Pentchev born in Sofia, Bulgaria, 1977 08/12 Joe Marcus Clarke born in Lakeland, Florida, United States, 1976 08/12 Max Brazhnikov born in Leningradskaya, Russian Federation, 1979 From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 13:41:10 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0196DF1; Sat, 28 Dec 2013 13:41:10 +0000 (UTC) Received: from frv154.fwdcdn.com (frv154.fwdcdn.com [212.42.77.154]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 752D71E2F; Sat, 28 Dec 2013 13:41:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ukr.net; s=fsm; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=pkflPrp1H9a8/r0CY/C75YNtGOL2eeeHQvf9P4KTYw4=; b=sq/yVNRxwFyp1x9h07sfZ9e4EITkqt9L5qhcuhG0kioEvICqfW8ZbM0jgp0iC+hnN+j9APXlEPv87KSa506bDp1Wgv63TQsdcdrp/L+A+gBQxKMvu0slLw7tk7CSF/GLM2f/tAEONv9jUIO6qZ580GDnZSfAGmdpu/Tfc+5L8qo=; Received: from 147-91-207-82.ip.ukrtel.net ([82.207.91.147] helo=nonamehost.local) by frv154.fwdcdn.com with esmtpsa ID 1Vwu8U-000K7u-Bn ; Sat, 28 Dec 2013 15:41:02 +0200 Date: Sat, 28 Dec 2013 15:41:01 +0200 From: Ivan Klymenko To: Peter Wemm Subject: Re: svn commit: r259980 - in stable/10/sys: conf opencrypto Message-ID: <20131228154101.4f9b9f37@nonamehost.local> In-Reply-To: <201312280103.rBS13V2Y013086@svn.freebsd.org> References: <201312280103.rBS13V2Y013086@svn.freebsd.org> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.22; amd64-portbld-freebsd10.0) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Authentication-Result: IP=82.207.91.147; mail.from=fidaj@ukr.net; dkim=pass; header.d=ukr.net Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 13:41:10 -0000 =D0=92 Sat, 28 Dec 2013 01:03:31 +0000 (UTC) Peter Wemm =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > Author: peter > Date: Sat Dec 28 01:03:30 2013 > New Revision: 259980 > URL: http://svnweb.freebsd.org/changeset/base/259980 >=20 > Log: > MFC r259109: allow ZFS to co-habitate with crypto / aesni >=20 > Added: > stable/10/sys/opencrypto/cryptodeflate.c > - copied unchanged from r259979, > stable/10/sys/opencrypto/deflate.c Deleted: > stable/10/sys/opencrypto/deflate.c > Modified: > stable/10/sys/conf/files > Directory Properties: > stable/10/ (props changed) >=20 ... ln -sf /usr/obj/usr/src/sys/mk10/opt_acpi.h opt_acpi.h --- .depend --- rm -f .depend CC=3D'cc ' mkdep -f .depend -a -nostdinc -D_KERNEL -DKLD_MODULE -DHAVE_KE= RNEL_OPTION_HEADERS -I. -I@ -I@/contrib/altq -I/usr/obj/usr/src/sys/mk10 -s= td=3Diso9899:1999 /usr/src/sys/modules/cpufreq/../../dev/cpufreq/ichss.c = /usr/src/sys/modules/cpufreq/../../x86/cpufreq/est.c /usr/src/sys/modules/c= pufreq/../../x86/cpufreq/hwpstate.c /usr/src/sys/modules/cpufreq/../../x86/= cpufreq/p4tcc.c /usr/src/sys/modules/cpufreq/../../x86/cpufreq/powernow.c =3D=3D=3D> crypto (depend) --- @ --- @ -> /usr/src/sys --- cryptodev_if.c --- make[4]: make[4]: don't know how to make deflate.c. Stop make[4]: stopped in /usr/src/sys/modules/crypto *** [depend] Error code 2 make[3]: stopped in /usr/src/sys/modules 1 error make[3]: stopped in /usr/src/sys/modules *** [modules-depend] Error code 2 make[2]: stopped in /usr/obj/usr/src/sys/mk10 --- .depend --- make -V CFILES_ZFS | MKDEP_CPP=3D"cc -E" CC=3D"cc " xargs mkdep -a -f .ne= wdep -DFREEBSD_NAMECACHE -DBUILDING_ZFS -nostdinc -I/usr/src/sys/cddl/compa= t/opensolaris -I/usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs -I/= usr/src/sys/cddl/contrib/opensolaris/uts/common/zmod -I/usr/src/sys/cddl/co= ntrib/opensolaris/uts/common -I/usr/src/sys -I/usr/src/sys/cddl/contrib/ope= nsolaris/common/zfs -I/usr/src/sys/cddl/contrib/opensolaris/common -O2 -pip= e -fno-strict-aliasing -march=3Dcorei7-avx -std=3Dc99 -g -Wall -Wredundant-= decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-= arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions = -Wmissing-include-dirs -fdiagnostics-show-option -Wno-error-tautological-c= ompare -Wno-error-empty-body -Wno-error-parentheses-equality -nostdinc -= I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -I/usr/src/sys/contrib/ipfilt= er -I/usr/src/sys/dev/ath -I/usr/src/sys/dev/ath/ath_hal -I/usr/src/sys/con= trib/dev/ath/ath_hal -I/usr/src/sys/contrib/ngatm -I/usr/src/sys/dev/twa -I= /usr/src/sys/dev/cxgb -I/usr/src/sys/dev/cxgbe -I/usr/src/sys/contrib/libfd= t -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-omit-f= rame-pointer -mno-omit-leaf-frame-pointer -mno-aes -mno-avx -mcmodel=3Dkern= el -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-t= ables -ffreestanding -fstack-protector -Wno-unknown-pragmas -Wno-missing-pr= ototypes -Wno-undef -Wno-strict-prototypes -Wno-cast-qual -Wno-parentheses = -Wno-redundant-decls -Wno-missing-braces -Wno-uninitialized -Wno-unused -Wn= o-inline -Wno-switch -Wno-pointer-arith -Wno-unknown-pragmas -include /usr/= src/sys/cddl/compat/opensolaris/sys/debug_compat.h make -V SFILES_NOZFS | MKDEP_CPP=3D"cc -E" xargs mkdep -a -f .newdep -x a= ssembler-with-cpp -DLOCORE -O2 -pipe -fno-strict-aliasing -march=3Dcorei7-a= vx -std=3Dc99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototyp= es -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno= -pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-sho= w-option -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error= -parentheses-equality -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib= /altq -I/usr/src/sys/contrib/ipfilter -I/usr/src/sys/dev/ath -I/usr/src/sys= /dev/ath/ath_hal -I/usr/src/sys/contrib/dev/ath/ath_hal -I/usr/src/sys/cont= rib/ngatm -I/usr/src/sys/dev/twa -I/usr/src/sys/dev/cxgb -I/usr/src/sys/dev= /cxgbe -I/usr/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS= -include opt_global.h -fno-omit-frame-pointer -mno-omit-leaf-frame-pointe= r -mno-aes -mno-avx -mcmodel=3Dkernel -mno-red-zone -mno-mmx -mno-sse -msof= t-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector=20 make -V SFILES_ZFS | MKDEP_CPP=3D"cc -E" xargs mkdep -a -f .newdep -x ass= embler-with-cpp -DLOCORE -DFREEBSD_NAMECACHE -DBUILDING_ZFS -nostdinc -I/us= r/src/sys/cddl/compat/opensolaris -I/usr/src/sys/cddl/contrib/opensolaris/u= ts/common/fs/zfs -I/usr/src/sys/cddl/contrib/opensolaris/uts/common/zmod -I= /usr/src/sys/cddl/contrib/opensolaris/uts/common -I/usr/src/sys -I/usr/src/= sys/cddl/contrib/opensolaris/common/zfs -I/usr/src/sys/cddl/contrib/opensol= aris/common -O2 -pipe -fno-strict-aliasing -march=3Dcorei7-avx -std=3Dc99 -= g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-p= rototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -= fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -Wno-= error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-eq= uality -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -I/usr/sr= c/sys/contrib/ipfilter -I/usr/src/sys/dev/ath -I/usr/src/sys/dev/ath/ath_ha= l -I/usr/src/sys/contrib/dev/ath/ath_hal -I/usr/src/sys/contrib/ngatm -I/us= r/src/sys/dev/twa -I/usr/src/sys/dev/cxgb -I/usr/src/sys/dev/cxgbe -I/usr/s= rc/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_g= lobal.h -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -mno-aes -mno= -avx -mcmodel=3Dkernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-a= synchronous-unwind-tables -ffreestanding -fstack-protector -Wno-unknown-pra= gmas -Wno-missing-prototypes -Wno-undef -Wno-strict-prototypes -Wno-cast-qu= al -Wno-parentheses -Wno-redundant-decls -Wno-missing-braces -Wno-uninitial= ized -Wno-unused -Wno-inline -Wno-switch -Wno-pointer-arith -Wno-unknown-pr= agmas -include /usr/src/sys/cddl/compat/opensolaris/sys/debug_compat.h rm -f .depend mv .newdep .depend 1 error make[2]: stopped in /usr/obj/usr/src/sys/mk10 *** [buildkernel] Error code 2 make[1]: stopped in /usr/src 1 error make[1]: stopped in /usr/src *** [buildkernel] Error code 2 make: stopped in /usr/src 1 error make: stopped in /usr/src From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 15:19:48 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F50C75E; Sat, 28 Dec 2013 15:19:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 59AE213CF; Sat, 28 Dec 2013 15:19:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBSFJmhk032351; Sat, 28 Dec 2013 15:19:48 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBSFJm19032350; Sat, 28 Dec 2013 15:19:48 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201312281519.rBSFJm19032350@svn.freebsd.org> From: Peter Wemm Date: Sat, 28 Dec 2013 15:19:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260004 - stable/10/sys/modules/crypto X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 15:19:48 -0000 Author: peter Date: Sat Dec 28 15:19:47 2013 New Revision: 260004 URL: http://svnweb.freebsd.org/changeset/base/260004 Log: Catch up with r259980 and handle renamed deflate.c. Modified: stable/10/sys/modules/crypto/Makefile Modified: stable/10/sys/modules/crypto/Makefile ============================================================================== --- stable/10/sys/modules/crypto/Makefile Sat Dec 28 13:49:48 2013 (r260003) +++ stable/10/sys/modules/crypto/Makefile Sat Dec 28 15:19:47 2013 (r260004) @@ -11,7 +11,7 @@ KMOD = crypto SRCS = crypto.c cryptodev_if.c SRCS += criov.c cryptosoft.c xform.c -SRCS += cast.c deflate.c rmd160.c rijndael-alg-fst.c rijndael-api.c +SRCS += cast.c cryptodeflate.c rmd160.c rijndael-alg-fst.c rijndael-api.c SRCS += skipjack.c bf_enc.c bf_ecb.c bf_skey.c SRCS += des_ecb.c des_enc.c des_setkey.c SRCS += sha1.c sha2.c From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 16:08:11 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 101D62EA; Sat, 28 Dec 2013 16:08:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E75E316EA; Sat, 28 Dec 2013 16:08:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBSG8AEv047456; Sat, 28 Dec 2013 16:08:10 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBSG8AcI047454; Sat, 28 Dec 2013 16:08:10 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201312281608.rBSG8AcI047454@svn.freebsd.org> From: Julio Merino Date: Sat, 28 Dec 2013 16:08:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260005 - stable/10/share/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 16:08:11 -0000 Author: jmmv Date: Sat Dec 28 16:08:10 2013 New Revision: 260005 URL: http://svnweb.freebsd.org/changeset/base/260005 Log: Pull up fixes to allow building tests along scripts and data files. MFC of the following into stable/10: - r257095 Allow mixing bsd.files.mk with bsd.subdir.mk. - r258095 Allow this (bsd.progs.mk) to work with fmake. - r258330 Need to also test for defined(${v}_${PROG}) in bsd.progs.mk. - r259209 Make bsd.progs.mk work in directories with SCRIPTS but no PROGS. This is all 'make tinderbox' clean as run on ref10-amd64. Modified: stable/10/share/mk/bsd.files.mk stable/10/share/mk/bsd.progs.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.files.mk ============================================================================== --- stable/10/share/mk/bsd.files.mk Sat Dec 28 15:19:47 2013 (r260004) +++ stable/10/share/mk/bsd.files.mk Sat Dec 28 16:08:10 2013 (r260005) @@ -14,9 +14,9 @@ buildfiles: ${${group}} all: buildfiles -.if !target(installfiles) .for group in ${FILESGROUPS} .if defined(${group}) && !empty(${group}) +installfiles: installfiles-${group} ${group}OWN?= ${SHAREOWN} ${group}GRP?= ${SHAREGRP} @@ -37,7 +37,7 @@ ${group}NAME_${file:T}?= ${${group}NAME} .else ${group}NAME_${file:T}?= ${file:T} .endif -installfiles: _${group}INS_${file:T} +installfiles-${group}: _${group}INS_${file:T} _${group}INS_${file:T}: ${file} ${INSTALL} -o ${${group}OWN_${.ALLSRC:T}} \ -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \ @@ -48,7 +48,7 @@ _${group}FILES+= ${file} .endif .endfor .if !empty(_${group}FILES) -installfiles: _${group}INS +installfiles-${group}: _${group}INS _${group}INS: ${_${group}FILES} .if defined(${group}NAME) ${INSTALL} -o ${${group}OWN} -g ${${group}GRP} \ @@ -63,7 +63,5 @@ _${group}INS: ${_${group}FILES} .endif # defined(${group}) && !empty(${group}) .endfor -.endif # !target(installfiles) - realinstall: installfiles .ORDER: beforeinstall installfiles Modified: stable/10/share/mk/bsd.progs.mk ============================================================================== --- stable/10/share/mk/bsd.progs.mk Sat Dec 28 15:19:47 2013 (r260004) +++ stable/10/share/mk/bsd.progs.mk Sat Dec 28 16:08:10 2013 (r260005) @@ -16,14 +16,20 @@ .MAIN: all -.if defined(PROGS) +.if defined(PROGS) || defined(PROGS_CXX) +# we really only use PROGS below... +PROGS += ${PROGS_CXX} # In meta mode, we can capture dependenices for _one_ of the progs. # if makefile doesn't nominate one, we use the first. +.if defined(.PARSEDIR) .ifndef UPDATE_DEPENDFILE_PROG UPDATE_DEPENDFILE_PROG = ${PROGS:[1]} .export UPDATE_DEPENDFILE_PROG .endif +.else +UPDATE_DEPENDFILE_PROG?= no +.endif .ifndef PROG # They may have asked us to build just one @@ -38,13 +44,15 @@ PROG ?= $t # just one of many PROG_VARS += BINDIR CFLAGS CPPFLAGS CXXFLAGS DPADD DPLIBS LDADD MAN SRCS .for v in ${PROG_VARS:O:u} -.if defined(${v}.${PROG}) +.if defined(${v}.${PROG}) || defined(${v}_${PROG}) $v += ${${v}_${PROG}:U${${v}.${PROG}}} +.else +$v ?= .endif .endfor # for meta mode, there can be only one! -.if ${PROG} == ${UPDATE_DEPENDFILE_PROG:Uno} +.if ${PROG} == ${UPDATE_DEPENDFILE_PROG} UPDATE_DEPENDFILE ?= yes .endif UPDATE_DEPENDFILE ?= NO @@ -63,9 +71,9 @@ UPDATE_DEPENDFILE = NO .endif # handle being called [bsd.]progs.mk -.include <${.PARSEFILE:S,progs,prog,}> +.include -.ifndef PROG +.ifndef _RECURSING_PROGS # tell progs.mk we might want to install things PROGS_TARGETS+= cleandepend cleandir cleanobj depend install @@ -76,11 +84,13 @@ x.$p= PROG_CXX=$p .endif $p ${p}_p: .PHONY .MAKE - (cd ${.CURDIR} && ${.MAKE} -f ${MAKEFILE} PROG=$p ${x.$p}) + (cd ${.CURDIR} && ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ + SUBDIR= PROG=$p ${x.$p}) .for t in ${PROGS_TARGETS:O:u} $p.$t: .PHONY .MAKE - (cd ${.CURDIR} && ${.MAKE} -f ${MAKEFILE} PROG=$p ${x.$p} ${@:E}) + (cd ${.CURDIR} && ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ + SUBDIR= PROG=$p ${x.$p} ${@:E}) .endfor .endfor @@ -88,4 +98,18 @@ $p.$t: .PHONY .MAKE $t: ${PROGS:%=%.$t} .endfor +SCRIPTS_TARGETS+= cleandepend cleandir cleanobj depend install + +.for p in ${SCRIPTS} +.for t in ${SCRIPTS_TARGETS:O:u} +$p.$t: .PHONY .MAKE + (cd ${.CURDIR} && ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ + SUBDIR= SCRIPT=$p ${x.$p} ${@:E}) +.endfor +.endfor + +.for t in ${SCRIPTS_TARGETS:O:u} +$t: ${SCRIPTS:%=%.$t} +.endfor + .endif From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 19:21:25 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D794290; Sat, 28 Dec 2013 19:21:25 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 26EF4137B; Sat, 28 Dec 2013 19:21:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBSJLPa0018286; Sat, 28 Dec 2013 19:21:25 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBSJLN8B018275; Sat, 28 Dec 2013 19:21:23 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201312281921.rBSJLN8B018275@svn.freebsd.org> From: Mikolaj Golub Date: Sat, 28 Dec 2013 19:21:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260006 - in stable/10/sbin: hastctl hastd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 19:21:25 -0000 Author: trociny Date: Sat Dec 28 19:21:22 2013 New Revision: 260006 URL: http://svnweb.freebsd.org/changeset/base/260006 Log: MFC r257155, r257582, r259191, r259192, r259193, r259194, r259195, r259196: r257155: Make hastctl list command output current queue sizes. Reviewed by: pjd r257582 (pjd): Correct alignment. r259191: For memsync replication, hio_countdown is used not only as an indication when a request can be moved to done queue, but also for detecting the current state of memsync request. This approach has problems, e.g. leaking a request if memsynk ack from the secondary failed, or racy usage of write_complete, which should be called only once per write request, but for memsync can be entered by local_send_thread and ggate_send_thread simultaneously. So the following approach is implemented instead: 1) Use hio_countdown only for counting components we waiting to complete, i.e. initially it is always 2 for any replication mode. 2) To distinguish between "memsync ack" and "memsync fin" responses from the secondary, add and use hio_memsyncacked field. 3) write_complete() in component threads is called only before releasing hio_countdown (i.e. before the hio may be returned to the done queue). 4) Add and use hio_writecount refcounter to detect when write_complete() can be called in memsync case. Reported by: Pete French petefrench ingresso.co.uk Tested by: Pete French petefrench ingresso.co.uk r259192: Add some macros to make the code more readable (no functional chages). r259193: Fix compiler warnings. r259194: In remote_send_thread, if sending a request fails don't take the request back from the receive queue -- it might already be processed by remote_recv_thread, which lead to crashes like below: (primary) Unable to receive reply header: Connection reset by peer. (primary) Unable to send request (Connection reset by peer): WRITE(954662912, 131072). (primary) Disconnected from kopusha:7772. (primary) Increasing localcnt to 1. (primary) Assertion failed: (old > 0), function refcnt_release, file refcnt.h, line 62. Taking the request back was not necessary (it would properly be processed by the remote_recv_thread) and only complicated things. r259195: Send wakeup to threads waiting on empty queue before releasing the lock to decrease spurious wakeups. Submitted by: davidxu r259196: Check remote protocol version only for the first connection (when it is actually sent by the remote node). Otherwise it generated confusing "Negotiated protocol version 1" debug messages when processing the second connection. Modified: stable/10/sbin/hastctl/hastctl.c stable/10/sbin/hastd/control.c stable/10/sbin/hastd/hast.h stable/10/sbin/hastd/hastd.8 stable/10/sbin/hastd/hastd.c stable/10/sbin/hastd/nv.c stable/10/sbin/hastd/primary.c stable/10/sbin/hastd/proto.c stable/10/sbin/hastd/secondary.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/hastctl/hastctl.c ============================================================================== --- stable/10/sbin/hastctl/hastctl.c Sat Dec 28 16:08:10 2013 (r260005) +++ stable/10/sbin/hastctl/hastctl.c Sat Dec 28 19:21:22 2013 (r260006) @@ -355,6 +355,13 @@ control_list(struct nv *nv) (uintmax_t)nv_get_uint64(nv, "stat_write_error%u", ii), (uintmax_t)nv_get_uint64(nv, "stat_delete_error%u", ii), (uintmax_t)nv_get_uint64(nv, "stat_flush_error%u", ii)); + printf(" queues: " + "local: %ju, send: %ju, recv: %ju, done: %ju, idle: %ju\n", + (uintmax_t)nv_get_uint64(nv, "local_queue_size%u", ii), + (uintmax_t)nv_get_uint64(nv, "send_queue_size%u", ii), + (uintmax_t)nv_get_uint64(nv, "recv_queue_size%u", ii), + (uintmax_t)nv_get_uint64(nv, "done_queue_size%u", ii), + (uintmax_t)nv_get_uint64(nv, "idle_queue_size%u", ii)); } return (ret); } Modified: stable/10/sbin/hastd/control.c ============================================================================== --- stable/10/sbin/hastd/control.c Sat Dec 28 16:08:10 2013 (r260005) +++ stable/10/sbin/hastd/control.c Sat Dec 28 19:21:22 2013 (r260006) @@ -215,6 +215,16 @@ control_status_worker(struct hast_resour "stat_delete_error%u", no); nv_add_uint64(nvout, nv_get_uint64(cnvin, "stat_flush_error"), "stat_flush_error%u", no); + nv_add_uint64(nvout, nv_get_uint64(cnvin, "idle_queue_size"), + "idle_queue_size%u", no); + nv_add_uint64(nvout, nv_get_uint64(cnvin, "local_queue_size"), + "local_queue_size%u", no); + nv_add_uint64(nvout, nv_get_uint64(cnvin, "send_queue_size"), + "send_queue_size%u", no); + nv_add_uint64(nvout, nv_get_uint64(cnvin, "recv_queue_size"), + "recv_queue_size%u", no); + nv_add_uint64(nvout, nv_get_uint64(cnvin, "done_queue_size"), + "done_queue_size%u", no); end: if (cnvin != NULL) nv_free(cnvin); @@ -478,6 +488,7 @@ ctrl_thread(void *arg) nv_add_uint64(nvout, res->hr_stat_flush_error + res->hr_stat_activemap_flush_error, "stat_flush_error"); + res->output_status_aux(nvout); nv_add_int16(nvout, 0, "error"); break; case CONTROL_RELOAD: Modified: stable/10/sbin/hastd/hast.h ============================================================================== --- stable/10/sbin/hastd/hast.h Sat Dec 28 16:08:10 2013 (r260005) +++ stable/10/sbin/hastd/hast.h Sat Dec 28 19:21:22 2013 (r260006) @@ -137,6 +137,8 @@ struct hastd_config { #define HAST_CHECKSUM_CRC32 1 #define HAST_CHECKSUM_SHA256 2 +struct nv; + /* * Structure that describes single resource. */ @@ -254,6 +256,9 @@ struct hast_resource { /* Number of activemap flush errors. */ uint64_t hr_stat_activemap_flush_error; + /* Function to output worker specific info on control status request. */ + void (*output_status_aux)(struct nv *); + /* Next resource. */ TAILQ_ENTRY(hast_resource) hr_next; }; Modified: stable/10/sbin/hastd/hastd.8 ============================================================================== --- stable/10/sbin/hastd/hastd.8 Sat Dec 28 16:08:10 2013 (r260005) +++ stable/10/sbin/hastd/hastd.8 Sat Dec 28 19:21:22 2013 (r260006) @@ -171,7 +171,7 @@ The default location is .Pa /var/run/hastd.pid . .El .Sh FILES -.Bl -tag -width ".Pa /var/run/hastctl" -compact +.Bl -tag -width ".Pa /var/run/hastd.pid" -compact .It Pa /etc/hast.conf The configuration file for .Nm Modified: stable/10/sbin/hastd/hastd.c ============================================================================== --- stable/10/sbin/hastd/hastd.c Sat Dec 28 16:08:10 2013 (r260005) +++ stable/10/sbin/hastd/hastd.c Sat Dec 28 19:21:22 2013 (r260006) @@ -806,12 +806,6 @@ listen_accept(struct hastd_listen *lst) */ version = 1; } - if (version > HAST_PROTO_VERSION) { - pjdlog_info("Remote protocol version %hhu is not supported, falling back to version %hhu.", - version, (unsigned char)HAST_PROTO_VERSION); - version = HAST_PROTO_VERSION; - } - pjdlog_debug(1, "Negotiated protocol version %hhu.", version); token = nv_get_uint8_array(nvin, &size, "token"); /* * NULL token means that this is first connection. @@ -925,6 +919,12 @@ listen_accept(struct hastd_listen *lst) */ if (token == NULL) { + if (version > HAST_PROTO_VERSION) { + pjdlog_info("Remote protocol version %hhu is not supported, falling back to version %hhu.", + version, (unsigned char)HAST_PROTO_VERSION); + version = HAST_PROTO_VERSION; + } + pjdlog_debug(1, "Negotiated protocol version %hhu.", version); res->hr_version = version; arc4random_buf(res->hr_token, sizeof(res->hr_token)); nvout = nv_alloc(); Modified: stable/10/sbin/hastd/nv.c ============================================================================== --- stable/10/sbin/hastd/nv.c Sat Dec 28 16:08:10 2013 (r260005) +++ stable/10/sbin/hastd/nv.c Sat Dec 28 19:21:22 2013 (r260006) @@ -566,7 +566,7 @@ nv_get_string(struct nv *nv, const char return (NULL); PJDLOG_ASSERT((nvh->nvh_type & NV_ORDER_MASK) == NV_ORDER_HOST); PJDLOG_ASSERT(nvh->nvh_dsize >= 1); - str = NVH_DATA(nvh); + str = (char *)NVH_DATA(nvh); PJDLOG_ASSERT(str[nvh->nvh_dsize - 1] == '\0'); PJDLOG_ASSERT(strlen(str) == nvh->nvh_dsize - 1); return (str); Modified: stable/10/sbin/hastd/primary.c ============================================================================== --- stable/10/sbin/hastd/primary.c Sat Dec 28 16:08:10 2013 (r260005) +++ stable/10/sbin/hastd/primary.c Sat Dec 28 19:21:22 2013 (r260006) @@ -94,6 +94,15 @@ struct hio { */ bool hio_done; /* + * Number of components we are still waiting before sending write + * completion ack to GEOM Gate. Used for memsync. + */ + refcnt_t hio_writecount; + /* + * Memsync request was acknowleged by remote. + */ + bool hio_memsyncacked; + /* * Remember replication from the time the request was initiated, * so we won't get confused when replication changes on reload. */ @@ -108,6 +117,7 @@ struct hio { * until some in-progress requests are freed. */ static TAILQ_HEAD(, hio) hio_free_list; +static size_t hio_free_list_size; static pthread_mutex_t hio_free_list_lock; static pthread_cond_t hio_free_list_cond; /* @@ -116,20 +126,26 @@ static pthread_cond_t hio_free_list_cond * responsible for managing his own send list. */ static TAILQ_HEAD(, hio) *hio_send_list; +static size_t *hio_send_list_size; static pthread_mutex_t *hio_send_list_lock; static pthread_cond_t *hio_send_list_cond; +#define hio_send_local_list_size hio_send_list_size[0] +#define hio_send_remote_list_size hio_send_list_size[1] /* * There is one recv list for every component, although local components don't * use recv lists as local requests are done synchronously. */ static TAILQ_HEAD(, hio) *hio_recv_list; +static size_t *hio_recv_list_size; static pthread_mutex_t *hio_recv_list_lock; static pthread_cond_t *hio_recv_list_cond; +#define hio_recv_remote_list_size hio_recv_list_size[1] /* * Request is placed on done list by the slowest component (the one that * decreased hio_countdown from 1 to 0). */ static TAILQ_HEAD(, hio) hio_done_list; +static size_t hio_done_list_size; static pthread_mutex_t hio_done_list_lock; static pthread_cond_t hio_done_list_cond; /* @@ -164,25 +180,21 @@ static pthread_mutex_t metadata_lock; ((res)->hr_remotein != NULL && (res)->hr_remoteout != NULL) #define QUEUE_INSERT1(hio, name, ncomp) do { \ - bool _wakeup; \ - \ mtx_lock(&hio_##name##_list_lock[(ncomp)]); \ - _wakeup = TAILQ_EMPTY(&hio_##name##_list[(ncomp)]); \ + if (TAILQ_EMPTY(&hio_##name##_list[(ncomp)])) \ + cv_broadcast(&hio_##name##_list_cond[(ncomp)]); \ TAILQ_INSERT_TAIL(&hio_##name##_list[(ncomp)], (hio), \ hio_next[(ncomp)]); \ - mtx_unlock(&hio_##name##_list_lock[ncomp]); \ - if (_wakeup) \ - cv_broadcast(&hio_##name##_list_cond[(ncomp)]); \ + hio_##name##_list_size[(ncomp)]++; \ + mtx_unlock(&hio_##name##_list_lock[(ncomp)]); \ } while (0) #define QUEUE_INSERT2(hio, name) do { \ - bool _wakeup; \ - \ mtx_lock(&hio_##name##_list_lock); \ - _wakeup = TAILQ_EMPTY(&hio_##name##_list); \ + if (TAILQ_EMPTY(&hio_##name##_list)) \ + cv_broadcast(&hio_##name##_list_cond); \ TAILQ_INSERT_TAIL(&hio_##name##_list, (hio), hio_##name##_next);\ + hio_##name##_list_size++; \ mtx_unlock(&hio_##name##_list_lock); \ - if (_wakeup) \ - cv_broadcast(&hio_##name##_list_cond); \ } while (0) #define QUEUE_TAKE1(hio, name, ncomp, timeout) do { \ bool _last; \ @@ -196,6 +208,8 @@ static pthread_mutex_t metadata_lock; _last = true; \ } \ if (hio != NULL) { \ + PJDLOG_ASSERT(hio_##name##_list_size[(ncomp)] != 0); \ + hio_##name##_list_size[(ncomp)]--; \ TAILQ_REMOVE(&hio_##name##_list[(ncomp)], (hio), \ hio_next[(ncomp)]); \ } \ @@ -207,10 +221,16 @@ static pthread_mutex_t metadata_lock; cv_wait(&hio_##name##_list_cond, \ &hio_##name##_list_lock); \ } \ + PJDLOG_ASSERT(hio_##name##_list_size != 0); \ + hio_##name##_list_size--; \ TAILQ_REMOVE(&hio_##name##_list, (hio), hio_##name##_next); \ mtx_unlock(&hio_##name##_list_lock); \ } while (0) +#define ISFULLSYNC(hio) ((hio)->hio_replication == HAST_REPLICATION_FULLSYNC) +#define ISMEMSYNC(hio) ((hio)->hio_replication == HAST_REPLICATION_MEMSYNC) +#define ISASYNC(hio) ((hio)->hio_replication == HAST_REPLICATION_ASYNC) + #define SYNCREQ(hio) do { \ (hio)->hio_ggio.gctl_unit = -1; \ (hio)->hio_ggio.gctl_seq = 1; \ @@ -219,6 +239,9 @@ static pthread_mutex_t metadata_lock; #define SYNCREQDONE(hio) do { (hio)->hio_ggio.gctl_unit = -2; } while (0) #define ISSYNCREQDONE(hio) ((hio)->hio_ggio.gctl_unit == -2) +#define ISMEMSYNCWRITE(hio) (ISMEMSYNC(hio) && \ + (hio)->hio_ggio.gctl_cmd == BIO_WRITE && !ISSYNCREQ(hio)) + static struct hast_resource *gres; static pthread_mutex_t range_lock; @@ -239,6 +262,22 @@ static void *sync_thread(void *arg); static void *guard_thread(void *arg); static void +output_status_aux(struct nv *nvout) +{ + + nv_add_uint64(nvout, (uint64_t)hio_free_list_size, + "idle_queue_size"); + nv_add_uint64(nvout, (uint64_t)hio_send_local_list_size, + "local_queue_size"); + nv_add_uint64(nvout, (uint64_t)hio_send_remote_list_size, + "send_queue_size"); + nv_add_uint64(nvout, (uint64_t)hio_recv_remote_list_size, + "recv_queue_size"); + nv_add_uint64(nvout, (uint64_t)hio_done_list_size, + "done_queue_size"); +} + +static void cleanup(struct hast_resource *res) { int rerrno; @@ -355,6 +394,12 @@ init_environment(struct hast_resource *r "Unable to allocate %zu bytes of memory for send lists.", sizeof(hio_send_list[0]) * ncomps); } + hio_send_list_size = malloc(sizeof(hio_send_list_size[0]) * ncomps); + if (hio_send_list_size == NULL) { + primary_exitx(EX_TEMPFAIL, + "Unable to allocate %zu bytes of memory for send list counters.", + sizeof(hio_send_list_size[0]) * ncomps); + } hio_send_list_lock = malloc(sizeof(hio_send_list_lock[0]) * ncomps); if (hio_send_list_lock == NULL) { primary_exitx(EX_TEMPFAIL, @@ -373,6 +418,12 @@ init_environment(struct hast_resource *r "Unable to allocate %zu bytes of memory for recv lists.", sizeof(hio_recv_list[0]) * ncomps); } + hio_recv_list_size = malloc(sizeof(hio_recv_list_size[0]) * ncomps); + if (hio_recv_list_size == NULL) { + primary_exitx(EX_TEMPFAIL, + "Unable to allocate %zu bytes of memory for recv list counters.", + sizeof(hio_recv_list_size[0]) * ncomps); + } hio_recv_list_lock = malloc(sizeof(hio_recv_list_lock[0]) * ncomps); if (hio_recv_list_lock == NULL) { primary_exitx(EX_TEMPFAIL, @@ -393,16 +444,18 @@ init_environment(struct hast_resource *r } /* - * Initialize lists, their locks and theirs condition variables. + * Initialize lists, their counters, locks and condition variables. */ TAILQ_INIT(&hio_free_list); mtx_init(&hio_free_list_lock); cv_init(&hio_free_list_cond); for (ii = 0; ii < HAST_NCOMPONENTS; ii++) { TAILQ_INIT(&hio_send_list[ii]); + hio_send_list_size[ii] = 0; mtx_init(&hio_send_list_lock[ii]); cv_init(&hio_send_list_cond[ii]); TAILQ_INIT(&hio_recv_list[ii]); + hio_recv_list_size[ii] = 0; mtx_init(&hio_recv_list_lock[ii]); cv_init(&hio_recv_list_cond[ii]); rw_init(&hio_remote_lock[ii]); @@ -445,6 +498,7 @@ init_environment(struct hast_resource *r hio->hio_ggio.gctl_length = MAXPHYS; hio->hio_ggio.gctl_error = 0; TAILQ_INSERT_HEAD(&hio_free_list, hio, hio_free_next); + hio_free_list_size++; } } @@ -963,6 +1017,7 @@ hastd_primary(struct hast_resource *res) } gres = res; + res->output_status_aux = output_status_aux; mode = pjdlog_mode_get(); debuglevel = pjdlog_debug_get(); @@ -1299,6 +1354,10 @@ ggate_recv_thread(void *arg) } else { mtx_unlock(&res->hr_amp_lock); } + if (ISMEMSYNC(hio)) { + hio->hio_memsyncacked = false; + refcnt_init(&hio->hio_writecount, ncomps); + } break; case BIO_DELETE: res->hr_stat_delete++; @@ -1309,13 +1368,7 @@ ggate_recv_thread(void *arg) } pjdlog_debug(2, "ggate_recv: (%p) Moving request to the send queues.", hio); - if (hio->hio_replication == HAST_REPLICATION_MEMSYNC && - ggio->gctl_cmd == BIO_WRITE) { - /* Each remote request needs two responses in memsync. */ - refcnt_init(&hio->hio_countdown, ncomps + 1); - } else { - refcnt_init(&hio->hio_countdown, ncomps); - } + refcnt_init(&hio->hio_countdown, ncomps); for (ii = ncomp; ii < ncomps; ii++) QUEUE_INSERT1(hio, send, ii); } @@ -1386,8 +1439,7 @@ local_send_thread(void *arg) ret, (intmax_t)ggio->gctl_length); } else { hio->hio_errors[ncomp] = 0; - if (hio->hio_replication == - HAST_REPLICATION_ASYNC) { + if (ISASYNC(hio)) { ggio->gctl_error = 0; write_complete(res, hio); } @@ -1425,42 +1477,13 @@ local_send_thread(void *arg) } break; } - - if (hio->hio_replication != HAST_REPLICATION_MEMSYNC || - ggio->gctl_cmd != BIO_WRITE || ISSYNCREQ(hio)) { - if (refcnt_release(&hio->hio_countdown) > 0) - continue; - } else { - /* - * Depending on hio_countdown value, requests finished - * in the following order: - * 0: remote memsync, remote final, local write - * 1: remote memsync, local write, (remote final) - * 2: local write, (remote memsync), (remote final) - */ - switch (refcnt_release(&hio->hio_countdown)) { - case 0: - /* - * Local write finished as last. - */ - break; - case 1: - /* - * Local write finished after remote memsync - * reply arrvied. We can complete the write now. - */ - if (hio->hio_errors[0] == 0) - write_complete(res, hio); - continue; - case 2: - /* - * Local write finished as first. - */ - continue; - default: - PJDLOG_ABORT("Invalid hio_countdown."); + if (ISMEMSYNCWRITE(hio)) { + if (refcnt_release(&hio->hio_writecount) == 0) { + write_complete(res, hio); } } + if (refcnt_release(&hio->hio_countdown) > 0) + continue; if (ISSYNCREQ(hio)) { mtx_lock(&sync_lock); SYNCREQDONE(hio); @@ -1582,10 +1605,8 @@ remote_send_thread(void *arg) nv_add_uint64(nv, (uint64_t)ggio->gctl_seq, "seq"); nv_add_uint64(nv, offset, "offset"); nv_add_uint64(nv, length, "length"); - if (hio->hio_replication == HAST_REPLICATION_MEMSYNC && - ggio->gctl_cmd == BIO_WRITE && !ISSYNCREQ(hio)) { + if (ISMEMSYNCWRITE(hio)) nv_add_uint8(nv, 1, "memsync"); - } if (nv_error(nv) != 0) { hio->hio_errors[ncomp] = nv_error(nv); pjdlog_debug(2, @@ -1617,6 +1638,7 @@ remote_send_thread(void *arg) mtx_lock(&hio_recv_list_lock[ncomp]); wakeup = TAILQ_EMPTY(&hio_recv_list[ncomp]); TAILQ_INSERT_TAIL(&hio_recv_list[ncomp], hio, hio_next[ncomp]); + hio_recv_list_size[ncomp]++; mtx_unlock(&hio_recv_list_lock[ncomp]); if (hast_proto_send(res, res->hr_remoteout, nv, data, data != NULL ? length : 0) == -1) { @@ -1628,17 +1650,9 @@ remote_send_thread(void *arg) "Unable to send request (%s): ", strerror(hio->hio_errors[ncomp])); remote_close(res, ncomp); - /* - * Take request back from the receive queue and move - * it immediately to the done queue. - */ - mtx_lock(&hio_recv_list_lock[ncomp]); - TAILQ_REMOVE(&hio_recv_list[ncomp], hio, - hio_next[ncomp]); - mtx_unlock(&hio_recv_list_lock[ncomp]); - goto done_queue; + } else { + rw_unlock(&hio_remote_lock[ncomp]); } - rw_unlock(&hio_remote_lock[ncomp]); nv_free(nv); if (wakeup) cv_signal(&hio_recv_list_cond[ncomp]); @@ -1662,8 +1676,12 @@ done_queue: } else { mtx_unlock(&res->hr_amp_lock); } - if (hio->hio_replication == HAST_REPLICATION_MEMSYNC) - (void)refcnt_release(&hio->hio_countdown); + if (ISMEMSYNCWRITE(hio)) { + if (refcnt_release(&hio->hio_writecount) == 0) { + if (hio->hio_errors[0] == 0) + write_complete(res, hio); + } + } } if (refcnt_release(&hio->hio_countdown) > 0) continue; @@ -1719,7 +1737,9 @@ remote_recv_thread(void *arg) PJDLOG_ASSERT(hio != NULL); TAILQ_REMOVE(&hio_recv_list[ncomp], hio, hio_next[ncomp]); + hio_recv_list_size[ncomp]--; mtx_unlock(&hio_recv_list_lock[ncomp]); + hio->hio_errors[ncomp] = ENOTCONN; goto done_queue; } if (hast_proto_recv_hdr(res->hr_remotein, &nv) == -1) { @@ -1742,6 +1762,7 @@ remote_recv_thread(void *arg) if (hio->hio_ggio.gctl_seq == seq) { TAILQ_REMOVE(&hio_recv_list[ncomp], hio, hio_next[ncomp]); + hio_recv_list_size[ncomp]--; break; } } @@ -1792,80 +1813,34 @@ remote_recv_thread(void *arg) hio->hio_errors[ncomp] = 0; nv_free(nv); done_queue: - if (hio->hio_replication != HAST_REPLICATION_MEMSYNC || - hio->hio_ggio.gctl_cmd != BIO_WRITE || ISSYNCREQ(hio)) { - if (refcnt_release(&hio->hio_countdown) > 0) - continue; - } else { - /* - * Depending on hio_countdown value, requests finished - * in the following order: - * - * 0: local write, remote memsync, remote final - * or - * 0: remote memsync, local write, remote final - * - * 1: local write, remote memsync, (remote final) - * or - * 1: remote memsync, remote final, (local write) - * - * 2: remote memsync, (local write), (remote final) - * or - * 2: remote memsync, (remote final), (local write) - */ - switch (refcnt_release(&hio->hio_countdown)) { - case 0: - /* - * Remote final reply arrived. - */ - PJDLOG_ASSERT(!memsyncack); - break; - case 1: - if (memsyncack) { - /* - * Local request already finished, so we - * can complete the write. - */ + if (ISMEMSYNCWRITE(hio)) { + if (!hio->hio_memsyncacked) { + PJDLOG_ASSERT(memsyncack || + hio->hio_errors[ncomp] != 0); + /* Remote ack arrived. */ + if (refcnt_release(&hio->hio_writecount) == 0) { if (hio->hio_errors[0] == 0) write_complete(res, hio); - /* - * We still need to wait for final - * remote reply. - */ + } + hio->hio_memsyncacked = true; + if (hio->hio_errors[ncomp] == 0) { pjdlog_debug(2, - "remote_recv: (%p) Moving request back to the recv queue.", - hio); + "remote_recv: (%p) Moving request " + "back to the recv queue.", hio); mtx_lock(&hio_recv_list_lock[ncomp]); TAILQ_INSERT_TAIL(&hio_recv_list[ncomp], hio, hio_next[ncomp]); + hio_recv_list_size[ncomp]++; mtx_unlock(&hio_recv_list_lock[ncomp]); - } else { - /* - * Remote final reply arrived before - * local write finished. - * Nothing to do in such case. - */ + continue; } - continue; - case 2: - /* - * We received remote memsync reply even before - * local write finished. - */ - PJDLOG_ASSERT(memsyncack); - - pjdlog_debug(2, - "remote_recv: (%p) Moving request back to the recv queue.", - hio); - mtx_lock(&hio_recv_list_lock[ncomp]); - TAILQ_INSERT_TAIL(&hio_recv_list[ncomp], hio, - hio_next[ncomp]); - mtx_unlock(&hio_recv_list_lock[ncomp]); - continue; - default: - PJDLOG_ABORT("Invalid hio_countdown."); + } else { + PJDLOG_ASSERT(!memsyncack); + /* Remote final reply arrived. */ } } + if (refcnt_release(&hio->hio_countdown) > 0) + continue; if (ISSYNCREQ(hio)) { mtx_lock(&sync_lock); SYNCREQDONE(hio); Modified: stable/10/sbin/hastd/proto.c ============================================================================== --- stable/10/sbin/hastd/proto.c Sat Dec 28 16:08:10 2013 (r260005) +++ stable/10/sbin/hastd/proto.c Sat Dec 28 19:21:22 2013 (r260006) @@ -298,8 +298,8 @@ proto_connection_send(const struct proto protoname = mconn->pc_proto->prt_name; PJDLOG_ASSERT(protoname != NULL); - ret = conn->pc_proto->prt_send(conn->pc_ctx, protoname, - strlen(protoname) + 1, fd); + ret = conn->pc_proto->prt_send(conn->pc_ctx, + (const unsigned char *)protoname, strlen(protoname) + 1, fd); proto_close(mconn); if (ret != 0) { errno = ret; @@ -325,7 +325,7 @@ proto_connection_recv(const struct proto bzero(protoname, sizeof(protoname)); - ret = conn->pc_proto->prt_recv(conn->pc_ctx, protoname, + ret = conn->pc_proto->prt_recv(conn->pc_ctx, (unsigned char *)protoname, sizeof(protoname) - 1, &fd); if (ret != 0) { errno = ret; Modified: stable/10/sbin/hastd/secondary.c ============================================================================== --- stable/10/sbin/hastd/secondary.c Sat Dec 28 16:08:10 2013 (r260005) +++ stable/10/sbin/hastd/secondary.c Sat Dec 28 19:21:22 2013 (r260006) @@ -82,18 +82,21 @@ static struct hast_resource *gres; * until some in-progress requests are freed. */ static TAILQ_HEAD(, hio) hio_free_list; +static size_t hio_free_list_size; static pthread_mutex_t hio_free_list_lock; static pthread_cond_t hio_free_list_cond; /* * Disk thread (the one that does I/O requests) takes requests from this list. */ static TAILQ_HEAD(, hio) hio_disk_list; +static size_t hio_disk_list_size; static pthread_mutex_t hio_disk_list_lock; static pthread_cond_t hio_disk_list_cond; /* * Thread that sends requests back to primary takes requests from this list. */ static TAILQ_HEAD(, hio) hio_send_list; +static size_t hio_send_list_size; static pthread_mutex_t hio_send_list_lock; static pthread_cond_t hio_send_list_cond; @@ -107,14 +110,12 @@ static void *disk_thread(void *arg); static void *send_thread(void *arg); #define QUEUE_INSERT(name, hio) do { \ - bool _wakeup; \ - \ mtx_lock(&hio_##name##_list_lock); \ - _wakeup = TAILQ_EMPTY(&hio_##name##_list); \ + if (TAILQ_EMPTY(&hio_##name##_list)) \ + cv_broadcast(&hio_##name##_list_cond); \ TAILQ_INSERT_TAIL(&hio_##name##_list, (hio), hio_next); \ + hio_##name##_list_size++; \ mtx_unlock(&hio_##name##_list_lock); \ - if (_wakeup) \ - cv_broadcast(&hio_##name##_list_cond); \ } while (0) #define QUEUE_TAKE(name, hio) do { \ mtx_lock(&hio_##name##_list_lock); \ @@ -122,11 +123,22 @@ static void *send_thread(void *arg); cv_wait(&hio_##name##_list_cond, \ &hio_##name##_list_lock); \ } \ + PJDLOG_ASSERT(hio_##name##_list_size != 0); \ + hio_##name##_list_size--; \ TAILQ_REMOVE(&hio_##name##_list, (hio), hio_next); \ mtx_unlock(&hio_##name##_list_lock); \ } while (0) static void +output_status_aux(struct nv *nvout) +{ + + nv_add_uint64(nvout, (uint64_t)hio_free_list_size, "idle_queue_size"); + nv_add_uint64(nvout, (uint64_t)hio_disk_list_size, "local_queue_size"); + nv_add_uint64(nvout, (uint64_t)hio_send_list_size, "send_queue_size"); +} + +static void hio_clear(struct hio *hio) { @@ -190,6 +202,7 @@ init_environment(void) } hio_clear(hio); TAILQ_INSERT_HEAD(&hio_free_list, hio, hio_next); + hio_free_list_size++; } } @@ -441,6 +454,7 @@ hastd_secondary(struct hast_resource *re } gres = res; + res->output_status_aux = output_status_aux; mode = pjdlog_mode_get(); debuglevel = pjdlog_debug_get(); From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 19:22:25 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C5B73C5; Sat, 28 Dec 2013 19:22:25 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 660E31383; Sat, 28 Dec 2013 19:22:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBSJMPui018485; Sat, 28 Dec 2013 19:22:25 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBSJMN6G018473; Sat, 28 Dec 2013 19:22:23 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201312281922.rBSJMN6G018473@svn.freebsd.org> From: Mikolaj Golub Date: Sat, 28 Dec 2013 19:22:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260007 - in stable/9/sbin: hastctl hastd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 19:22:25 -0000 Author: trociny Date: Sat Dec 28 19:22:23 2013 New Revision: 260007 URL: http://svnweb.freebsd.org/changeset/base/260007 Log: MFC r257155, r257582, r259191, r259192, r259193, r259194, r259195, r259196: r257155: Make hastctl list command output current queue sizes. Reviewed by: pjd r257582 (pjd): Correct alignment. r259191: For memsync replication, hio_countdown is used not only as an indication when a request can be moved to done queue, but also for detecting the current state of memsync request. This approach has problems, e.g. leaking a request if memsynk ack from the secondary failed, or racy usage of write_complete, which should be called only once per write request, but for memsync can be entered by local_send_thread and ggate_send_thread simultaneously. So the following approach is implemented instead: 1) Use hio_countdown only for counting components we waiting to complete, i.e. initially it is always 2 for any replication mode. 2) To distinguish between "memsync ack" and "memsync fin" responses from the secondary, add and use hio_memsyncacked field. 3) write_complete() in component threads is called only before releasing hio_countdown (i.e. before the hio may be returned to the done queue). 4) Add and use hio_writecount refcounter to detect when write_complete() can be called in memsync case. Reported by: Pete French petefrench ingresso.co.uk Tested by: Pete French petefrench ingresso.co.uk r259192: Add some macros to make the code more readable (no functional chages). r259193: Fix compiler warnings. r259194: In remote_send_thread, if sending a request fails don't take the request back from the receive queue -- it might already be processed by remote_recv_thread, which lead to crashes like below: (primary) Unable to receive reply header: Connection reset by peer. (primary) Unable to send request (Connection reset by peer): WRITE(954662912, 131072). (primary) Disconnected from kopusha:7772. (primary) Increasing localcnt to 1. (primary) Assertion failed: (old > 0), function refcnt_release, file refcnt.h, line 62. Taking the request back was not necessary (it would properly be processed by the remote_recv_thread) and only complicated things. r259195: Send wakeup to threads waiting on empty queue before releasing the lock to decrease spurious wakeups. Submitted by: davidxu r259196: Check remote protocol version only for the first connection (when it is actually sent by the remote node). Otherwise it generated confusing "Negotiated protocol version 1" debug messages when processing the second connection. Modified: stable/9/sbin/hastctl/hastctl.c stable/9/sbin/hastd/control.c stable/9/sbin/hastd/hast.h stable/9/sbin/hastd/hastd.8 stable/9/sbin/hastd/hastd.c stable/9/sbin/hastd/nv.c stable/9/sbin/hastd/primary.c stable/9/sbin/hastd/proto.c stable/9/sbin/hastd/secondary.c Directory Properties: stable/9/sbin/hastctl/ (props changed) stable/9/sbin/hastd/ (props changed) Modified: stable/9/sbin/hastctl/hastctl.c ============================================================================== --- stable/9/sbin/hastctl/hastctl.c Sat Dec 28 19:21:22 2013 (r260006) +++ stable/9/sbin/hastctl/hastctl.c Sat Dec 28 19:22:23 2013 (r260007) @@ -355,6 +355,13 @@ control_list(struct nv *nv) (uintmax_t)nv_get_uint64(nv, "stat_write_error%u", ii), (uintmax_t)nv_get_uint64(nv, "stat_delete_error%u", ii), (uintmax_t)nv_get_uint64(nv, "stat_flush_error%u", ii)); + printf(" queues: " + "local: %ju, send: %ju, recv: %ju, done: %ju, idle: %ju\n", + (uintmax_t)nv_get_uint64(nv, "local_queue_size%u", ii), + (uintmax_t)nv_get_uint64(nv, "send_queue_size%u", ii), + (uintmax_t)nv_get_uint64(nv, "recv_queue_size%u", ii), + (uintmax_t)nv_get_uint64(nv, "done_queue_size%u", ii), + (uintmax_t)nv_get_uint64(nv, "idle_queue_size%u", ii)); } return (ret); } Modified: stable/9/sbin/hastd/control.c ============================================================================== --- stable/9/sbin/hastd/control.c Sat Dec 28 19:21:22 2013 (r260006) +++ stable/9/sbin/hastd/control.c Sat Dec 28 19:22:23 2013 (r260007) @@ -215,6 +215,16 @@ control_status_worker(struct hast_resour "stat_delete_error%u", no); nv_add_uint64(nvout, nv_get_uint64(cnvin, "stat_flush_error"), "stat_flush_error%u", no); + nv_add_uint64(nvout, nv_get_uint64(cnvin, "idle_queue_size"), + "idle_queue_size%u", no); + nv_add_uint64(nvout, nv_get_uint64(cnvin, "local_queue_size"), + "local_queue_size%u", no); + nv_add_uint64(nvout, nv_get_uint64(cnvin, "send_queue_size"), + "send_queue_size%u", no); + nv_add_uint64(nvout, nv_get_uint64(cnvin, "recv_queue_size"), + "recv_queue_size%u", no); + nv_add_uint64(nvout, nv_get_uint64(cnvin, "done_queue_size"), + "done_queue_size%u", no); end: if (cnvin != NULL) nv_free(cnvin); @@ -478,6 +488,7 @@ ctrl_thread(void *arg) nv_add_uint64(nvout, res->hr_stat_flush_error + res->hr_stat_activemap_flush_error, "stat_flush_error"); + res->output_status_aux(nvout); nv_add_int16(nvout, 0, "error"); break; case CONTROL_RELOAD: Modified: stable/9/sbin/hastd/hast.h ============================================================================== --- stable/9/sbin/hastd/hast.h Sat Dec 28 19:21:22 2013 (r260006) +++ stable/9/sbin/hastd/hast.h Sat Dec 28 19:22:23 2013 (r260007) @@ -137,6 +137,8 @@ struct hastd_config { #define HAST_CHECKSUM_CRC32 1 #define HAST_CHECKSUM_SHA256 2 +struct nv; + /* * Structure that describes single resource. */ @@ -254,6 +256,9 @@ struct hast_resource { /* Number of activemap flush errors. */ uint64_t hr_stat_activemap_flush_error; + /* Function to output worker specific info on control status request. */ + void (*output_status_aux)(struct nv *); + /* Next resource. */ TAILQ_ENTRY(hast_resource) hr_next; }; Modified: stable/9/sbin/hastd/hastd.8 ============================================================================== --- stable/9/sbin/hastd/hastd.8 Sat Dec 28 19:21:22 2013 (r260006) +++ stable/9/sbin/hastd/hastd.8 Sat Dec 28 19:22:23 2013 (r260007) @@ -171,7 +171,7 @@ The default location is .Pa /var/run/hastd.pid . .El .Sh FILES -.Bl -tag -width ".Pa /var/run/hastctl" -compact +.Bl -tag -width ".Pa /var/run/hastd.pid" -compact .It Pa /etc/hast.conf The configuration file for .Nm Modified: stable/9/sbin/hastd/hastd.c ============================================================================== --- stable/9/sbin/hastd/hastd.c Sat Dec 28 19:21:22 2013 (r260006) +++ stable/9/sbin/hastd/hastd.c Sat Dec 28 19:22:23 2013 (r260007) @@ -806,12 +806,6 @@ listen_accept(struct hastd_listen *lst) */ version = 1; } - if (version > HAST_PROTO_VERSION) { - pjdlog_info("Remote protocol version %hhu is not supported, falling back to version %hhu.", - version, (unsigned char)HAST_PROTO_VERSION); - version = HAST_PROTO_VERSION; - } - pjdlog_debug(1, "Negotiated protocol version %hhu.", version); token = nv_get_uint8_array(nvin, &size, "token"); /* * NULL token means that this is first connection. @@ -925,6 +919,12 @@ listen_accept(struct hastd_listen *lst) */ if (token == NULL) { + if (version > HAST_PROTO_VERSION) { + pjdlog_info("Remote protocol version %hhu is not supported, falling back to version %hhu.", + version, (unsigned char)HAST_PROTO_VERSION); + version = HAST_PROTO_VERSION; + } + pjdlog_debug(1, "Negotiated protocol version %hhu.", version); res->hr_version = version; arc4random_buf(res->hr_token, sizeof(res->hr_token)); nvout = nv_alloc(); Modified: stable/9/sbin/hastd/nv.c ============================================================================== --- stable/9/sbin/hastd/nv.c Sat Dec 28 19:21:22 2013 (r260006) +++ stable/9/sbin/hastd/nv.c Sat Dec 28 19:22:23 2013 (r260007) @@ -566,7 +566,7 @@ nv_get_string(struct nv *nv, const char return (NULL); PJDLOG_ASSERT((nvh->nvh_type & NV_ORDER_MASK) == NV_ORDER_HOST); PJDLOG_ASSERT(nvh->nvh_dsize >= 1); - str = NVH_DATA(nvh); + str = (char *)NVH_DATA(nvh); PJDLOG_ASSERT(str[nvh->nvh_dsize - 1] == '\0'); PJDLOG_ASSERT(strlen(str) == nvh->nvh_dsize - 1); return (str); Modified: stable/9/sbin/hastd/primary.c ============================================================================== --- stable/9/sbin/hastd/primary.c Sat Dec 28 19:21:22 2013 (r260006) +++ stable/9/sbin/hastd/primary.c Sat Dec 28 19:22:23 2013 (r260007) @@ -94,6 +94,15 @@ struct hio { */ bool hio_done; /* + * Number of components we are still waiting before sending write + * completion ack to GEOM Gate. Used for memsync. + */ + unsigned int hio_writecount; + /* + * Memsync request was acknowleged by remote. + */ + bool hio_memsyncacked; + /* * Remember replication from the time the request was initiated, * so we won't get confused when replication changes on reload. */ @@ -108,6 +117,7 @@ struct hio { * until some in-progress requests are freed. */ static TAILQ_HEAD(, hio) hio_free_list; +static size_t hio_free_list_size; static pthread_mutex_t hio_free_list_lock; static pthread_cond_t hio_free_list_cond; /* @@ -116,20 +126,26 @@ static pthread_cond_t hio_free_list_cond * responsible for managing his own send list. */ static TAILQ_HEAD(, hio) *hio_send_list; +static size_t *hio_send_list_size; static pthread_mutex_t *hio_send_list_lock; static pthread_cond_t *hio_send_list_cond; +#define hio_send_local_list_size hio_send_list_size[0] +#define hio_send_remote_list_size hio_send_list_size[1] /* * There is one recv list for every component, although local components don't * use recv lists as local requests are done synchronously. */ static TAILQ_HEAD(, hio) *hio_recv_list; +static size_t *hio_recv_list_size; static pthread_mutex_t *hio_recv_list_lock; static pthread_cond_t *hio_recv_list_cond; +#define hio_recv_remote_list_size hio_recv_list_size[1] /* * Request is placed on done list by the slowest component (the one that * decreased hio_countdown from 1 to 0). */ static TAILQ_HEAD(, hio) hio_done_list; +static size_t hio_done_list_size; static pthread_mutex_t hio_done_list_lock; static pthread_cond_t hio_done_list_cond; /* @@ -164,25 +180,21 @@ static pthread_mutex_t metadata_lock; ((res)->hr_remotein != NULL && (res)->hr_remoteout != NULL) #define QUEUE_INSERT1(hio, name, ncomp) do { \ - bool _wakeup; \ - \ mtx_lock(&hio_##name##_list_lock[(ncomp)]); \ - _wakeup = TAILQ_EMPTY(&hio_##name##_list[(ncomp)]); \ + if (TAILQ_EMPTY(&hio_##name##_list[(ncomp)])) \ + cv_broadcast(&hio_##name##_list_cond[(ncomp)]); \ TAILQ_INSERT_TAIL(&hio_##name##_list[(ncomp)], (hio), \ hio_next[(ncomp)]); \ - mtx_unlock(&hio_##name##_list_lock[ncomp]); \ - if (_wakeup) \ - cv_broadcast(&hio_##name##_list_cond[(ncomp)]); \ + hio_##name##_list_size[(ncomp)]++; \ + mtx_unlock(&hio_##name##_list_lock[(ncomp)]); \ } while (0) #define QUEUE_INSERT2(hio, name) do { \ - bool _wakeup; \ - \ mtx_lock(&hio_##name##_list_lock); \ - _wakeup = TAILQ_EMPTY(&hio_##name##_list); \ + if (TAILQ_EMPTY(&hio_##name##_list)) \ + cv_broadcast(&hio_##name##_list_cond); \ TAILQ_INSERT_TAIL(&hio_##name##_list, (hio), hio_##name##_next);\ + hio_##name##_list_size++; \ mtx_unlock(&hio_##name##_list_lock); \ - if (_wakeup) \ - cv_broadcast(&hio_##name##_list_cond); \ } while (0) #define QUEUE_TAKE1(hio, name, ncomp, timeout) do { \ bool _last; \ @@ -196,6 +208,8 @@ static pthread_mutex_t metadata_lock; _last = true; \ } \ if (hio != NULL) { \ + PJDLOG_ASSERT(hio_##name##_list_size[(ncomp)] != 0); \ + hio_##name##_list_size[(ncomp)]--; \ TAILQ_REMOVE(&hio_##name##_list[(ncomp)], (hio), \ hio_next[(ncomp)]); \ } \ @@ -207,10 +221,16 @@ static pthread_mutex_t metadata_lock; cv_wait(&hio_##name##_list_cond, \ &hio_##name##_list_lock); \ } \ + PJDLOG_ASSERT(hio_##name##_list_size != 0); \ + hio_##name##_list_size--; \ TAILQ_REMOVE(&hio_##name##_list, (hio), hio_##name##_next); \ mtx_unlock(&hio_##name##_list_lock); \ } while (0) +#define ISFULLSYNC(hio) ((hio)->hio_replication == HAST_REPLICATION_FULLSYNC) +#define ISMEMSYNC(hio) ((hio)->hio_replication == HAST_REPLICATION_MEMSYNC) +#define ISASYNC(hio) ((hio)->hio_replication == HAST_REPLICATION_ASYNC) + #define SYNCREQ(hio) do { \ (hio)->hio_ggio.gctl_unit = -1; \ (hio)->hio_ggio.gctl_seq = 1; \ @@ -219,6 +239,9 @@ static pthread_mutex_t metadata_lock; #define SYNCREQDONE(hio) do { (hio)->hio_ggio.gctl_unit = -2; } while (0) #define ISSYNCREQDONE(hio) ((hio)->hio_ggio.gctl_unit == -2) +#define ISMEMSYNCWRITE(hio) (ISMEMSYNC(hio) && \ + (hio)->hio_ggio.gctl_cmd == BIO_WRITE && !ISSYNCREQ(hio)) + static struct hast_resource *gres; static pthread_mutex_t range_lock; @@ -239,6 +262,22 @@ static void *sync_thread(void *arg); static void *guard_thread(void *arg); static void +output_status_aux(struct nv *nvout) +{ + + nv_add_uint64(nvout, (uint64_t)hio_free_list_size, + "idle_queue_size"); + nv_add_uint64(nvout, (uint64_t)hio_send_local_list_size, + "local_queue_size"); + nv_add_uint64(nvout, (uint64_t)hio_send_remote_list_size, + "send_queue_size"); + nv_add_uint64(nvout, (uint64_t)hio_recv_remote_list_size, + "recv_queue_size"); + nv_add_uint64(nvout, (uint64_t)hio_done_list_size, + "done_queue_size"); +} + +static void cleanup(struct hast_resource *res) { int rerrno; @@ -355,6 +394,12 @@ init_environment(struct hast_resource *r "Unable to allocate %zu bytes of memory for send lists.", sizeof(hio_send_list[0]) * ncomps); } + hio_send_list_size = malloc(sizeof(hio_send_list_size[0]) * ncomps); + if (hio_send_list_size == NULL) { + primary_exitx(EX_TEMPFAIL, + "Unable to allocate %zu bytes of memory for send list counters.", + sizeof(hio_send_list_size[0]) * ncomps); + } hio_send_list_lock = malloc(sizeof(hio_send_list_lock[0]) * ncomps); if (hio_send_list_lock == NULL) { primary_exitx(EX_TEMPFAIL, @@ -373,6 +418,12 @@ init_environment(struct hast_resource *r "Unable to allocate %zu bytes of memory for recv lists.", sizeof(hio_recv_list[0]) * ncomps); } + hio_recv_list_size = malloc(sizeof(hio_recv_list_size[0]) * ncomps); + if (hio_recv_list_size == NULL) { + primary_exitx(EX_TEMPFAIL, + "Unable to allocate %zu bytes of memory for recv list counters.", + sizeof(hio_recv_list_size[0]) * ncomps); + } hio_recv_list_lock = malloc(sizeof(hio_recv_list_lock[0]) * ncomps); if (hio_recv_list_lock == NULL) { primary_exitx(EX_TEMPFAIL, @@ -393,16 +444,18 @@ init_environment(struct hast_resource *r } /* - * Initialize lists, their locks and theirs condition variables. + * Initialize lists, their counters, locks and condition variables. */ TAILQ_INIT(&hio_free_list); mtx_init(&hio_free_list_lock); cv_init(&hio_free_list_cond); for (ii = 0; ii < HAST_NCOMPONENTS; ii++) { TAILQ_INIT(&hio_send_list[ii]); + hio_send_list_size[ii] = 0; mtx_init(&hio_send_list_lock[ii]); cv_init(&hio_send_list_cond[ii]); TAILQ_INIT(&hio_recv_list[ii]); + hio_recv_list_size[ii] = 0; mtx_init(&hio_recv_list_lock[ii]); cv_init(&hio_recv_list_cond[ii]); rw_init(&hio_remote_lock[ii]); @@ -445,6 +498,7 @@ init_environment(struct hast_resource *r hio->hio_ggio.gctl_length = MAXPHYS; hio->hio_ggio.gctl_error = 0; TAILQ_INSERT_HEAD(&hio_free_list, hio, hio_free_next); + hio_free_list_size++; } } @@ -963,6 +1017,7 @@ hastd_primary(struct hast_resource *res) } gres = res; + res->output_status_aux = output_status_aux; mode = pjdlog_mode_get(); debuglevel = pjdlog_debug_get(); @@ -1299,6 +1354,10 @@ ggate_recv_thread(void *arg) } else { mtx_unlock(&res->hr_amp_lock); } + if (ISMEMSYNC(hio)) { + hio->hio_memsyncacked = false; + hio->hio_writecount = ncomps; + } break; case BIO_DELETE: res->hr_stat_delete++; @@ -1310,11 +1369,6 @@ ggate_recv_thread(void *arg) pjdlog_debug(2, "ggate_recv: (%p) Moving request to the send queues.", hio); hio->hio_countdown = ncomps; - if (hio->hio_replication == HAST_REPLICATION_MEMSYNC && - ggio->gctl_cmd == BIO_WRITE) { - /* Each remote request needs two responses in memsync. */ - hio->hio_countdown++; - } for (ii = ncomp; ii < ncomps; ii++) QUEUE_INSERT1(hio, send, ii); } @@ -1385,8 +1439,7 @@ local_send_thread(void *arg) ret, (intmax_t)ggio->gctl_length); } else { hio->hio_errors[ncomp] = 0; - if (hio->hio_replication == - HAST_REPLICATION_ASYNC) { + if (ISASYNC(hio)) { ggio->gctl_error = 0; write_complete(res, hio); } @@ -1424,42 +1477,13 @@ local_send_thread(void *arg) } break; } - - if (hio->hio_replication != HAST_REPLICATION_MEMSYNC || - ggio->gctl_cmd != BIO_WRITE || ISSYNCREQ(hio)) { - if (refcnt_release(&hio->hio_countdown) > 0) - continue; - } else { - /* - * Depending on hio_countdown value, requests finished - * in the following order: - * 0: remote memsync, remote final, local write - * 1: remote memsync, local write, (remote final) - * 2: local write, (remote memsync), (remote final) - */ - switch (refcnt_release(&hio->hio_countdown)) { - case 0: - /* - * Local write finished as last. - */ - break; - case 1: - /* - * Local write finished after remote memsync - * reply arrvied. We can complete the write now. - */ - if (hio->hio_errors[0] == 0) - write_complete(res, hio); - continue; - case 2: - /* - * Local write finished as first. - */ - continue; - default: - PJDLOG_ABORT("Invalid hio_countdown."); + if (ISMEMSYNCWRITE(hio)) { + if (refcnt_release(&hio->hio_writecount) == 0) { + write_complete(res, hio); } } + if (refcnt_release(&hio->hio_countdown) > 0) + continue; if (ISSYNCREQ(hio)) { mtx_lock(&sync_lock); SYNCREQDONE(hio); @@ -1581,10 +1605,8 @@ remote_send_thread(void *arg) nv_add_uint64(nv, (uint64_t)ggio->gctl_seq, "seq"); nv_add_uint64(nv, offset, "offset"); nv_add_uint64(nv, length, "length"); - if (hio->hio_replication == HAST_REPLICATION_MEMSYNC && - ggio->gctl_cmd == BIO_WRITE && !ISSYNCREQ(hio)) { + if (ISMEMSYNCWRITE(hio)) nv_add_uint8(nv, 1, "memsync"); - } if (nv_error(nv) != 0) { hio->hio_errors[ncomp] = nv_error(nv); pjdlog_debug(2, @@ -1616,6 +1638,7 @@ remote_send_thread(void *arg) mtx_lock(&hio_recv_list_lock[ncomp]); wakeup = TAILQ_EMPTY(&hio_recv_list[ncomp]); TAILQ_INSERT_TAIL(&hio_recv_list[ncomp], hio, hio_next[ncomp]); + hio_recv_list_size[ncomp]++; mtx_unlock(&hio_recv_list_lock[ncomp]); if (hast_proto_send(res, res->hr_remoteout, nv, data, data != NULL ? length : 0) == -1) { @@ -1627,17 +1650,9 @@ remote_send_thread(void *arg) "Unable to send request (%s): ", strerror(hio->hio_errors[ncomp])); remote_close(res, ncomp); - /* - * Take request back from the receive queue and move - * it immediately to the done queue. - */ - mtx_lock(&hio_recv_list_lock[ncomp]); - TAILQ_REMOVE(&hio_recv_list[ncomp], hio, - hio_next[ncomp]); - mtx_unlock(&hio_recv_list_lock[ncomp]); - goto done_queue; + } else { + rw_unlock(&hio_remote_lock[ncomp]); } - rw_unlock(&hio_remote_lock[ncomp]); nv_free(nv); if (wakeup) cv_signal(&hio_recv_list_cond[ncomp]); @@ -1661,8 +1676,12 @@ done_queue: } else { mtx_unlock(&res->hr_amp_lock); } - if (hio->hio_replication == HAST_REPLICATION_MEMSYNC) - (void)refcnt_release(&hio->hio_countdown); + if (ISMEMSYNCWRITE(hio)) { + if (refcnt_release(&hio->hio_writecount) == 0) { + if (hio->hio_errors[0] == 0) + write_complete(res, hio); + } + } } if (refcnt_release(&hio->hio_countdown) > 0) continue; @@ -1718,7 +1737,9 @@ remote_recv_thread(void *arg) PJDLOG_ASSERT(hio != NULL); TAILQ_REMOVE(&hio_recv_list[ncomp], hio, hio_next[ncomp]); + hio_recv_list_size[ncomp]--; mtx_unlock(&hio_recv_list_lock[ncomp]); + hio->hio_errors[ncomp] = ENOTCONN; goto done_queue; } if (hast_proto_recv_hdr(res->hr_remotein, &nv) == -1) { @@ -1741,6 +1762,7 @@ remote_recv_thread(void *arg) if (hio->hio_ggio.gctl_seq == seq) { TAILQ_REMOVE(&hio_recv_list[ncomp], hio, hio_next[ncomp]); + hio_recv_list_size[ncomp]--; break; } } @@ -1791,80 +1813,34 @@ remote_recv_thread(void *arg) hio->hio_errors[ncomp] = 0; nv_free(nv); done_queue: - if (hio->hio_replication != HAST_REPLICATION_MEMSYNC || - hio->hio_ggio.gctl_cmd != BIO_WRITE || ISSYNCREQ(hio)) { - if (refcnt_release(&hio->hio_countdown) > 0) - continue; - } else { - /* - * Depending on hio_countdown value, requests finished - * in the following order: - * - * 0: local write, remote memsync, remote final - * or - * 0: remote memsync, local write, remote final - * - * 1: local write, remote memsync, (remote final) - * or - * 1: remote memsync, remote final, (local write) - * - * 2: remote memsync, (local write), (remote final) - * or - * 2: remote memsync, (remote final), (local write) - */ - switch (refcnt_release(&hio->hio_countdown)) { - case 0: - /* - * Remote final reply arrived. - */ - PJDLOG_ASSERT(!memsyncack); - break; - case 1: - if (memsyncack) { - /* - * Local request already finished, so we - * can complete the write. - */ + if (ISMEMSYNCWRITE(hio)) { + if (!hio->hio_memsyncacked) { + PJDLOG_ASSERT(memsyncack || + hio->hio_errors[ncomp] != 0); + /* Remote ack arrived. */ + if (refcnt_release(&hio->hio_writecount) == 0) { if (hio->hio_errors[0] == 0) write_complete(res, hio); - /* - * We still need to wait for final - * remote reply. - */ + } + hio->hio_memsyncacked = true; + if (hio->hio_errors[ncomp] == 0) { pjdlog_debug(2, - "remote_recv: (%p) Moving request back to the recv queue.", - hio); + "remote_recv: (%p) Moving request " + "back to the recv queue.", hio); mtx_lock(&hio_recv_list_lock[ncomp]); TAILQ_INSERT_TAIL(&hio_recv_list[ncomp], hio, hio_next[ncomp]); + hio_recv_list_size[ncomp]++; mtx_unlock(&hio_recv_list_lock[ncomp]); - } else { - /* - * Remote final reply arrived before - * local write finished. - * Nothing to do in such case. - */ + continue; } - continue; - case 2: - /* - * We received remote memsync reply even before - * local write finished. - */ - PJDLOG_ASSERT(memsyncack); - - pjdlog_debug(2, - "remote_recv: (%p) Moving request back to the recv queue.", - hio); - mtx_lock(&hio_recv_list_lock[ncomp]); - TAILQ_INSERT_TAIL(&hio_recv_list[ncomp], hio, - hio_next[ncomp]); - mtx_unlock(&hio_recv_list_lock[ncomp]); - continue; - default: - PJDLOG_ABORT("Invalid hio_countdown."); + } else { + PJDLOG_ASSERT(!memsyncack); + /* Remote final reply arrived. */ } } + if (refcnt_release(&hio->hio_countdown) > 0) + continue; if (ISSYNCREQ(hio)) { mtx_lock(&sync_lock); SYNCREQDONE(hio); Modified: stable/9/sbin/hastd/proto.c ============================================================================== --- stable/9/sbin/hastd/proto.c Sat Dec 28 19:21:22 2013 (r260006) +++ stable/9/sbin/hastd/proto.c Sat Dec 28 19:22:23 2013 (r260007) @@ -298,8 +298,8 @@ proto_connection_send(const struct proto protoname = mconn->pc_proto->prt_name; PJDLOG_ASSERT(protoname != NULL); - ret = conn->pc_proto->prt_send(conn->pc_ctx, protoname, - strlen(protoname) + 1, fd); + ret = conn->pc_proto->prt_send(conn->pc_ctx, + (const unsigned char *)protoname, strlen(protoname) + 1, fd); proto_close(mconn); if (ret != 0) { errno = ret; @@ -325,7 +325,7 @@ proto_connection_recv(const struct proto bzero(protoname, sizeof(protoname)); - ret = conn->pc_proto->prt_recv(conn->pc_ctx, protoname, + ret = conn->pc_proto->prt_recv(conn->pc_ctx, (unsigned char *)protoname, sizeof(protoname) - 1, &fd); if (ret != 0) { errno = ret; Modified: stable/9/sbin/hastd/secondary.c ============================================================================== --- stable/9/sbin/hastd/secondary.c Sat Dec 28 19:21:22 2013 (r260006) +++ stable/9/sbin/hastd/secondary.c Sat Dec 28 19:22:23 2013 (r260007) @@ -82,18 +82,21 @@ static struct hast_resource *gres; * until some in-progress requests are freed. */ static TAILQ_HEAD(, hio) hio_free_list; +static size_t hio_free_list_size; static pthread_mutex_t hio_free_list_lock; static pthread_cond_t hio_free_list_cond; /* * Disk thread (the one that does I/O requests) takes requests from this list. */ static TAILQ_HEAD(, hio) hio_disk_list; +static size_t hio_disk_list_size; static pthread_mutex_t hio_disk_list_lock; static pthread_cond_t hio_disk_list_cond; /* * Thread that sends requests back to primary takes requests from this list. */ static TAILQ_HEAD(, hio) hio_send_list; +static size_t hio_send_list_size; static pthread_mutex_t hio_send_list_lock; static pthread_cond_t hio_send_list_cond; @@ -107,14 +110,12 @@ static void *disk_thread(void *arg); static void *send_thread(void *arg); #define QUEUE_INSERT(name, hio) do { \ - bool _wakeup; \ - \ mtx_lock(&hio_##name##_list_lock); \ - _wakeup = TAILQ_EMPTY(&hio_##name##_list); \ + if (TAILQ_EMPTY(&hio_##name##_list)) \ + cv_broadcast(&hio_##name##_list_cond); \ TAILQ_INSERT_TAIL(&hio_##name##_list, (hio), hio_next); \ + hio_##name##_list_size++; \ mtx_unlock(&hio_##name##_list_lock); \ - if (_wakeup) \ - cv_broadcast(&hio_##name##_list_cond); \ } while (0) #define QUEUE_TAKE(name, hio) do { \ mtx_lock(&hio_##name##_list_lock); \ @@ -122,11 +123,22 @@ static void *send_thread(void *arg); cv_wait(&hio_##name##_list_cond, \ &hio_##name##_list_lock); \ } \ + PJDLOG_ASSERT(hio_##name##_list_size != 0); \ + hio_##name##_list_size--; \ TAILQ_REMOVE(&hio_##name##_list, (hio), hio_next); \ mtx_unlock(&hio_##name##_list_lock); \ } while (0) static void +output_status_aux(struct nv *nvout) +{ + + nv_add_uint64(nvout, (uint64_t)hio_free_list_size, "idle_queue_size"); + nv_add_uint64(nvout, (uint64_t)hio_disk_list_size, "local_queue_size"); + nv_add_uint64(nvout, (uint64_t)hio_send_list_size, "send_queue_size"); +} + +static void hio_clear(struct hio *hio) { @@ -190,6 +202,7 @@ init_environment(void) } hio_clear(hio); TAILQ_INSERT_HEAD(&hio_free_list, hio, hio_next); + hio_free_list_size++; } } @@ -441,6 +454,7 @@ hastd_secondary(struct hast_resource *re } gres = res; + res->output_status_aux = output_status_aux; mode = pjdlog_mode_get(); debuglevel = pjdlog_debug_get(); From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 19:23:19 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0839C4F8; Sat, 28 Dec 2013 19: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E634E1388; Sat, 28 Dec 2013 19:23:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBSJNIGH018640; Sat, 28 Dec 2013 19:23:18 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBSJNHZQ018630; Sat, 28 Dec 2013 19:23:17 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201312281923.rBSJNHZQ018630@svn.freebsd.org> From: Mikolaj Golub Date: Sat, 28 Dec 2013 19:23:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r260008 - in stable/8/sbin: hastctl hastd X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 19:23:19 -0000 Author: trociny Date: Sat Dec 28 19:23:16 2013 New Revision: 260008 URL: http://svnweb.freebsd.org/changeset/base/260008 Log: MFC r257155, r257582, r259191, r259192, r259193, r259194, r259195, r259196: r257155: Make hastctl list command output current queue sizes. Reviewed by: pjd r257582 (pjd): Correct alignment. r259191: For memsync replication, hio_countdown is used not only as an indication when a request can be moved to done queue, but also for detecting the current state of memsync request. This approach has problems, e.g. leaking a request if memsynk ack from the secondary failed, or racy usage of write_complete, which should be called only once per write request, but for memsync can be entered by local_send_thread and ggate_send_thread simultaneously. So the following approach is implemented instead: 1) Use hio_countdown only for counting components we waiting to complete, i.e. initially it is always 2 for any replication mode. 2) To distinguish between "memsync ack" and "memsync fin" responses from the secondary, add and use hio_memsyncacked field. 3) write_complete() in component threads is called only before releasing hio_countdown (i.e. before the hio may be returned to the done queue). 4) Add and use hio_writecount refcounter to detect when write_complete() can be called in memsync case. Reported by: Pete French petefrench ingresso.co.uk Tested by: Pete French petefrench ingresso.co.uk r259192: Add some macros to make the code more readable (no functional chages). r259193: Fix compiler warnings. r259194: In remote_send_thread, if sending a request fails don't take the request back from the receive queue -- it might already be processed by remote_recv_thread, which lead to crashes like below: (primary) Unable to receive reply header: Connection reset by peer. (primary) Unable to send request (Connection reset by peer): WRITE(954662912, 131072). (primary) Disconnected from kopusha:7772. (primary) Increasing localcnt to 1. (primary) Assertion failed: (old > 0), function refcnt_release, file refcnt.h, line 62. Taking the request back was not necessary (it would properly be processed by the remote_recv_thread) and only complicated things. r259195: Send wakeup to threads waiting on empty queue before releasing the lock to decrease spurious wakeups. Submitted by: davidxu r259196: Check remote protocol version only for the first connection (when it is actually sent by the remote node). Otherwise it generated confusing "Negotiated protocol version 1" debug messages when processing the second connection. Modified: stable/8/sbin/hastctl/hastctl.c stable/8/sbin/hastd/control.c stable/8/sbin/hastd/hast.h stable/8/sbin/hastd/hastd.8 stable/8/sbin/hastd/hastd.c stable/8/sbin/hastd/nv.c stable/8/sbin/hastd/primary.c stable/8/sbin/hastd/proto.c stable/8/sbin/hastd/secondary.c Directory Properties: stable/8/sbin/hastctl/ (props changed) stable/8/sbin/hastd/ (props changed) Modified: stable/8/sbin/hastctl/hastctl.c ============================================================================== --- stable/8/sbin/hastctl/hastctl.c Sat Dec 28 19:22:23 2013 (r260007) +++ stable/8/sbin/hastctl/hastctl.c Sat Dec 28 19:23:16 2013 (r260008) @@ -355,6 +355,13 @@ control_list(struct nv *nv) (uintmax_t)nv_get_uint64(nv, "stat_write_error%u", ii), (uintmax_t)nv_get_uint64(nv, "stat_delete_error%u", ii), (uintmax_t)nv_get_uint64(nv, "stat_flush_error%u", ii)); + printf(" queues: " + "local: %ju, send: %ju, recv: %ju, done: %ju, idle: %ju\n", + (uintmax_t)nv_get_uint64(nv, "local_queue_size%u", ii), + (uintmax_t)nv_get_uint64(nv, "send_queue_size%u", ii), + (uintmax_t)nv_get_uint64(nv, "recv_queue_size%u", ii), + (uintmax_t)nv_get_uint64(nv, "done_queue_size%u", ii), + (uintmax_t)nv_get_uint64(nv, "idle_queue_size%u", ii)); } return (ret); } Modified: stable/8/sbin/hastd/control.c ============================================================================== --- stable/8/sbin/hastd/control.c Sat Dec 28 19:22:23 2013 (r260007) +++ stable/8/sbin/hastd/control.c Sat Dec 28 19:23:16 2013 (r260008) @@ -215,6 +215,16 @@ control_status_worker(struct hast_resour "stat_delete_error%u", no); nv_add_uint64(nvout, nv_get_uint64(cnvin, "stat_flush_error"), "stat_flush_error%u", no); + nv_add_uint64(nvout, nv_get_uint64(cnvin, "idle_queue_size"), + "idle_queue_size%u", no); + nv_add_uint64(nvout, nv_get_uint64(cnvin, "local_queue_size"), + "local_queue_size%u", no); + nv_add_uint64(nvout, nv_get_uint64(cnvin, "send_queue_size"), + "send_queue_size%u", no); + nv_add_uint64(nvout, nv_get_uint64(cnvin, "recv_queue_size"), + "recv_queue_size%u", no); + nv_add_uint64(nvout, nv_get_uint64(cnvin, "done_queue_size"), + "done_queue_size%u", no); end: if (cnvin != NULL) nv_free(cnvin); @@ -478,6 +488,7 @@ ctrl_thread(void *arg) nv_add_uint64(nvout, res->hr_stat_flush_error + res->hr_stat_activemap_flush_error, "stat_flush_error"); + res->output_status_aux(nvout); nv_add_int16(nvout, 0, "error"); break; case CONTROL_RELOAD: Modified: stable/8/sbin/hastd/hast.h ============================================================================== --- stable/8/sbin/hastd/hast.h Sat Dec 28 19:22:23 2013 (r260007) +++ stable/8/sbin/hastd/hast.h Sat Dec 28 19:23:16 2013 (r260008) @@ -137,6 +137,8 @@ struct hastd_config { #define HAST_CHECKSUM_CRC32 1 #define HAST_CHECKSUM_SHA256 2 +struct nv; + /* * Structure that describes single resource. */ @@ -254,6 +256,9 @@ struct hast_resource { /* Number of activemap flush errors. */ uint64_t hr_stat_activemap_flush_error; + /* Function to output worker specific info on control status request. */ + void (*output_status_aux)(struct nv *); + /* Next resource. */ TAILQ_ENTRY(hast_resource) hr_next; }; Modified: stable/8/sbin/hastd/hastd.8 ============================================================================== --- stable/8/sbin/hastd/hastd.8 Sat Dec 28 19:22:23 2013 (r260007) +++ stable/8/sbin/hastd/hastd.8 Sat Dec 28 19:23:16 2013 (r260008) @@ -171,7 +171,7 @@ The default location is .Pa /var/run/hastd.pid . .El .Sh FILES -.Bl -tag -width ".Pa /var/run/hastctl" -compact +.Bl -tag -width ".Pa /var/run/hastd.pid" -compact .It Pa /etc/hast.conf The configuration file for .Nm Modified: stable/8/sbin/hastd/hastd.c ============================================================================== --- stable/8/sbin/hastd/hastd.c Sat Dec 28 19:22:23 2013 (r260007) +++ stable/8/sbin/hastd/hastd.c Sat Dec 28 19:23:16 2013 (r260008) @@ -806,12 +806,6 @@ listen_accept(struct hastd_listen *lst) */ version = 1; } - if (version > HAST_PROTO_VERSION) { - pjdlog_info("Remote protocol version %hhu is not supported, falling back to version %hhu.", - version, (unsigned char)HAST_PROTO_VERSION); - version = HAST_PROTO_VERSION; - } - pjdlog_debug(1, "Negotiated protocol version %hhu.", version); token = nv_get_uint8_array(nvin, &size, "token"); /* * NULL token means that this is first connection. @@ -925,6 +919,12 @@ listen_accept(struct hastd_listen *lst) */ if (token == NULL) { + if (version > HAST_PROTO_VERSION) { + pjdlog_info("Remote protocol version %hhu is not supported, falling back to version %hhu.", + version, (unsigned char)HAST_PROTO_VERSION); + version = HAST_PROTO_VERSION; + } + pjdlog_debug(1, "Negotiated protocol version %hhu.", version); res->hr_version = version; arc4random_buf(res->hr_token, sizeof(res->hr_token)); nvout = nv_alloc(); Modified: stable/8/sbin/hastd/nv.c ============================================================================== --- stable/8/sbin/hastd/nv.c Sat Dec 28 19:22:23 2013 (r260007) +++ stable/8/sbin/hastd/nv.c Sat Dec 28 19:23:16 2013 (r260008) @@ -566,7 +566,7 @@ nv_get_string(struct nv *nv, const char return (NULL); PJDLOG_ASSERT((nvh->nvh_type & NV_ORDER_MASK) == NV_ORDER_HOST); PJDLOG_ASSERT(nvh->nvh_dsize >= 1); - str = NVH_DATA(nvh); + str = (char *)NVH_DATA(nvh); PJDLOG_ASSERT(str[nvh->nvh_dsize - 1] == '\0'); PJDLOG_ASSERT(strlen(str) == nvh->nvh_dsize - 1); return (str); Modified: stable/8/sbin/hastd/primary.c ============================================================================== --- stable/8/sbin/hastd/primary.c Sat Dec 28 19:22:23 2013 (r260007) +++ stable/8/sbin/hastd/primary.c Sat Dec 28 19:23:16 2013 (r260008) @@ -94,6 +94,15 @@ struct hio { */ bool hio_done; /* + * Number of components we are still waiting before sending write + * completion ack to GEOM Gate. Used for memsync. + */ + unsigned int hio_writecount; + /* + * Memsync request was acknowleged by remote. + */ + bool hio_memsyncacked; + /* * Remember replication from the time the request was initiated, * so we won't get confused when replication changes on reload. */ @@ -108,6 +117,7 @@ struct hio { * until some in-progress requests are freed. */ static TAILQ_HEAD(, hio) hio_free_list; +static size_t hio_free_list_size; static pthread_mutex_t hio_free_list_lock; static pthread_cond_t hio_free_list_cond; /* @@ -116,20 +126,26 @@ static pthread_cond_t hio_free_list_cond * responsible for managing his own send list. */ static TAILQ_HEAD(, hio) *hio_send_list; +static size_t *hio_send_list_size; static pthread_mutex_t *hio_send_list_lock; static pthread_cond_t *hio_send_list_cond; +#define hio_send_local_list_size hio_send_list_size[0] +#define hio_send_remote_list_size hio_send_list_size[1] /* * There is one recv list for every component, although local components don't * use recv lists as local requests are done synchronously. */ static TAILQ_HEAD(, hio) *hio_recv_list; +static size_t *hio_recv_list_size; static pthread_mutex_t *hio_recv_list_lock; static pthread_cond_t *hio_recv_list_cond; +#define hio_recv_remote_list_size hio_recv_list_size[1] /* * Request is placed on done list by the slowest component (the one that * decreased hio_countdown from 1 to 0). */ static TAILQ_HEAD(, hio) hio_done_list; +static size_t hio_done_list_size; static pthread_mutex_t hio_done_list_lock; static pthread_cond_t hio_done_list_cond; /* @@ -164,25 +180,21 @@ static pthread_mutex_t metadata_lock; ((res)->hr_remotein != NULL && (res)->hr_remoteout != NULL) #define QUEUE_INSERT1(hio, name, ncomp) do { \ - bool _wakeup; \ - \ mtx_lock(&hio_##name##_list_lock[(ncomp)]); \ - _wakeup = TAILQ_EMPTY(&hio_##name##_list[(ncomp)]); \ + if (TAILQ_EMPTY(&hio_##name##_list[(ncomp)])) \ + cv_broadcast(&hio_##name##_list_cond[(ncomp)]); \ TAILQ_INSERT_TAIL(&hio_##name##_list[(ncomp)], (hio), \ hio_next[(ncomp)]); \ - mtx_unlock(&hio_##name##_list_lock[ncomp]); \ - if (_wakeup) \ - cv_broadcast(&hio_##name##_list_cond[(ncomp)]); \ + hio_##name##_list_size[(ncomp)]++; \ + mtx_unlock(&hio_##name##_list_lock[(ncomp)]); \ } while (0) #define QUEUE_INSERT2(hio, name) do { \ - bool _wakeup; \ - \ mtx_lock(&hio_##name##_list_lock); \ - _wakeup = TAILQ_EMPTY(&hio_##name##_list); \ + if (TAILQ_EMPTY(&hio_##name##_list)) \ + cv_broadcast(&hio_##name##_list_cond); \ TAILQ_INSERT_TAIL(&hio_##name##_list, (hio), hio_##name##_next);\ + hio_##name##_list_size++; \ mtx_unlock(&hio_##name##_list_lock); \ - if (_wakeup) \ - cv_broadcast(&hio_##name##_list_cond); \ } while (0) #define QUEUE_TAKE1(hio, name, ncomp, timeout) do { \ bool _last; \ @@ -196,6 +208,8 @@ static pthread_mutex_t metadata_lock; _last = true; \ } \ if (hio != NULL) { \ + PJDLOG_ASSERT(hio_##name##_list_size[(ncomp)] != 0); \ + hio_##name##_list_size[(ncomp)]--; \ TAILQ_REMOVE(&hio_##name##_list[(ncomp)], (hio), \ hio_next[(ncomp)]); \ } \ @@ -207,10 +221,16 @@ static pthread_mutex_t metadata_lock; cv_wait(&hio_##name##_list_cond, \ &hio_##name##_list_lock); \ } \ + PJDLOG_ASSERT(hio_##name##_list_size != 0); \ + hio_##name##_list_size--; \ TAILQ_REMOVE(&hio_##name##_list, (hio), hio_##name##_next); \ mtx_unlock(&hio_##name##_list_lock); \ } while (0) +#define ISFULLSYNC(hio) ((hio)->hio_replication == HAST_REPLICATION_FULLSYNC) +#define ISMEMSYNC(hio) ((hio)->hio_replication == HAST_REPLICATION_MEMSYNC) +#define ISASYNC(hio) ((hio)->hio_replication == HAST_REPLICATION_ASYNC) + #define SYNCREQ(hio) do { \ (hio)->hio_ggio.gctl_unit = -1; \ (hio)->hio_ggio.gctl_seq = 1; \ @@ -219,6 +239,9 @@ static pthread_mutex_t metadata_lock; #define SYNCREQDONE(hio) do { (hio)->hio_ggio.gctl_unit = -2; } while (0) #define ISSYNCREQDONE(hio) ((hio)->hio_ggio.gctl_unit == -2) +#define ISMEMSYNCWRITE(hio) (ISMEMSYNC(hio) && \ + (hio)->hio_ggio.gctl_cmd == BIO_WRITE && !ISSYNCREQ(hio)) + static struct hast_resource *gres; static pthread_mutex_t range_lock; @@ -239,6 +262,22 @@ static void *sync_thread(void *arg); static void *guard_thread(void *arg); static void +output_status_aux(struct nv *nvout) +{ + + nv_add_uint64(nvout, (uint64_t)hio_free_list_size, + "idle_queue_size"); + nv_add_uint64(nvout, (uint64_t)hio_send_local_list_size, + "local_queue_size"); + nv_add_uint64(nvout, (uint64_t)hio_send_remote_list_size, + "send_queue_size"); + nv_add_uint64(nvout, (uint64_t)hio_recv_remote_list_size, + "recv_queue_size"); + nv_add_uint64(nvout, (uint64_t)hio_done_list_size, + "done_queue_size"); +} + +static void cleanup(struct hast_resource *res) { int rerrno; @@ -355,6 +394,12 @@ init_environment(struct hast_resource *r "Unable to allocate %zu bytes of memory for send lists.", sizeof(hio_send_list[0]) * ncomps); } + hio_send_list_size = malloc(sizeof(hio_send_list_size[0]) * ncomps); + if (hio_send_list_size == NULL) { + primary_exitx(EX_TEMPFAIL, + "Unable to allocate %zu bytes of memory for send list counters.", + sizeof(hio_send_list_size[0]) * ncomps); + } hio_send_list_lock = malloc(sizeof(hio_send_list_lock[0]) * ncomps); if (hio_send_list_lock == NULL) { primary_exitx(EX_TEMPFAIL, @@ -373,6 +418,12 @@ init_environment(struct hast_resource *r "Unable to allocate %zu bytes of memory for recv lists.", sizeof(hio_recv_list[0]) * ncomps); } + hio_recv_list_size = malloc(sizeof(hio_recv_list_size[0]) * ncomps); + if (hio_recv_list_size == NULL) { + primary_exitx(EX_TEMPFAIL, + "Unable to allocate %zu bytes of memory for recv list counters.", + sizeof(hio_recv_list_size[0]) * ncomps); + } hio_recv_list_lock = malloc(sizeof(hio_recv_list_lock[0]) * ncomps); if (hio_recv_list_lock == NULL) { primary_exitx(EX_TEMPFAIL, @@ -393,16 +444,18 @@ init_environment(struct hast_resource *r } /* - * Initialize lists, their locks and theirs condition variables. + * Initialize lists, their counters, locks and condition variables. */ TAILQ_INIT(&hio_free_list); mtx_init(&hio_free_list_lock); cv_init(&hio_free_list_cond); for (ii = 0; ii < HAST_NCOMPONENTS; ii++) { TAILQ_INIT(&hio_send_list[ii]); + hio_send_list_size[ii] = 0; mtx_init(&hio_send_list_lock[ii]); cv_init(&hio_send_list_cond[ii]); TAILQ_INIT(&hio_recv_list[ii]); + hio_recv_list_size[ii] = 0; mtx_init(&hio_recv_list_lock[ii]); cv_init(&hio_recv_list_cond[ii]); rw_init(&hio_remote_lock[ii]); @@ -445,6 +498,7 @@ init_environment(struct hast_resource *r hio->hio_ggio.gctl_length = MAXPHYS; hio->hio_ggio.gctl_error = 0; TAILQ_INSERT_HEAD(&hio_free_list, hio, hio_free_next); + hio_free_list_size++; } } @@ -963,6 +1017,7 @@ hastd_primary(struct hast_resource *res) } gres = res; + res->output_status_aux = output_status_aux; mode = pjdlog_mode_get(); debuglevel = pjdlog_debug_get(); @@ -1299,6 +1354,10 @@ ggate_recv_thread(void *arg) } else { mtx_unlock(&res->hr_amp_lock); } + if (ISMEMSYNC(hio)) { + hio->hio_memsyncacked = false; + hio->hio_writecount = ncomps; + } break; case BIO_DELETE: res->hr_stat_delete++; @@ -1310,11 +1369,6 @@ ggate_recv_thread(void *arg) pjdlog_debug(2, "ggate_recv: (%p) Moving request to the send queues.", hio); hio->hio_countdown = ncomps; - if (hio->hio_replication == HAST_REPLICATION_MEMSYNC && - ggio->gctl_cmd == BIO_WRITE) { - /* Each remote request needs two responses in memsync. */ - hio->hio_countdown++; - } for (ii = ncomp; ii < ncomps; ii++) QUEUE_INSERT1(hio, send, ii); } @@ -1385,8 +1439,7 @@ local_send_thread(void *arg) ret, (intmax_t)ggio->gctl_length); } else { hio->hio_errors[ncomp] = 0; - if (hio->hio_replication == - HAST_REPLICATION_ASYNC) { + if (ISASYNC(hio)) { ggio->gctl_error = 0; write_complete(res, hio); } @@ -1424,42 +1477,13 @@ local_send_thread(void *arg) } break; } - - if (hio->hio_replication != HAST_REPLICATION_MEMSYNC || - ggio->gctl_cmd != BIO_WRITE || ISSYNCREQ(hio)) { - if (refcnt_release(&hio->hio_countdown) > 0) - continue; - } else { - /* - * Depending on hio_countdown value, requests finished - * in the following order: - * 0: remote memsync, remote final, local write - * 1: remote memsync, local write, (remote final) - * 2: local write, (remote memsync), (remote final) - */ - switch (refcnt_release(&hio->hio_countdown)) { - case 0: - /* - * Local write finished as last. - */ - break; - case 1: - /* - * Local write finished after remote memsync - * reply arrvied. We can complete the write now. - */ - if (hio->hio_errors[0] == 0) - write_complete(res, hio); - continue; - case 2: - /* - * Local write finished as first. - */ - continue; - default: - PJDLOG_ABORT("Invalid hio_countdown."); + if (ISMEMSYNCWRITE(hio)) { + if (refcnt_release(&hio->hio_writecount) == 0) { + write_complete(res, hio); } } + if (refcnt_release(&hio->hio_countdown) > 0) + continue; if (ISSYNCREQ(hio)) { mtx_lock(&sync_lock); SYNCREQDONE(hio); @@ -1581,10 +1605,8 @@ remote_send_thread(void *arg) nv_add_uint64(nv, (uint64_t)ggio->gctl_seq, "seq"); nv_add_uint64(nv, offset, "offset"); nv_add_uint64(nv, length, "length"); - if (hio->hio_replication == HAST_REPLICATION_MEMSYNC && - ggio->gctl_cmd == BIO_WRITE && !ISSYNCREQ(hio)) { + if (ISMEMSYNCWRITE(hio)) nv_add_uint8(nv, 1, "memsync"); - } if (nv_error(nv) != 0) { hio->hio_errors[ncomp] = nv_error(nv); pjdlog_debug(2, @@ -1616,6 +1638,7 @@ remote_send_thread(void *arg) mtx_lock(&hio_recv_list_lock[ncomp]); wakeup = TAILQ_EMPTY(&hio_recv_list[ncomp]); TAILQ_INSERT_TAIL(&hio_recv_list[ncomp], hio, hio_next[ncomp]); + hio_recv_list_size[ncomp]++; mtx_unlock(&hio_recv_list_lock[ncomp]); if (hast_proto_send(res, res->hr_remoteout, nv, data, data != NULL ? length : 0) == -1) { @@ -1627,17 +1650,9 @@ remote_send_thread(void *arg) "Unable to send request (%s): ", strerror(hio->hio_errors[ncomp])); remote_close(res, ncomp); - /* - * Take request back from the receive queue and move - * it immediately to the done queue. - */ - mtx_lock(&hio_recv_list_lock[ncomp]); - TAILQ_REMOVE(&hio_recv_list[ncomp], hio, - hio_next[ncomp]); - mtx_unlock(&hio_recv_list_lock[ncomp]); - goto done_queue; + } else { + rw_unlock(&hio_remote_lock[ncomp]); } - rw_unlock(&hio_remote_lock[ncomp]); nv_free(nv); if (wakeup) cv_signal(&hio_recv_list_cond[ncomp]); @@ -1661,8 +1676,12 @@ done_queue: } else { mtx_unlock(&res->hr_amp_lock); } - if (hio->hio_replication == HAST_REPLICATION_MEMSYNC) - (void)refcnt_release(&hio->hio_countdown); + if (ISMEMSYNCWRITE(hio)) { + if (refcnt_release(&hio->hio_writecount) == 0) { + if (hio->hio_errors[0] == 0) + write_complete(res, hio); + } + } } if (refcnt_release(&hio->hio_countdown) > 0) continue; @@ -1718,7 +1737,9 @@ remote_recv_thread(void *arg) PJDLOG_ASSERT(hio != NULL); TAILQ_REMOVE(&hio_recv_list[ncomp], hio, hio_next[ncomp]); + hio_recv_list_size[ncomp]--; mtx_unlock(&hio_recv_list_lock[ncomp]); + hio->hio_errors[ncomp] = ENOTCONN; goto done_queue; } if (hast_proto_recv_hdr(res->hr_remotein, &nv) == -1) { @@ -1741,6 +1762,7 @@ remote_recv_thread(void *arg) if (hio->hio_ggio.gctl_seq == seq) { TAILQ_REMOVE(&hio_recv_list[ncomp], hio, hio_next[ncomp]); + hio_recv_list_size[ncomp]--; break; } } @@ -1791,80 +1813,34 @@ remote_recv_thread(void *arg) hio->hio_errors[ncomp] = 0; nv_free(nv); done_queue: - if (hio->hio_replication != HAST_REPLICATION_MEMSYNC || - hio->hio_ggio.gctl_cmd != BIO_WRITE || ISSYNCREQ(hio)) { - if (refcnt_release(&hio->hio_countdown) > 0) - continue; - } else { - /* - * Depending on hio_countdown value, requests finished - * in the following order: - * - * 0: local write, remote memsync, remote final - * or - * 0: remote memsync, local write, remote final - * - * 1: local write, remote memsync, (remote final) - * or - * 1: remote memsync, remote final, (local write) - * - * 2: remote memsync, (local write), (remote final) - * or - * 2: remote memsync, (remote final), (local write) - */ - switch (refcnt_release(&hio->hio_countdown)) { - case 0: - /* - * Remote final reply arrived. - */ - PJDLOG_ASSERT(!memsyncack); - break; - case 1: - if (memsyncack) { - /* - * Local request already finished, so we - * can complete the write. - */ + if (ISMEMSYNCWRITE(hio)) { + if (!hio->hio_memsyncacked) { + PJDLOG_ASSERT(memsyncack || + hio->hio_errors[ncomp] != 0); + /* Remote ack arrived. */ + if (refcnt_release(&hio->hio_writecount) == 0) { if (hio->hio_errors[0] == 0) write_complete(res, hio); - /* - * We still need to wait for final - * remote reply. - */ + } + hio->hio_memsyncacked = true; + if (hio->hio_errors[ncomp] == 0) { pjdlog_debug(2, - "remote_recv: (%p) Moving request back to the recv queue.", - hio); + "remote_recv: (%p) Moving request " + "back to the recv queue.", hio); mtx_lock(&hio_recv_list_lock[ncomp]); TAILQ_INSERT_TAIL(&hio_recv_list[ncomp], hio, hio_next[ncomp]); + hio_recv_list_size[ncomp]++; mtx_unlock(&hio_recv_list_lock[ncomp]); - } else { - /* - * Remote final reply arrived before - * local write finished. - * Nothing to do in such case. - */ + continue; } - continue; - case 2: - /* - * We received remote memsync reply even before - * local write finished. - */ - PJDLOG_ASSERT(memsyncack); - - pjdlog_debug(2, - "remote_recv: (%p) Moving request back to the recv queue.", - hio); - mtx_lock(&hio_recv_list_lock[ncomp]); - TAILQ_INSERT_TAIL(&hio_recv_list[ncomp], hio, - hio_next[ncomp]); - mtx_unlock(&hio_recv_list_lock[ncomp]); - continue; - default: - PJDLOG_ABORT("Invalid hio_countdown."); + } else { + PJDLOG_ASSERT(!memsyncack); + /* Remote final reply arrived. */ } } + if (refcnt_release(&hio->hio_countdown) > 0) + continue; if (ISSYNCREQ(hio)) { mtx_lock(&sync_lock); SYNCREQDONE(hio); Modified: stable/8/sbin/hastd/proto.c ============================================================================== --- stable/8/sbin/hastd/proto.c Sat Dec 28 19:22:23 2013 (r260007) +++ stable/8/sbin/hastd/proto.c Sat Dec 28 19:23:16 2013 (r260008) @@ -298,8 +298,8 @@ proto_connection_send(const struct proto protoname = mconn->pc_proto->prt_name; PJDLOG_ASSERT(protoname != NULL); - ret = conn->pc_proto->prt_send(conn->pc_ctx, protoname, - strlen(protoname) + 1, fd); + ret = conn->pc_proto->prt_send(conn->pc_ctx, + (const unsigned char *)protoname, strlen(protoname) + 1, fd); proto_close(mconn); if (ret != 0) { errno = ret; @@ -325,7 +325,7 @@ proto_connection_recv(const struct proto bzero(protoname, sizeof(protoname)); - ret = conn->pc_proto->prt_recv(conn->pc_ctx, protoname, + ret = conn->pc_proto->prt_recv(conn->pc_ctx, (unsigned char *)protoname, sizeof(protoname) - 1, &fd); if (ret != 0) { errno = ret; Modified: stable/8/sbin/hastd/secondary.c ============================================================================== --- stable/8/sbin/hastd/secondary.c Sat Dec 28 19:22:23 2013 (r260007) +++ stable/8/sbin/hastd/secondary.c Sat Dec 28 19:23:16 2013 (r260008) @@ -82,18 +82,21 @@ static struct hast_resource *gres; * until some in-progress requests are freed. */ static TAILQ_HEAD(, hio) hio_free_list; +static size_t hio_free_list_size; static pthread_mutex_t hio_free_list_lock; static pthread_cond_t hio_free_list_cond; /* * Disk thread (the one that does I/O requests) takes requests from this list. */ static TAILQ_HEAD(, hio) hio_disk_list; +static size_t hio_disk_list_size; static pthread_mutex_t hio_disk_list_lock; static pthread_cond_t hio_disk_list_cond; /* * Thread that sends requests back to primary takes requests from this list. */ static TAILQ_HEAD(, hio) hio_send_list; +static size_t hio_send_list_size; static pthread_mutex_t hio_send_list_lock; static pthread_cond_t hio_send_list_cond; @@ -107,14 +110,12 @@ static void *disk_thread(void *arg); static void *send_thread(void *arg); #define QUEUE_INSERT(name, hio) do { \ - bool _wakeup; \ - \ mtx_lock(&hio_##name##_list_lock); \ - _wakeup = TAILQ_EMPTY(&hio_##name##_list); \ + if (TAILQ_EMPTY(&hio_##name##_list)) \ + cv_broadcast(&hio_##name##_list_cond); \ TAILQ_INSERT_TAIL(&hio_##name##_list, (hio), hio_next); \ + hio_##name##_list_size++; \ mtx_unlock(&hio_##name##_list_lock); \ - if (_wakeup) \ - cv_broadcast(&hio_##name##_list_cond); \ } while (0) #define QUEUE_TAKE(name, hio) do { \ mtx_lock(&hio_##name##_list_lock); \ @@ -122,11 +123,22 @@ static void *send_thread(void *arg); cv_wait(&hio_##name##_list_cond, \ &hio_##name##_list_lock); \ } \ + PJDLOG_ASSERT(hio_##name##_list_size != 0); \ + hio_##name##_list_size--; \ TAILQ_REMOVE(&hio_##name##_list, (hio), hio_next); \ mtx_unlock(&hio_##name##_list_lock); \ } while (0) static void +output_status_aux(struct nv *nvout) +{ + + nv_add_uint64(nvout, (uint64_t)hio_free_list_size, "idle_queue_size"); + nv_add_uint64(nvout, (uint64_t)hio_disk_list_size, "local_queue_size"); + nv_add_uint64(nvout, (uint64_t)hio_send_list_size, "send_queue_size"); +} + +static void hio_clear(struct hio *hio) { @@ -190,6 +202,7 @@ init_environment(void) } hio_clear(hio); TAILQ_INSERT_HEAD(&hio_free_list, hio, hio_next); + hio_free_list_size++; } } @@ -441,6 +454,7 @@ hastd_secondary(struct hast_resource *re } gres = res; + res->output_status_aux = output_status_aux; mode = pjdlog_mode_get(); debuglevel = pjdlog_debug_get(); From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 20:02:52 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63D8AE47; Sat, 28 Dec 2013 20:02: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4E25A1615; Sat, 28 Dec 2013 20:02:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBSK2qnx033472; Sat, 28 Dec 2013 20:02:52 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBSK2nnu033451; Sat, 28 Dec 2013 20:02:49 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312282002.rBSK2nnu033451@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sat, 28 Dec 2013 20:02:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260011 - in stable/10/contrib/gcc: . cp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 20:02:52 -0000 Author: pfg Date: Sat Dec 28 20:02:49 2013 New Revision: 260011 URL: http://svnweb.freebsd.org/changeset/base/260011 Log: MFC r259666, r259696: gcc: warnings from -Wformat-security Obtained from: Apple GCC 4.2 - 5646 (Radar 5764921) Modified: stable/10/contrib/gcc/c-common.c stable/10/contrib/gcc/c-convert.c stable/10/contrib/gcc/c-incpath.c stable/10/contrib/gcc/c-typeck.c stable/10/contrib/gcc/cfg.c stable/10/contrib/gcc/collect2.c stable/10/contrib/gcc/cp/cvt.c stable/10/contrib/gcc/cp/pt.c stable/10/contrib/gcc/cp/typeck.c stable/10/contrib/gcc/fold-const.c stable/10/contrib/gcc/gcc.c stable/10/contrib/gcc/gcov.c stable/10/contrib/gcc/tlink.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/gcc/c-common.c ============================================================================== --- stable/10/contrib/gcc/c-common.c Sat Dec 28 20:00:34 2013 (r260010) +++ stable/10/contrib/gcc/c-common.c Sat Dec 28 20:02:49 2013 (r260011) @@ -5983,11 +5983,11 @@ c_parse_error (const char *gmsgid, enum message = NULL; } else - error (gmsgid); + error (gmsgid, ""); if (message) { - error (message); + error (message, ""); free (message); } #undef catenate_messages Modified: stable/10/contrib/gcc/c-convert.c ============================================================================== --- stable/10/contrib/gcc/c-convert.c Sat Dec 28 20:00:34 2013 (r260010) +++ stable/10/contrib/gcc/c-convert.c Sat Dec 28 20:02:49 2013 (r260011) @@ -80,7 +80,7 @@ convert (tree type, tree expr) if ((invalid_conv_diag = targetm.invalid_conversion (TREE_TYPE (expr), type))) { - error (invalid_conv_diag); + error (invalid_conv_diag, ""); return error_mark_node; } Modified: stable/10/contrib/gcc/c-incpath.c ============================================================================== --- stable/10/contrib/gcc/c-incpath.c Sat Dec 28 20:00:34 2013 (r260010) +++ stable/10/contrib/gcc/c-incpath.c Sat Dec 28 20:02:49 2013 (r260011) @@ -72,7 +72,7 @@ free_path (struct cpp_dir *path, int rea case REASON_DUP_SYS: fprintf (stderr, _("ignoring duplicate directory \"%s\"\n"), path->name); if (reason == REASON_DUP_SYS) - fprintf (stderr, + fprintf (stderr, "%s", _(" as it is a non-system directory that duplicates a system directory\n")); break; @@ -292,16 +292,16 @@ merge_include_chains (cpp_reader *pfile, { struct cpp_dir *p; - fprintf (stderr, _("#include \"...\" search starts here:\n")); + fprintf (stderr, "%s", _("#include \"...\" search starts here:\n")); for (p = heads[QUOTE];; p = p->next) { if (p == heads[BRACKET]) - fprintf (stderr, _("#include <...> search starts here:\n")); + fprintf (stderr, "%s", _("#include <...> search starts here:\n")); if (!p) break; fprintf (stderr, " %s\n", p->name); } - fprintf (stderr, _("End of search list.\n")); + fprintf (stderr, "%s", _("End of search list.\n")); } } Modified: stable/10/contrib/gcc/c-typeck.c ============================================================================== --- stable/10/contrib/gcc/c-typeck.c Sat Dec 28 20:00:34 2013 (r260010) +++ stable/10/contrib/gcc/c-typeck.c Sat Dec 28 20:02:49 2013 (r260011) @@ -2584,7 +2584,7 @@ convert_arguments (tree typelist, tree v else if ((invalid_func_diag = targetm.calls.invalid_arg_for_unprototyped_fn (typelist, fundecl, val))) { - error (invalid_func_diag); + error (invalid_func_diag, ""); return error_mark_node; } else @@ -2781,7 +2781,7 @@ build_unary_op (enum tree_code code, tre if ((invalid_op_diag = targetm.invalid_unary_op (code, TREE_TYPE (xarg)))) { - error (invalid_op_diag); + error (invalid_op_diag, ""); return error_mark_node; } @@ -7819,7 +7819,7 @@ build_binary_op (enum tree_code code, tr if ((invalid_op_diag = targetm.invalid_binary_op (code, type0, type1))) { - error (invalid_op_diag); + error (invalid_op_diag, ""); return error_mark_node; } Modified: stable/10/contrib/gcc/cfg.c ============================================================================== --- stable/10/contrib/gcc/cfg.c Sat Dec 28 20:00:34 2013 (r260010) +++ stable/10/contrib/gcc/cfg.c Sat Dec 28 20:02:49 2013 (r260011) @@ -830,7 +830,7 @@ dump_cfg_bb_info (FILE *file, basic_bloc else fprintf (file, ", "); first = false; - fputs (bb_bitnames[i], file); + fprintf (file, "%s", bb_bitnames[i]); } if (!first) fprintf (file, ")"); Modified: stable/10/contrib/gcc/collect2.c ============================================================================== --- stable/10/contrib/gcc/collect2.c Sat Dec 28 20:00:34 2013 (r260010) +++ stable/10/contrib/gcc/collect2.c Sat Dec 28 20:02:49 2013 (r260011) @@ -1562,10 +1562,10 @@ collect_execute (const char *prog, char if (err != 0) { errno = err; - fatal_perror (errmsg); + fatal_perror ("%s", errmsg); } else - fatal (errmsg); + fatal ("%s", errmsg); } return pex; @@ -2050,10 +2050,10 @@ scan_prog_file (const char *prog_name, e if (err != 0) { errno = err; - fatal_perror (errmsg); + fatal_perror ("%s", errmsg); } else - fatal (errmsg); + fatal ("%s", errmsg); } int_handler = (void (*) (int)) signal (SIGINT, SIG_IGN); Modified: stable/10/contrib/gcc/cp/cvt.c ============================================================================== --- stable/10/contrib/gcc/cp/cvt.c Sat Dec 28 20:00:34 2013 (r260010) +++ stable/10/contrib/gcc/cp/cvt.c Sat Dec 28 20:02:49 2013 (r260011) @@ -615,7 +615,7 @@ ocp_convert (tree type, tree expr, int c if ((invalid_conv_diag = targetm.invalid_conversion (TREE_TYPE (expr), type))) { - error (invalid_conv_diag); + error (invalid_conv_diag, ""); return error_mark_node; } Modified: stable/10/contrib/gcc/cp/pt.c ============================================================================== --- stable/10/contrib/gcc/cp/pt.c Sat Dec 28 20:00:34 2013 (r260010) +++ stable/10/contrib/gcc/cp/pt.c Sat Dec 28 20:02:49 2013 (r260011) @@ -8925,7 +8925,7 @@ tsubst_copy_and_build (tree t, /*template_arg_p=*/false, &error_msg); if (error_msg) - error (error_msg); + error ("%s", error_msg); if (!function_p && TREE_CODE (decl) == IDENTIFIER_NODE) decl = unqualified_name_lookup_error (decl); return decl; Modified: stable/10/contrib/gcc/cp/typeck.c ============================================================================== --- stable/10/contrib/gcc/cp/typeck.c Sat Dec 28 20:00:34 2013 (r260010) +++ stable/10/contrib/gcc/cp/typeck.c Sat Dec 28 20:02:49 2013 (r260011) @@ -3107,7 +3107,7 @@ build_binary_op (enum tree_code code, tr if ((invalid_op_diag = targetm.invalid_binary_op (code, type0, type1))) { - error (invalid_op_diag); + error (invalid_op_diag, ""); return error_mark_node; } @@ -4034,7 +4034,7 @@ build_unary_op (enum tree_code code, tre : code), TREE_TYPE (xarg)))) { - error (invalid_op_diag); + error (invalid_op_diag, ""); return error_mark_node; } Modified: stable/10/contrib/gcc/fold-const.c ============================================================================== --- stable/10/contrib/gcc/fold-const.c Sat Dec 28 20:00:34 2013 (r260010) +++ stable/10/contrib/gcc/fold-const.c Sat Dec 28 20:02:49 2013 (r260011) @@ -992,7 +992,7 @@ fold_overflow_warning (const char* gmsgi } } else if (issue_strict_overflow_warning (wc)) - warning (OPT_Wstrict_overflow, gmsgid); + warning (OPT_Wstrict_overflow, "%s", gmsgid); } /* Return true if the built-in mathematical function specified by CODE Modified: stable/10/contrib/gcc/gcc.c ============================================================================== --- stable/10/contrib/gcc/gcc.c Sat Dec 28 20:00:34 2013 (r260010) +++ stable/10/contrib/gcc/gcc.c Sat Dec 28 20:02:49 2013 (r260011) @@ -2974,7 +2974,7 @@ execute (void) if (errmsg != NULL) { if (err == 0) - fatal (errmsg); + fatal ("%s", errmsg); else { errno = err; @@ -6525,7 +6525,7 @@ main (int argc, char **argv) if (! verbose_flag) { - printf (_("\nFor bug reporting instructions, please see:\n")); + printf ("%s", _("\nFor bug reporting instructions, please see:\n")); printf ("%s.\n", bug_report_url); return (0); Modified: stable/10/contrib/gcc/gcov.c ============================================================================== --- stable/10/contrib/gcc/gcov.c Sat Dec 28 20:00:34 2013 (r260010) +++ stable/10/contrib/gcc/gcov.c Sat Dec 28 20:02:49 2013 (r260011) @@ -417,7 +417,7 @@ print_version (void) fnotice (stdout, "gcov (GCC) %s\n", version_string); fprintf (stdout, "Copyright %s 2006 Free Software Foundation, Inc.\n", _("(C)")); - fnotice (stdout, + fnotice (stdout, "%s", _("This is free software; see the source for copying conditions.\n" "There is NO warranty; not even for MERCHANTABILITY or \n" "FITNESS FOR A PARTICULAR PURPOSE.\n\n")); Modified: stable/10/contrib/gcc/tlink.c ============================================================================== --- stable/10/contrib/gcc/tlink.c Sat Dec 28 20:00:34 2013 (r260010) +++ stable/10/contrib/gcc/tlink.c Sat Dec 28 20:02:49 2013 (r260011) @@ -381,7 +381,7 @@ read_repo_file (file *f) FILE *stream = fopen (f->key, "r"); if (tlink_verbose >= 2) - fprintf (stderr, _("collect: reading %s\n"), f->key); + fprintf (stderr, "%s", _("collect: reading %s\n"), f->key); while (fscanf (stream, "%c ", &c) == 1) { From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 20:03:17 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC6A0F73; Sat, 28 Dec 2013 20:03:17 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C712C1617; Sat, 28 Dec 2013 20:03:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBSK3H8U033589; Sat, 28 Dec 2013 20:03:17 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBSK3EPG033570; Sat, 28 Dec 2013 20:03:14 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312282003.rBSK3EPG033570@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sat, 28 Dec 2013 20:03: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: r260012 - in stable/9/contrib/gcc: . cp X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 20:03:17 -0000 Author: pfg Date: Sat Dec 28 20:03:14 2013 New Revision: 260012 URL: http://svnweb.freebsd.org/changeset/base/260012 Log: MFC r259666, r259696: gcc: warnings from -Wformat-security Obtained from: Apple GCC 4.2 - 5646 (Radar 5764921) Modified: stable/9/contrib/gcc/c-common.c stable/9/contrib/gcc/c-convert.c stable/9/contrib/gcc/c-incpath.c stable/9/contrib/gcc/c-typeck.c stable/9/contrib/gcc/cfg.c stable/9/contrib/gcc/collect2.c stable/9/contrib/gcc/cp/cvt.c stable/9/contrib/gcc/cp/pt.c stable/9/contrib/gcc/cp/typeck.c stable/9/contrib/gcc/fold-const.c stable/9/contrib/gcc/gcc.c stable/9/contrib/gcc/gcov.c stable/9/contrib/gcc/tlink.c Directory Properties: stable/9/ (props changed) stable/9/contrib/gcc/ (props changed) Modified: stable/9/contrib/gcc/c-common.c ============================================================================== --- stable/9/contrib/gcc/c-common.c Sat Dec 28 20:02:49 2013 (r260011) +++ stable/9/contrib/gcc/c-common.c Sat Dec 28 20:03:14 2013 (r260012) @@ -5983,11 +5983,11 @@ c_parse_error (const char *gmsgid, enum message = NULL; } else - error (gmsgid); + error (gmsgid, ""); if (message) { - error (message); + error (message, ""); free (message); } #undef catenate_messages Modified: stable/9/contrib/gcc/c-convert.c ============================================================================== --- stable/9/contrib/gcc/c-convert.c Sat Dec 28 20:02:49 2013 (r260011) +++ stable/9/contrib/gcc/c-convert.c Sat Dec 28 20:03:14 2013 (r260012) @@ -80,7 +80,7 @@ convert (tree type, tree expr) if ((invalid_conv_diag = targetm.invalid_conversion (TREE_TYPE (expr), type))) { - error (invalid_conv_diag); + error (invalid_conv_diag, ""); return error_mark_node; } Modified: stable/9/contrib/gcc/c-incpath.c ============================================================================== --- stable/9/contrib/gcc/c-incpath.c Sat Dec 28 20:02:49 2013 (r260011) +++ stable/9/contrib/gcc/c-incpath.c Sat Dec 28 20:03:14 2013 (r260012) @@ -72,7 +72,7 @@ free_path (struct cpp_dir *path, int rea case REASON_DUP_SYS: fprintf (stderr, _("ignoring duplicate directory \"%s\"\n"), path->name); if (reason == REASON_DUP_SYS) - fprintf (stderr, + fprintf (stderr, "%s", _(" as it is a non-system directory that duplicates a system directory\n")); break; @@ -292,16 +292,16 @@ merge_include_chains (cpp_reader *pfile, { struct cpp_dir *p; - fprintf (stderr, _("#include \"...\" search starts here:\n")); + fprintf (stderr, "%s", _("#include \"...\" search starts here:\n")); for (p = heads[QUOTE];; p = p->next) { if (p == heads[BRACKET]) - fprintf (stderr, _("#include <...> search starts here:\n")); + fprintf (stderr, "%s", _("#include <...> search starts here:\n")); if (!p) break; fprintf (stderr, " %s\n", p->name); } - fprintf (stderr, _("End of search list.\n")); + fprintf (stderr, "%s", _("End of search list.\n")); } } Modified: stable/9/contrib/gcc/c-typeck.c ============================================================================== --- stable/9/contrib/gcc/c-typeck.c Sat Dec 28 20:02:49 2013 (r260011) +++ stable/9/contrib/gcc/c-typeck.c Sat Dec 28 20:03:14 2013 (r260012) @@ -2584,7 +2584,7 @@ convert_arguments (tree typelist, tree v else if ((invalid_func_diag = targetm.calls.invalid_arg_for_unprototyped_fn (typelist, fundecl, val))) { - error (invalid_func_diag); + error (invalid_func_diag, ""); return error_mark_node; } else @@ -2781,7 +2781,7 @@ build_unary_op (enum tree_code code, tre if ((invalid_op_diag = targetm.invalid_unary_op (code, TREE_TYPE (xarg)))) { - error (invalid_op_diag); + error (invalid_op_diag, ""); return error_mark_node; } @@ -7819,7 +7819,7 @@ build_binary_op (enum tree_code code, tr if ((invalid_op_diag = targetm.invalid_binary_op (code, type0, type1))) { - error (invalid_op_diag); + error (invalid_op_diag, ""); return error_mark_node; } Modified: stable/9/contrib/gcc/cfg.c ============================================================================== --- stable/9/contrib/gcc/cfg.c Sat Dec 28 20:02:49 2013 (r260011) +++ stable/9/contrib/gcc/cfg.c Sat Dec 28 20:03:14 2013 (r260012) @@ -830,7 +830,7 @@ dump_cfg_bb_info (FILE *file, basic_bloc else fprintf (file, ", "); first = false; - fputs (bb_bitnames[i], file); + fprintf (file, "%s", bb_bitnames[i]); } if (!first) fprintf (file, ")"); Modified: stable/9/contrib/gcc/collect2.c ============================================================================== --- stable/9/contrib/gcc/collect2.c Sat Dec 28 20:02:49 2013 (r260011) +++ stable/9/contrib/gcc/collect2.c Sat Dec 28 20:03:14 2013 (r260012) @@ -1562,10 +1562,10 @@ collect_execute (const char *prog, char if (err != 0) { errno = err; - fatal_perror (errmsg); + fatal_perror ("%s", errmsg); } else - fatal (errmsg); + fatal ("%s", errmsg); } return pex; @@ -2050,10 +2050,10 @@ scan_prog_file (const char *prog_name, e if (err != 0) { errno = err; - fatal_perror (errmsg); + fatal_perror ("%s", errmsg); } else - fatal (errmsg); + fatal ("%s", errmsg); } int_handler = (void (*) (int)) signal (SIGINT, SIG_IGN); Modified: stable/9/contrib/gcc/cp/cvt.c ============================================================================== --- stable/9/contrib/gcc/cp/cvt.c Sat Dec 28 20:02:49 2013 (r260011) +++ stable/9/contrib/gcc/cp/cvt.c Sat Dec 28 20:03:14 2013 (r260012) @@ -615,7 +615,7 @@ ocp_convert (tree type, tree expr, int c if ((invalid_conv_diag = targetm.invalid_conversion (TREE_TYPE (expr), type))) { - error (invalid_conv_diag); + error (invalid_conv_diag, ""); return error_mark_node; } Modified: stable/9/contrib/gcc/cp/pt.c ============================================================================== --- stable/9/contrib/gcc/cp/pt.c Sat Dec 28 20:02:49 2013 (r260011) +++ stable/9/contrib/gcc/cp/pt.c Sat Dec 28 20:03:14 2013 (r260012) @@ -8925,7 +8925,7 @@ tsubst_copy_and_build (tree t, /*template_arg_p=*/false, &error_msg); if (error_msg) - error (error_msg); + error ("%s", error_msg); if (!function_p && TREE_CODE (decl) == IDENTIFIER_NODE) decl = unqualified_name_lookup_error (decl); return decl; Modified: stable/9/contrib/gcc/cp/typeck.c ============================================================================== --- stable/9/contrib/gcc/cp/typeck.c Sat Dec 28 20:02:49 2013 (r260011) +++ stable/9/contrib/gcc/cp/typeck.c Sat Dec 28 20:03:14 2013 (r260012) @@ -3107,7 +3107,7 @@ build_binary_op (enum tree_code code, tr if ((invalid_op_diag = targetm.invalid_binary_op (code, type0, type1))) { - error (invalid_op_diag); + error (invalid_op_diag, ""); return error_mark_node; } @@ -4034,7 +4034,7 @@ build_unary_op (enum tree_code code, tre : code), TREE_TYPE (xarg)))) { - error (invalid_op_diag); + error (invalid_op_diag, ""); return error_mark_node; } Modified: stable/9/contrib/gcc/fold-const.c ============================================================================== --- stable/9/contrib/gcc/fold-const.c Sat Dec 28 20:02:49 2013 (r260011) +++ stable/9/contrib/gcc/fold-const.c Sat Dec 28 20:03:14 2013 (r260012) @@ -992,7 +992,7 @@ fold_overflow_warning (const char* gmsgi } } else if (issue_strict_overflow_warning (wc)) - warning (OPT_Wstrict_overflow, gmsgid); + warning (OPT_Wstrict_overflow, "%s", gmsgid); } /* Return true if the built-in mathematical function specified by CODE Modified: stable/9/contrib/gcc/gcc.c ============================================================================== --- stable/9/contrib/gcc/gcc.c Sat Dec 28 20:02:49 2013 (r260011) +++ stable/9/contrib/gcc/gcc.c Sat Dec 28 20:03:14 2013 (r260012) @@ -2974,7 +2974,7 @@ execute (void) if (errmsg != NULL) { if (err == 0) - fatal (errmsg); + fatal ("%s", errmsg); else { errno = err; @@ -6525,7 +6525,7 @@ main (int argc, char **argv) if (! verbose_flag) { - printf (_("\nFor bug reporting instructions, please see:\n")); + printf ("%s", _("\nFor bug reporting instructions, please see:\n")); printf ("%s.\n", bug_report_url); return (0); Modified: stable/9/contrib/gcc/gcov.c ============================================================================== --- stable/9/contrib/gcc/gcov.c Sat Dec 28 20:02:49 2013 (r260011) +++ stable/9/contrib/gcc/gcov.c Sat Dec 28 20:03:14 2013 (r260012) @@ -417,7 +417,7 @@ print_version (void) fnotice (stdout, "gcov (GCC) %s\n", version_string); fprintf (stdout, "Copyright %s 2006 Free Software Foundation, Inc.\n", _("(C)")); - fnotice (stdout, + fnotice (stdout, "%s", _("This is free software; see the source for copying conditions.\n" "There is NO warranty; not even for MERCHANTABILITY or \n" "FITNESS FOR A PARTICULAR PURPOSE.\n\n")); Modified: stable/9/contrib/gcc/tlink.c ============================================================================== --- stable/9/contrib/gcc/tlink.c Sat Dec 28 20:02:49 2013 (r260011) +++ stable/9/contrib/gcc/tlink.c Sat Dec 28 20:03:14 2013 (r260012) @@ -381,7 +381,7 @@ read_repo_file (file *f) FILE *stream = fopen (f->key, "r"); if (tlink_verbose >= 2) - fprintf (stderr, _("collect: reading %s\n"), f->key); + fprintf (stderr, "%s", _("collect: reading %s\n"), f->key); while (fscanf (stream, "%c ", &c) == 1) { From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 20:05:36 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 41923161; Sat, 28 Dec 2013 20:05:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 28F69162F; Sat, 28 Dec 2013 20:05:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBSK5apG034010; Sat, 28 Dec 2013 20:05:36 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBSK5Vx6033981; Sat, 28 Dec 2013 20:05:31 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201312282005.rBSK5Vx6033981@svn.freebsd.org> From: Julio Merino Date: Sat, 28 Dec 2013 20:05:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260013 - in stable/10: . etc etc/mtree lib lib/libcrypt lib/libcrypt/tests lib/tests libexec share/doc share/man/man1 share/man/man4 share/man/man7 share/mk tests tools/build/mk tools/... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 20:05:36 -0000 Author: jmmv Date: Sat Dec 28 20:05:31 2013 New Revision: 260013 URL: http://svnweb.freebsd.org/changeset/base/260013 Log: Set up the /usr/tests hierarchy. This is a MFC of the following into stable/10: - r257097 Set up the /usr/tests hierarchy. - r257098 Add missing WITHOUTTESTS file. - r257100 Add a tests(7) manual page. - r257105 Disable WITHTESTS= for now. - r257848 Fix buildworld when WITHTESTS is enabled. - r257850 Subsume the functionality of MKATF into MKTESTS. - r257851 Handle the removal of the test suite when WITHOUTTESTS=yes. - r257852 Install category Kyuafiles from their category directories. - r258232 Install BSD.tests.mtree when MKTESTS is yes. Note that building with WITH_TESTS is still broken at this point (and hence why WITHOUT_TESTS is the set as the default). Subsequent pullups will fix the remaining issues. Added: stable/10/etc/mtree/BSD.tests.dist - copied unchanged from r257097, head/etc/mtree/BSD.tests.dist stable/10/lib/tests/ - copied from r257852, head/lib/tests/ stable/10/share/man/man7/tests.7 - copied unchanged from r257100, head/share/man/man7/tests.7 stable/10/tests/ - copied from r257097, head/tests/ stable/10/tools/build/options/WITHOUT_TESTS - copied unchanged from r257098, head/tools/build/options/WITHOUT_TESTS Modified: stable/10/Makefile.inc1 stable/10/UPDATING stable/10/etc/Makefile stable/10/etc/mtree/Makefile stable/10/lib/Makefile stable/10/lib/libcrypt/Makefile stable/10/lib/libcrypt/tests/Makefile stable/10/libexec/Makefile stable/10/share/doc/Makefile stable/10/share/man/man1/Makefile stable/10/share/man/man4/Makefile stable/10/share/man/man7/Makefile stable/10/share/man/man7/hier.7 stable/10/share/mk/Makefile stable/10/share/mk/bsd.own.mk stable/10/tests/Makefile stable/10/tests/README stable/10/tools/build/mk/OptionalObsoleteFiles.inc stable/10/usr.bin/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Sat Dec 28 20:03:14 2013 (r260012) +++ stable/10/Makefile.inc1 Sat Dec 28 20:05:31 2013 (r260013) @@ -85,6 +85,9 @@ SUBDIR+=secure SUBDIR+=share .endif SUBDIR+=sys usr.bin usr.sbin +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif .if ${MK_OFED} != "no" SUBDIR+=contrib/ofed .endif @@ -489,6 +492,10 @@ _worldtmp: mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ -p ${WORLDTMP}/usr/lib >/dev/null .endif +.if ${MK_TESTS} != "no" + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \ + -p ${WORLDTMP}${TESTSBASE} >/dev/null +.endif .for _mtree in ${LOCAL_MTREE} mtree -deU -f ${.CURDIR}/${_mtree} -p ${WORLDTMP} > /dev/null .endfor @@ -1487,7 +1494,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 ${_secure_lib_libcrypto} ${_lib_libldns} \ ${_secure_lib_libssh} ${_secure_lib_libssl} -.if ${MK_ATF} != "no" +.if ${MK_TESTS} != "no" _lib_atf_libatf_c= lib/atf/libatf-c .endif @@ -1597,10 +1604,12 @@ ${_lib}__PL: .PHONY .MAKE .if exists(${.CURDIR}/${_lib}) ${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_lib} && \ - ${MAKE} DIRPRFX=${_lib}/ obj && \ - ${MAKE} DIRPRFX=${_lib}/ depend && \ - ${MAKE} -DNO_PROFILE -DNO_PIC DIRPRFX=${_lib}/ all && \ - ${MAKE} -DNO_PROFILE -DNO_PIC DIRPRFX=${_lib}/ install + ${MAKE} -DNO_TESTS DIRPRFX=${_lib}/ obj && \ + ${MAKE} -DNO_TESTS DIRPRFX=${_lib}/ depend && \ + ${MAKE} -DNO_TESTS -DNO_PROFILE -DNO_PIC \ + DIRPRFX=${_lib}/ all && \ + ${MAKE} -DNO_TESTS -DNO_PROFILE -DNO_PIC \ + DIRPRFX=${_lib}/ install .endif .endfor @@ -1609,10 +1618,10 @@ ${_lib}__L: .PHONY .MAKE .if exists(${.CURDIR}/${_lib}) ${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_lib} && \ - ${MAKE} DIRPRFX=${_lib}/ obj && \ - ${MAKE} DIRPRFX=${_lib}/ depend && \ - ${MAKE} DIRPRFX=${_lib}/ all && \ - ${MAKE} DIRPRFX=${_lib}/ install + ${MAKE} -DNO_TESTS DIRPRFX=${_lib}/ obj && \ + ${MAKE} -DNO_TESTS DIRPRFX=${_lib}/ depend && \ + ${MAKE} -DNO_TESTS DIRPRFX=${_lib}/ all && \ + ${MAKE} -DNO_TESTS DIRPRFX=${_lib}/ install .endif .endfor @@ -1622,10 +1631,12 @@ ${_lib}__L: .PHONY .MAKE lib/libpam__L: .PHONY .MAKE ${_+_}@${ECHODIR} "===> lib/libpam (obj,depend,all,install)"; \ cd ${.CURDIR}/lib/libpam && \ - ${MAKE} DIRPRFX=lib/libpam/ obj && \ - ${MAKE} DIRPRFX=lib/libpam/ depend && \ - ${MAKE} DIRPRFX=lib/libpam/ -D_NO_LIBPAM_SO_YET all && \ - ${MAKE} DIRPRFX=lib/libpam/ -D_NO_LIBPAM_SO_YET install + ${MAKE} -DNO_TESTS DIRPRFX=lib/libpam/ obj && \ + ${MAKE} -DNO_TESTS DIRPRFX=lib/libpam/ depend && \ + ${MAKE} -DNO_TESTS DIRPRFX=lib/libpam/ \ + -D_NO_LIBPAM_SO_YET all && \ + ${MAKE} -DNO_TESTS DIRPRFX=lib/libpam/ \ + -D_NO_LIBPAM_SO_YET install _prereq_libs: ${_prereq_libs:S/$/__PL/} _startup_libs: ${_startup_libs:S/$/__L/} Modified: stable/10/UPDATING ============================================================================== --- stable/10/UPDATING Sat Dec 28 20:03:14 2013 (r260012) +++ stable/10/UPDATING Sat Dec 28 20:05:31 2013 (r260013) @@ -27,6 +27,12 @@ older version of current is a bit fragil big-endian integer in accordance with RFC 4402. __FreeBSD_version is bumped to 1000701. +20131108: + The WITHOUT_ATF build knob has been removed and its functionality + has been subsumed into the more generic WITHOUT_TESTS. If you were + using the former to disable the build of the ATF libraries, you + should change your settings to use the latter. + 20131031: The default version of mtree is nmtree which is obtained from NetBSD. The output is generally the same, but may vary Modified: stable/10/etc/Makefile ============================================================================== --- stable/10/etc/Makefile Sat Dec 28 20:03:14 2013 (r260012) +++ stable/10/etc/Makefile Sat Dec 28 20:05:31 2013 (r260013) @@ -139,6 +139,9 @@ BIN1+= regdomain.xml BIN2= netstart pccard_ether rc.suspend rc.resume MTREE= BSD.include.dist BSD.root.dist BSD.usr.dist BSD.var.dist +.if ${MK_TESTS} != "no" +MTREE+= BSD.tests.dist +.endif .if ${MK_SENDMAIL} != "no" MTREE+= BSD.sendmail.dist .endif @@ -317,6 +320,9 @@ MTREES+= mtree/BSD.debug.dist /usr/lib .if ${MK_GROFF} != "no" MTREES+= mtree/BSD.groff.dist /usr .endif +.if ${MK_TESTS} != "no" +MTREES+= mtree/BSD.tests.dist ${TESTSBASE} +.endif .if ${MK_SENDMAIL} != "no" MTREES+= mtree/BSD.sendmail.dist / .endif Copied: stable/10/etc/mtree/BSD.tests.dist (from r257097, head/etc/mtree/BSD.tests.dist) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/etc/mtree/BSD.tests.dist Sat Dec 28 20:05:31 2013 (r260013, copy of r257097, head/etc/mtree/BSD.tests.dist) @@ -0,0 +1,12 @@ +# $FreeBSD$ +# +# Please see the file src/etc/mtree/README before making changes to this file. +# + +/set type=dir uname=root gname=wheel mode=0755 +. + lib + libcrypt + .. + .. +.. Modified: stable/10/etc/mtree/Makefile ============================================================================== --- stable/10/etc/mtree/Makefile Sat Dec 28 20:03:14 2013 (r260012) +++ stable/10/etc/mtree/Makefile Sat Dec 28 20:05:31 2013 (r260013) @@ -6,6 +6,7 @@ FILES= ${_BSD.debug.dist} \ BSD.include.dist \ BSD.root.dist \ ${_BSD.sendmail.dist} \ + ${_BSD.tests.dist} \ BSD.usr.dist \ BSD.var.dist @@ -18,6 +19,9 @@ _BSD.groff.dist= BSD.groff.dist .if ${MK_SENDMAIL} != "no" _BSD.sendmail.dist= BSD.sendmail.dist .endif +.if ${MK_TESTS} != "no" +_BSD.tests.dist= BSD.tests.dist +.endif NO_OBJ= FILESDIR= /etc/mtree Modified: stable/10/lib/Makefile ============================================================================== --- stable/10/lib/Makefile Sat Dec 28 20:03:14 2013 (r260012) +++ stable/10/lib/Makefile Sat Dec 28 20:05:31 2013 (r260013) @@ -127,7 +127,8 @@ SUBDIR= ${SUBDIR_ORDERED} \ libyaml \ libz \ ${_atf} \ - ${_clang} + ${_clang} \ + ${_tests} .if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf) _csu=csu/${MACHINE_ARCH}-elf @@ -141,10 +142,6 @@ _csu=csu # NB: keep these sorted by MK_* knobs -.if ${MK_ATF} != "no" -_atf= atf -.endif - .if ${MK_ATM} != "no" _libngatm= libngatm .endif @@ -254,6 +251,11 @@ _libsmutil= libsmutil _libtelnet= libtelnet .endif +.if ${MK_TESTS} != "no" +_atf= atf +_tests= tests +.endif + .if ${MK_UNBOUND} != "no" _libunbound= libunbound .endif Modified: stable/10/lib/libcrypt/Makefile ============================================================================== --- stable/10/lib/libcrypt/Makefile Sat Dec 28 20:03:14 2013 (r260012) +++ stable/10/lib/libcrypt/Makefile Sat Dec 28 20:05:31 2013 (r260013) @@ -37,4 +37,9 @@ WARNS?= 2 PRECIOUSLIB= +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include +.include Modified: stable/10/lib/libcrypt/tests/Makefile ============================================================================== --- stable/10/lib/libcrypt/tests/Makefile Sat Dec 28 20:03:14 2013 (r260012) +++ stable/10/lib/libcrypt/tests/Makefile Sat Dec 28 20:05:31 2013 (r260013) @@ -2,6 +2,8 @@ # exercise libcrypt +TESTSDIR= ${TESTSBASE}/lib/libcrypt + ATF_TESTS_C= crypt_tests CFLAGS+= -I${.CURDIR:H} Modified: stable/10/libexec/Makefile ============================================================================== --- stable/10/libexec/Makefile Sat Dec 28 20:03:14 2013 (r260012) +++ stable/10/libexec/Makefile Sat Dec 28 20:05:31 2013 (r260013) @@ -33,10 +33,6 @@ SUBDIR= ${_atf} \ ulog-helper \ ${_ypxfr} -.if ${MK_ATF} != "no" -_atf= atf -.endif - .if ${MK_AT} != "no" _atrun= atrun .endif @@ -76,4 +72,8 @@ _smrsh= smrsh _telnetd= telnetd .endif +.if ${MK_TESTS} != "no" +_atf= atf +.endif + .include Modified: stable/10/share/doc/Makefile ============================================================================== --- stable/10/share/doc/Makefile Sat Dec 28 20:03:14 2013 (r260012) +++ stable/10/share/doc/Makefile Sat Dec 28 20:05:31 2013 (r260013) @@ -9,7 +9,7 @@ SUBDIR= ${_IPv6} \ ${_llvm} \ ${_roffdocs} -.if ${MK_ATF} != "no" +.if ${MK_TESTS} != "no" _atf= atf .endif Modified: stable/10/share/man/man1/Makefile ============================================================================== --- stable/10/share/man/man1/Makefile Sat Dec 28 20:03:14 2013 (r260012) +++ stable/10/share/man/man1/Makefile Sat Dec 28 20:05:31 2013 (r260013) @@ -5,7 +5,7 @@ MAN= builtin.1 intro.1 -.if ${MK_ATF} != "no" +.if ${MK_TESTS} != "no" ATF= ${.CURDIR}/../../../contrib/atf .PATH: ${ATF}/doc MAN+= atf-test-program.1 Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Sat Dec 28 20:03:14 2013 (r260012) +++ stable/10/share/man/man4/Makefile Sat Dec 28 20:05:31 2013 (r260013) @@ -827,7 +827,7 @@ _nvram2env.4= nvram2env.4 SUBDIR= man4.${MACHINE_CPUARCH} .endif -.if ${MK_ATF} != "no" +.if ${MK_TESTS} != "no" ATF= ${.CURDIR}/../../../contrib/atf .PATH: ${ATF}/doc _atf_test_case.4= atf-test-case.4 Modified: stable/10/share/man/man7/Makefile ============================================================================== --- stable/10/share/man/man7/Makefile Sat Dec 28 20:03:14 2013 (r260012) +++ stable/10/share/man/man7/Makefile Sat Dec 28 20:05:31 2013 (r260013) @@ -29,6 +29,10 @@ MAN= adding_user.7 \ sticky.7 \ tuning.7 +.if ${MK_TESTS} != "no" +MAN+= tests.7 +.endif + MLINKS= intro.7 miscellaneous.7 MLINKS+= security.7 securelevel.7 MLINKS+= c99.7 c.7 Modified: stable/10/share/man/man7/hier.7 ============================================================================== --- stable/10/share/man/man7/hier.7 Sat Dec 28 20:03:14 2013 (r260012) +++ stable/10/share/man/man7/hier.7 Sat Dec 28 20:05:31 2013 (r260013) @@ -702,6 +702,12 @@ source code for files in source code for files in .Pa /usr/sbin .El +.Pp +.It Pa tests/ +The +.Fx +test suite. +See tests(7) for more details. .El .It Pa /var/ multi-purpose log, temporary, transient, and spool files Copied: stable/10/share/man/man7/tests.7 (from r257100, head/share/man/man7/tests.7) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man7/tests.7 Sat Dec 28 20:05:31 2013 (r260013, copy of r257100, head/share/man/man7/tests.7) @@ -0,0 +1,199 @@ +.\" $FreeBSD$ +.\" $NetBSD: tests.kyua.7,v 1.2 2013/07/20 21:39:59 wiz Exp $ +.\" +.\" Copyright (c) 2010 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND +.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY +.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.Dd October 19, 2013 +.Dt TESTS 7 +.Os +.Sh NAME +.Nm tests +.Nd introduction to the FreeBSD test suite +.Sh DESCRIPTION +The +.Fx +test suite provides a collection of automated tests for two major purposes. +On the one hand, the test suite aids +.Em developers +in catching bugs and regressions in the code when they performing modifications +to the source tree. +On the other hand, the test suite allows +.Em end users +(and, in particular, system administrators) to verify that fresh installations +of the +.Fx +operating system behave correctly in their hardware platform and also to ensure +that the system does not suffer from regressions during regular system +operation and maintenance. +.Pp +The +.Fx +test suite is installed under the +.Pa /usr/tests +hierarchy. +.Pp +This manual page describes how to execute the test suite and how to configure +some of its optional features. +.Ss When to run the tests? +Before diving into the details of how to run the test suite, here are some +scenarios in which you should be running them: +.Bl -bullet -offset indent +.It +After a fresh installation of +.Fx +to ensure that the system works correctly on your hardware platform. +.It +After an upgrade of +.Fx +to a different version to ensure that the new code works well on your +hardware platform and that the upgrade did not introduce regressions in your +configuration. +.It +After performing changes to the source tree to catch any bugs and/or regressions +introduced by the modifications. +.It +Periodically, maybe from a +.Xr cron 8 +job, to ensure that any changes to the system (such as the installation of +third-party packages or manual modifications to configuration files) do not +introduce unexpected failures. +.El +.Ss Running the tests +First of all, you will need to install the +.Sq ports/devel/kyua +package. +.Pp +Use the following command to run the whole test suite: +.Bd -literal -offset indent +$ kyua test -k /usr/tests/Kyuafile +.Ed +.Pp +The above will go through all test programs in +.Pa /usr/tests +recursively, execute them, store their results and debugging data in Kyua +database (by default in +.Pa ~/.kyua/store.db ) , +and print a summary of the results. +This summary includes a brief count of all total tests run and how many of +them failed. +.Pp +It is possible to restrict which tests to run by providing their names in +the command line. +For example, this would execute the tests for the +.Xr cp 1 +and +.Xr cut 1 +utilities: +.Bd -literal -offset indent +$ kyua test -k /usr/tests/Kyuafile bin/cp usr.bin/cut +.Ed +.Ss Obtaining reports of the tests execution +Additional information of the results of the execution can be later extracted +from the database by using the various reporting commands of Kyua. +For example, the following would extract a plain-text report of the executed +tests and show which ones failed: +.Bd -literal -offset indent +$ kyua report +.Ed +.Pp +This other example would generate an HTML report ready to be published on a +web server: +.Bd -literal -offset indent +$ kyua report-html --output ~/public_html/tests +.Ed +.Pp +For further details on the command-line interface of Kyua, please refer +to its manual page +.Xr kyua 1 . +.\".Ss Configuring the tests +.\"Some test cases in the +.\".Fx +.\"test suite require the administrator to manually set up some configuration +.\"properties before they can run. +.\"Unless these properties are defined, the tests that require them will be marked +.\"as skipped and thus they will not be really executed. +.\".Pp +.\"Test suites are configured by defining the values to their configuration +.\"variables in +.\".Pa /usr/local/etc/kyua/kyua.conf . +.\"The format of this file is detailed in +.\".Xr kyua.conf 5 . +.\".Pp +.\"The following configuration variables are available in the +.\".Fx +.\"test suite: +.\".Bl -tag +.\".It NONE REGISTERED YET +.\"TBD. +.Ss What to do if something fails? +If there is +.Em any failure +during the execution of the test suite, please considering reporting it to the +.Fx +developers so that the failure can be analyzed and fixed. +To do so, either send a message to the appropriate mailing list or file a +problem report. +For more details please refer to: +.Bl -bullet -offset indent -compact +.It +.Lk http://lists.freebsd.org/ "FreeBSD Mailing Lists" +.It +.Lk http://www.freebsd.org/send-pr.html "Submit a FreeBSD Problem Report" +.El +.Sh FILES +.Bl -tag -compact -width usrXlocalXetcXkyuaXkyuaXconfXX +.It Pa /usr/local/etc/kyua/kyua.conf +System-wide configuration file for +.Xr kyua 1 . +.It Pa ~/.kyua/kyua.conf +User-specific configuration file for +.Xr kyua 1 ; +overrides the system file. +.It Pa ~/.kyua/store.db +Default database used by Kyua to maintain the data of the executed tests. +.It Pa /usr/tests/ +Location of the +.Fx +test suite. +.It Pa /usr/tests/Kyuafile +Top-level test suite definition file. +.El +.Sh SEE ALSO +.Xr kyua 1 . +.Sh HISTORY +The collection of test programs in +.Pa /usr/tests +first appeared in +.Fx 11.0 . +.Pp +The +.Nm +manual page first appeared in +.Nx 6.0 +and was later ported to +.Fx 11.0 . +.Sh AUTHORS +.An Julio Merino Aq Mt jmmv@google.com Modified: stable/10/share/mk/Makefile ============================================================================== --- stable/10/share/mk/Makefile Sat Dec 28 20:03:14 2013 (r260012) +++ stable/10/share/mk/Makefile Sat Dec 28 20:05:31 2013 (r260013) @@ -43,7 +43,7 @@ FILES= \ NO_OBJ= FILESDIR= ${BINDIR}/mk -.if ${MK_ATF} != "no" +.if ${MK_TESTS} != "no" FILES+= atf.test.mk FILES+= plain.test.mk FILES+= tap.test.mk Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Sat Dec 28 20:03:14 2013 (r260012) +++ stable/10/share/mk/bsd.own.mk Sat Dec 28 20:05:31 2013 (r260013) @@ -376,6 +376,7 @@ __DEFAULT_NO_OPTIONS = \ PKGTOOLS \ SHARED_TOOLCHAIN \ SVN \ + TESTS \ USB_GADGET_EXAMPLES # @@ -555,6 +556,20 @@ MK_CLANG_FULL:= no MK_LLDB:= no .endif +.if defined(NO_TESTS) +# This should be handled above along the handling of all other NO_* options. +# However, the above is broken when WITH_*=yes are passed to make(1) as +# command line arguments. See PR bin/183762. +# +# Because the TESTS option is new and it will default to yes, it's likely +# that people will pass WITHOUT_TESTS=yes to make(1) directly and get a broken +# build. So, just in case, it's better to explicitly handle this case here. +# +# TODO(jmmv): Either fix make to allow us putting this override where it +# belongs above or fix this file to cope with the make bug. +MK_TESTS:= no +.endif + # # Set defaults for the MK_*_SUPPORT variables. # Modified: stable/10/tests/Makefile ============================================================================== --- head/tests/Makefile Fri Oct 25 05:25:19 2013 (r257097) +++ stable/10/tests/Makefile Sat Dec 28 20:05:31 2013 (r260013) @@ -2,10 +2,9 @@ .include -TESTS_SUBDIRS= lib +SUBDIR= # still empty TESTSDIR= ${TESTSBASE} - KYUAFILE= yes .include Modified: stable/10/tests/README ============================================================================== --- head/tests/README Fri Oct 25 05:25:19 2013 (r257097) +++ stable/10/tests/README Sat Dec 28 20:05:31 2013 (r260013) @@ -44,13 +44,12 @@ tree-- the top-level Kyuafile does not k exist upfront. Instead, such Kyuafile automatically detects, at run-time, which */Kyuafile files exist and uses those directly. -Similarly, every category subdirectory within src/tests/ provides the -same Kyuafile with auto-discovery features. For example: src/tests/lib/ -holds a generic Makefile to install test-suite related material but such -directory does not know upfront which libraries within src/lib/ will -install tests. For this reason, the Kyuafile in src/tests/lib/ has to -also use the auto-discovery features. The same applies for any other -category subdirectory (e.g. bin, usr.sbin, etc.). +Similarly, every directory in src/ that wants to install a Kyuafile to +just recurse into other subdirectories reuses this Kyuafile with +auto-discovery features. As an example, take a look at src/lib/tests/ +whose sole purpose is to install a Kyuafile into /usr/tests/lib/. +The goal in this specific case is for /usr/tests/lib/ to be generated +entirely from src/lib/. -- $FreeBSD$ Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Sat Dec 28 20:03:14 2013 (r260012) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Sat Dec 28 20:05:31 2013 (r260013) @@ -68,56 +68,6 @@ OLD_FILES+=usr/share/man/man1/batch.1.gz OLD_FILES+=usr/share/man/man8/atrun.8.gz .endif -.if ${MK_ATF} == no -OLD_FILES+=usr/bin/atf-sh -OLD_DIRS+=usr/include/atf-c -OLD_FILES+=usr/include/atf-c/build.h -OLD_FILES+=usr/include/atf-c/check.h -OLD_FILES+=usr/include/atf-c/config.h -OLD_FILES+=usr/include/atf-c/defs.h -OLD_FILES+=usr/include/atf-c/error.h -OLD_FILES+=usr/include/atf-c/error_fwd.h -OLD_FILES+=usr/include/atf-c/macros.h -OLD_FILES+=usr/include/atf-c/tc.h -OLD_FILES+=usr/include/atf-c/tp.h -OLD_FILES+=usr/include/atf-c/utils.h -OLD_FILES+=usr/include/atf-c/atf-c.h -OLD_FILES+=usr/include/atf-c.h -OLD_DIRS+=usr/include/atf-c++ -OLD_FILES+=usr/include/atf-c++/build.hpp -OLD_FILES+=usr/include/atf-c++/check.hpp -OLD_FILES+=usr/include/atf-c++/config.hpp -OLD_FILES+=usr/include/atf-c++/macros.hpp -OLD_FILES+=usr/include/atf-c++/tests.hpp -OLD_FILES+=usr/include/atf-c++/utils.hpp -OLD_FILES+=usr/include/atf-c++/atf-c++.hpp -OLD_FILES+=usr/include/atf-c++.hpp -OLD_FILES+=usr/lib/libatf-c_p.a -OLD_FILES+=usr/lib/libatf-c.so.1 -OLD_FILES+=usr/lib/libatf-c.so -OLD_FILES+=usr/lib/libatf-c++.a -OLD_FILES+=usr/lib/libatf-c++_p.a -OLD_FILES+=usr/lib/libatf-c++.so.1 -OLD_FILES+=usr/lib/libatf-c++.so -OLD_FILES+=usr/lib/libatf-c.a -OLD_FILES+=usr/libexec/atf-check -OLD_DIRS+=usr/share/atf -OLD_FILES+=usr/share/atf/libatf-sh.subr -OLD_DIRS+=usr/share/doc/atf -OLD_FILES+=usr/share/doc/atf/AUTHORS -OLD_FILES+=usr/share/doc/atf/COPYING -OLD_FILES+=usr/share/doc/atf/NEWS -OLD_FILES+=usr/share/doc/atf/README -OLD_FILES+=usr/share/man/man1/atf-check.1.gz -OLD_FILES+=usr/share/man/man1/atf-sh.1.gz -OLD_FILES+=usr/share/man/man1/atf-test-program.1.gz -OLD_FILES+=usr/share/man/man3/atf-c-api.3.gz -OLD_FILES+=usr/share/man/man3/atf-c++-api.3.gz -OLD_FILES+=usr/share/man/man3/atf-sh-api.3.gz -OLD_FILES+=usr/share/man/man4/atf-test-case.4.gz -OLD_FILES+=usr/share/mk/atf.test.mk -.endif - .if ${MK_ATM} == no OLD_FILES+=rescue/atmconfig OLD_FILES+=sbin/atmconfig @@ -4141,6 +4091,61 @@ OLD_FILES+=usr/share/man/man1/telnet.1.g OLD_FILES+=usr/share/man/man8/telnetd.8.gz .endif +.if ${MK_TESTS} == no +# ATF libraries. +OLD_FILES+=usr/bin/atf-sh +OLD_DIRS+=usr/include/atf-c +OLD_FILES+=usr/include/atf-c/build.h +OLD_FILES+=usr/include/atf-c/check.h +OLD_FILES+=usr/include/atf-c/config.h +OLD_FILES+=usr/include/atf-c/defs.h +OLD_FILES+=usr/include/atf-c/error.h +OLD_FILES+=usr/include/atf-c/error_fwd.h +OLD_FILES+=usr/include/atf-c/macros.h +OLD_FILES+=usr/include/atf-c/tc.h +OLD_FILES+=usr/include/atf-c/tp.h +OLD_FILES+=usr/include/atf-c/utils.h +OLD_FILES+=usr/include/atf-c.h +OLD_DIRS+=usr/include/atf-c++ +OLD_FILES+=usr/include/atf-c++/build.hpp +OLD_FILES+=usr/include/atf-c++/check.hpp +OLD_FILES+=usr/include/atf-c++/config.hpp +OLD_FILES+=usr/include/atf-c++/macros.hpp +OLD_FILES+=usr/include/atf-c++/tests.hpp +OLD_FILES+=usr/include/atf-c++/utils.hpp +OLD_FILES+=usr/include/atf-c++.hpp +OLD_FILES+=usr/lib/libatf-c_p.a +OLD_FILES+=usr/lib/libatf-c.so.1 +OLD_FILES+=usr/lib/libatf-c.so +OLD_FILES+=usr/lib/libatf-c++.a +OLD_FILES+=usr/lib/libatf-c++_p.a +OLD_FILES+=usr/lib/libatf-c++.so.1 +OLD_FILES+=usr/lib/libatf-c++.so +OLD_FILES+=usr/lib/libatf-c.a +OLD_FILES+=usr/libexec/atf-check +OLD_DIRS+=usr/share/atf +OLD_FILES+=usr/share/atf/libatf-sh.subr +OLD_DIRS+=usr/share/doc/atf +OLD_FILES+=usr/share/doc/atf/AUTHORS +OLD_FILES+=usr/share/doc/atf/COPYING +OLD_FILES+=usr/share/doc/atf/NEWS +OLD_FILES+=usr/share/doc/atf/README +OLD_FILES+=usr/share/man/man1/atf-check.1.gz +OLD_FILES+=usr/share/man/man1/atf-sh.1.gz +OLD_FILES+=usr/share/man/man1/atf-test-program.1.gz +OLD_FILES+=usr/share/man/man3/atf-c-api.3.gz +OLD_FILES+=usr/share/man/man3/atf-c++-api.3.gz +OLD_FILES+=usr/share/man/man3/atf-sh-api.3.gz +OLD_FILES+=usr/share/man/man4/atf-test-case.4.gz +OLD_FILES+=usr/share/mk/atf.test.mk + +# Test suite. +TESTS_DIRS!=find ${DESTDIR}/usr/tests -type d | sed -e 's,^${DESTDIR}/,,' +OLD_DIRS+=${TESTS_DIRS} +TESTS_FILES!=find ${DESTDIR}/usr/tests \! -type d | sed -e 's,^${DESTDIR}/,,' +OLD_FILES+=${TESTS_FILES} +.endif + #.if ${MK_TOOLCHAIN} == no # to be filled in #.endif Copied: stable/10/tools/build/options/WITHOUT_TESTS (from r257098, head/tools/build/options/WITHOUT_TESTS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_TESTS Sat Dec 28 20:05:31 2013 (r260013, copy of r257098, head/tools/build/options/WITHOUT_TESTS) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to not build any test programs nor install them in /usr/tests. Modified: stable/10/usr.bin/Makefile ============================================================================== --- stable/10/usr.bin/Makefile Sat Dec 28 20:03:14 2013 (r260012) +++ stable/10/usr.bin/Makefile Sat Dec 28 20:05:31 2013 (r260013) @@ -210,10 +210,6 @@ SUBDIR= alias \ SUBDIR+= at .endif -.if ${MK_ATF} != "no" -_atf= atf -.endif - .if ${MK_ATM} != "no" SUBDIR+= atm .endif @@ -332,6 +328,10 @@ SUBDIR+= vacation SUBDIR+= telnet .endif +.if ${MK_TESTS} != "no" +_atf= atf +.endif + .if ${MK_TEXTPROC} != "no" SUBDIR+= checknr SUBDIR+= colcrt From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 20:11:00 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1404A2F1 for ; Sat, 28 Dec 2013 20:11:00 +0000 (UTC) Received: from mail-ie0-f177.google.com (mail-ie0-f177.google.com [209.85.223.177]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D5221164B for ; Sat, 28 Dec 2013 20:10:59 +0000 (UTC) Received: by mail-ie0-f177.google.com with SMTP id tp5so10814864ieb.36 for ; Sat, 28 Dec 2013 12:10:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=8LvOtQ0+/PVHqztsv1sMIKAZvYsC2A0TkdooPhUZ8OI=; b=Zh9Eg0FKi5gGMwxLpZdXvs06+a4iIRtX/eDk8B9pNpJf395qTqN7aNTX8Vhp78VnMT rCAK0lJzNyalbK3IE0JwW4AOaVPiCZGUQ/hyJzIlf+CxsjeGtzY/PcCDaYPgw8puiILb wetX2uCEnjtBzAmfLc0PXJmzLYmCXDuruNPdfFmJGHAv+1Sl+exbAC2HHXzDLv8Rq2bi FAnPcqPk4YzDqtpWOMCN/NuHlNYcZmXdUKIC/fkQY5EjoyWcxlNmKKfnn9vpNhVsAL5f nx+bns4RxXScw/RXd25AVCYai00aZhDXvRa5EAGEyR+AJkbaYLov1zwyqBMv5x9KXHGu 33KQ== X-Gm-Message-State: ALoCoQnQZv8dyupr6tjR4CY6/lBGMYyobT4sxn5bN8pcKtdjJENp46dyga0UMHbasoe/dihmQcU+ X-Received: by 10.50.41.106 with SMTP id e10mr30744763igl.37.1388261453057; Sat, 28 Dec 2013 12:10:53 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.31.36 with HTTP; Sat, 28 Dec 2013 12:10:32 -0800 (PST) X-Originating-IP: [108.176.158.82] In-Reply-To: <201312282005.rBSK5Vx6033981@svn.freebsd.org> References: <201312282005.rBSK5Vx6033981@svn.freebsd.org> From: Julio Merino Date: Sat, 28 Dec 2013 15:10:32 -0500 Message-ID: Subject: Re: svn commit: r260013 - in stable/10: . etc etc/mtree lib lib/libcrypt lib/libcrypt/tests lib/tests libexec share/doc share/man/man1 share/man/man4 share/man/man7 share/mk tests tools/build/mk tools/... To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 20:11:00 -0000 On Sat, Dec 28, 2013 at 3:05 PM, Julio Merino wrote: > Author: jmmv > Date: Sat Dec 28 20:05:31 2013 > New Revision: 260013 > URL: http://svnweb.freebsd.org/changeset/base/260013 > > Log: > Set up the /usr/tests hierarchy. > > This is a MFC of the following into stable/10: > - r257097 Set up the /usr/tests hierarchy. > - r257098 Add missing WITHOUTTESTS file. > - r257100 Add a tests(7) manual page. > - r257105 Disable WITHTESTS= for now. > - r257848 Fix buildworld when WITHTESTS is enabled. > - r257850 Subsume the functionality of MKATF into MKTESTS. > - r257851 Handle the removal of the test suite when WITHOUTTESTS=yes. > - r257852 Install category Kyuafiles from their category directories. > - r258232 Install BSD.tests.mtree when MKTESTS is yes. > > Note that building with WITH_TESTS is still broken at this point (and > hence why WITHOUT_TESTS is the set as the default). Subsequent pullups > will fix the remaining issues. Forgot to mention that this is "make tinderbox" clean as seen in ref10-amd64 with the default settings. -- Julio Merino / @jmmv From owner-svn-src-stable@FreeBSD.ORG Sat Dec 28 23:09:03 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B2925A40; Sat, 28 Dec 2013 23:09: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9B1481214; Sat, 28 Dec 2013 23:09:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBSN93Gv003393; Sat, 28 Dec 2013 23:09:03 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBSN8woJ003349; Sat, 28 Dec 2013 23:08:58 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201312282308.rBSN8woJ003349@svn.freebsd.org> From: Julio Merino Date: Sat, 28 Dec 2013 23:08:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260024 - in stable/10: . etc etc/mtree lib/atf lib/atf/libatf-c lib/atf/libatf-c++ lib/atf/libatf-c++/tests lib/atf/libatf-c/tests lib/atf/tests lib/atf/tests/test-programs libexec lib... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 23:09:03 -0000 Author: jmmv Date: Sat Dec 28 23:08:58 2013 New Revision: 260024 URL: http://svnweb.freebsd.org/changeset/base/260024 Log: Plug the ATF tests into the build. This is a MFC into stable/10 of: - r257849 Add libatf-c++ to the prebuild libs. - r257853 Build and install the atf tests. - r258233 Move all atf directories to the tests mtree. - r258285 Fix the build of some ATF tests. This change is "make tinderbox" clean on ref10-amd64 with the default settings of WITHOUT_TESTS. It is likely for the WITH_TESTS build to still be broken because not all relevant changes have been merged yet. Added: stable/10/lib/atf/libatf-c++/Makefile.inc - copied unchanged from r257853, head/lib/atf/libatf-c++/Makefile.inc stable/10/lib/atf/libatf-c++/tests/ - copied from r257853, head/lib/atf/libatf-c++/tests/ stable/10/lib/atf/libatf-c/Makefile.inc - copied unchanged from r257853, head/lib/atf/libatf-c/Makefile.inc stable/10/lib/atf/libatf-c/tests/ - copied from r257853, head/lib/atf/libatf-c/tests/ stable/10/lib/atf/tests/ - copied from r257853, head/lib/atf/tests/ stable/10/libexec/atf/atf-check/Makefile.inc - copied unchanged from r257853, head/libexec/atf/atf-check/Makefile.inc stable/10/libexec/atf/atf-check/tests/ - copied from r257853, head/libexec/atf/atf-check/tests/ stable/10/libexec/atf/tests/ - copied from r257853, head/libexec/atf/tests/ stable/10/libexec/tests/ - copied from r257853, head/libexec/tests/ stable/10/usr.bin/atf/atf-sh/tests/ - copied from r257853, head/usr.bin/atf/atf-sh/tests/ stable/10/usr.bin/atf/tests/ - copied from r257853, head/usr.bin/atf/tests/ stable/10/usr.bin/tests/ - copied from r257853, head/usr.bin/tests/ Modified: stable/10/Makefile.inc1 stable/10/etc/Makefile stable/10/etc/mtree/BSD.include.dist stable/10/etc/mtree/BSD.tests.dist stable/10/etc/mtree/BSD.usr.dist stable/10/lib/atf/Makefile stable/10/lib/atf/Makefile.inc stable/10/lib/atf/libatf-c++/Makefile stable/10/lib/atf/libatf-c++/tests/Makefile stable/10/lib/atf/libatf-c/Makefile stable/10/lib/atf/libatf-c/tests/Makefile stable/10/lib/atf/tests/test-programs/Makefile stable/10/libexec/Makefile stable/10/libexec/atf/Makefile stable/10/libexec/atf/Makefile.inc stable/10/libexec/atf/atf-check/Makefile stable/10/usr.bin/Makefile stable/10/usr.bin/atf/Makefile stable/10/usr.bin/atf/Makefile.inc stable/10/usr.bin/atf/atf-sh/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Sat Dec 28 23:02:48 2013 (r260023) +++ stable/10/Makefile.inc1 Sat Dec 28 23:08:58 2013 (r260024) @@ -494,7 +494,7 @@ _worldtmp: .endif .if ${MK_TESTS} != "no" mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \ - -p ${WORLDTMP}${TESTSBASE} >/dev/null + -p ${WORLDTMP}/usr >/dev/null .endif .for _mtree in ${LOCAL_MTREE} mtree -deU -f ${.CURDIR}/${_mtree} -p ${WORLDTMP} > /dev/null @@ -1480,7 +1480,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 ${_kerberos5_lib_libhx509} ${_kerberos5_lib_libkrb5} \ ${_kerberos5_lib_libroken} \ ${_kerberos5_lib_libwind} \ - ${_lib_atf_libatf_c} \ + ${_lib_atf} \ lib/libbz2 ${_libcom_err} lib/libcrypt \ lib/libelf lib/libexpat \ ${_lib_libgssapi} ${_lib_libipx} \ @@ -1495,7 +1495,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 ${_secure_lib_libssh} ${_secure_lib_libssl} .if ${MK_TESTS} != "no" -_lib_atf_libatf_c= lib/atf/libatf-c +_lib_atf= lib/atf .endif .if ${MK_LIBTHR} != "no" Modified: stable/10/etc/Makefile ============================================================================== --- stable/10/etc/Makefile Sat Dec 28 23:02:48 2013 (r260023) +++ stable/10/etc/Makefile Sat Dec 28 23:08:58 2013 (r260024) @@ -321,7 +321,7 @@ MTREES+= mtree/BSD.debug.dist /usr/lib MTREES+= mtree/BSD.groff.dist /usr .endif .if ${MK_TESTS} != "no" -MTREES+= mtree/BSD.tests.dist ${TESTSBASE} +MTREES+= mtree/BSD.tests.dist /usr .endif .if ${MK_SENDMAIL} != "no" MTREES+= mtree/BSD.sendmail.dist / Modified: stable/10/etc/mtree/BSD.include.dist ============================================================================== --- stable/10/etc/mtree/BSD.include.dist Sat Dec 28 23:02:48 2013 (r260023) +++ stable/10/etc/mtree/BSD.include.dist Sat Dec 28 23:08:58 2013 (r260024) @@ -9,10 +9,6 @@ .. arpa .. - atf-c - .. - atf-c++ - .. bsm .. bsnmp Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Sat Dec 28 23:02:48 2013 (r260023) +++ stable/10/etc/mtree/BSD.tests.dist Sat Dec 28 23:08:58 2013 (r260024) @@ -5,8 +5,44 @@ /set type=dir uname=root gname=wheel mode=0755 . - lib - libcrypt + include + atf-c + .. + atf-c++ + .. + .. + share + atf + .. + doc + atf + .. + .. + .. + tests + lib + atf + libatf-c + .. + libatf-c++ + .. + test-programs + .. + .. + libcrypt + .. + .. + libexec + atf + atf-check + .. + .. + .. + usr.bin + atf + atf-sh + .. + .. .. .. .. Modified: stable/10/etc/mtree/BSD.usr.dist ============================================================================== --- stable/10/etc/mtree/BSD.usr.dist Sat Dec 28 23:02:48 2013 (r260023) +++ stable/10/etc/mtree/BSD.usr.dist Sat Dec 28 23:08:58 2013 (r260024) @@ -120,8 +120,6 @@ sbin .. share - atf - .. bsdconfig media .. @@ -165,8 +163,6 @@ doc IPv6 .. - atf - .. atm .. legal @@ -1447,6 +1443,4 @@ .. src nochange .. - tests - .. .. Modified: stable/10/lib/atf/Makefile ============================================================================== --- stable/10/lib/atf/Makefile Sat Dec 28 23:02:48 2013 (r260023) +++ stable/10/lib/atf/Makefile Sat Dec 28 23:08:58 2013 (r260024) @@ -27,9 +27,13 @@ .include -SUBDIR= \ - libatf-c \ - libatf-c++ +SUBDIR= libatf-c \ + libatf-c++ \ + ${_tests} + +.if ${MK_TESTS} != "no" +_tests= tests +.endif .ORDER: ${SUBDIR} Modified: stable/10/lib/atf/Makefile.inc ============================================================================== --- stable/10/lib/atf/Makefile.inc Sat Dec 28 23:02:48 2013 (r260023) +++ stable/10/lib/atf/Makefile.inc Sat Dec 28 23:08:58 2013 (r260024) @@ -25,8 +25,6 @@ # # $FreeBSD$ -ATF= ${.CURDIR}/../../../contrib/atf - _CFLAGS:= ${CFLAGS} _CPPFLAGS:= ${CPPFLAGS} _CXXFLAGS:= ${CXXFLAGS} Modified: stable/10/lib/atf/libatf-c++/Makefile ============================================================================== --- stable/10/lib/atf/libatf-c++/Makefile Sat Dec 28 23:02:48 2013 (r260023) +++ stable/10/lib/atf/libatf-c++/Makefile Sat Dec 28 23:08:58 2013 (r260024) @@ -36,6 +36,7 @@ LDADD= -latf-c LDFLAGS+= -L${.OBJDIR}/../libatf-c +ATF= ${.CURDIR:H:H:H}/contrib/atf .PATH: ${ATF} .PATH: ${ATF}/atf-c++ .PATH: ${ATF}/atf-c++/detail @@ -73,4 +74,8 @@ INCSDIR_atf-c++.hpp= ${INCLUDEDIR} MAN= atf-c++-api.3 +.if ${MK_TESTS} != "no" +SUBDIR= tests +.endif + .include Copied: stable/10/lib/atf/libatf-c++/Makefile.inc (from r257853, head/lib/atf/libatf-c++/Makefile.inc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/atf/libatf-c++/Makefile.inc Sat Dec 28 23:08:58 2013 (r260024, copy of r257853, head/lib/atf/libatf-c++/Makefile.inc) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +.include "../Makefile.inc" Modified: stable/10/lib/atf/libatf-c++/tests/Makefile ============================================================================== --- head/lib/atf/libatf-c++/tests/Makefile Fri Nov 8 14:33:41 2013 (r257853) +++ stable/10/lib/atf/libatf-c++/tests/Makefile Sat Dec 28 23:08:58 2013 (r260024) @@ -23,7 +23,7 @@ FILES+= unused_test.cpp tests_test \ utils_test ATF_TESTS_CXX+= ${_T} -SRCS_${_T}= ${_T}.cpp test_helpers.cpp +SRCS.${_T}= ${_T}.cpp test_helpers.cpp .endfor ATF_TESTS_SH= pkg_config_test @@ -41,7 +41,7 @@ ATF_TESTS_SH= pkg_config_test text_test \ ui_test ATF_TESTS_CXX+= ${_T} -SRCS_${_T}= ${_T}.cpp test_helpers.cpp +SRCS.${_T}= ${_T}.cpp test_helpers.cpp .endfor .include Modified: stable/10/lib/atf/libatf-c/Makefile ============================================================================== --- stable/10/lib/atf/libatf-c/Makefile Sat Dec 28 23:02:48 2013 (r260023) +++ stable/10/lib/atf/libatf-c/Makefile Sat Dec 28 23:08:58 2013 (r260024) @@ -30,6 +30,7 @@ LIB= atf-c SHLIB_MAJOR= 1 +ATF= ${.CURDIR:H:H:H}/contrib/atf .PATH: ${ATF} .PATH: ${ATF}/atf-c .PATH: ${ATF}/atf-c/detail @@ -73,4 +74,8 @@ INCSDIR_atf-c.h= ${INCLUDEDIR} MAN= atf-c-api.3 +.if ${MK_TESTS} != "no" +SUBDIR= tests +.endif + .include Copied: stable/10/lib/atf/libatf-c/Makefile.inc (from r257853, head/lib/atf/libatf-c/Makefile.inc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/atf/libatf-c/Makefile.inc Sat Dec 28 23:08:58 2013 (r260024, copy of r257853, head/lib/atf/libatf-c/Makefile.inc) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +.include "../Makefile.inc" Modified: stable/10/lib/atf/libatf-c/tests/Makefile ============================================================================== --- head/lib/atf/libatf-c/tests/Makefile Fri Nov 8 14:33:41 2013 (r257853) +++ stable/10/lib/atf/libatf-c/tests/Makefile Sat Dec 28 23:08:58 2013 (r260024) @@ -33,7 +33,7 @@ FILES+= unused_test.c tp_test \ utils_test ATF_TESTS_C+= ${_T} -SRCS_${_T}= ${_T}.c test_helpers.c +SRCS.${_T}= ${_T}.c test_helpers.c .endfor ATF_TESTS_SH= pkg_config_test @@ -51,12 +51,12 @@ ATF_TESTS_SH= pkg_config_test text_test \ user_test ATF_TESTS_C+= ${_T} -SRCS_${_T}= ${_T}.c test_helpers.c +SRCS.${_T}= ${_T}.c test_helpers.c .endfor PROGS+= process_helpers -SRCS_process_helpers= process_helpers.c -MAN_process_helpers= # defined -BINDIR_process_helpers= ${TESTSDIR} +SRCS.process_helpers= process_helpers.c +MAN.process_helpers= # defined +BINDIR.process_helpers= ${TESTSDIR} .include Modified: stable/10/lib/atf/tests/test-programs/Makefile ============================================================================== --- head/lib/atf/tests/test-programs/Makefile Fri Nov 8 14:33:41 2013 (r257853) +++ stable/10/lib/atf/tests/test-programs/Makefile Sat Dec 28 23:08:58 2013 (r260024) @@ -13,7 +13,7 @@ CFLAGS+= -I${ATF} ATF_TESTS_C= c_helpers ATF_TESTS_CXX= cpp_helpers -SRCS_cpp_helpers= cpp_helpers.cpp +SRCS.cpp_helpers= cpp_helpers.cpp ATF_TESTS_SH= sh_helpers .for _T in config_test expect_test fork_test meta_data_test result_test srcdir_test Modified: stable/10/libexec/Makefile ============================================================================== --- stable/10/libexec/Makefile Sat Dec 28 23:02:48 2013 (r260023) +++ stable/10/libexec/Makefile Sat Dec 28 23:08:58 2013 (r260024) @@ -28,6 +28,7 @@ SUBDIR= ${_atf} \ talkd \ tcpd \ ${_telnetd} \ + ${_tests} \ tftpd \ ${_tftp-proxy} \ ulog-helper \ @@ -74,6 +75,7 @@ _telnetd= telnetd .if ${MK_TESTS} != "no" _atf= atf +_tests= tests .endif .include Modified: stable/10/libexec/atf/Makefile ============================================================================== --- stable/10/libexec/atf/Makefile Sat Dec 28 23:02:48 2013 (r260023) +++ stable/10/libexec/atf/Makefile Sat Dec 28 23:08:58 2013 (r260024) @@ -25,6 +25,6 @@ # # $FreeBSD$ -SUBDIR= atf-check +SUBDIR= atf-check tests .include Modified: stable/10/libexec/atf/Makefile.inc ============================================================================== --- stable/10/libexec/atf/Makefile.inc Sat Dec 28 23:02:48 2013 (r260023) +++ stable/10/libexec/atf/Makefile.inc Sat Dec 28 23:08:58 2013 (r260024) @@ -25,8 +25,6 @@ # # $FreeBSD$ -ATF = ${.CURDIR}/../../../contrib/atf - CFLAGS+= -DHAVE_CONFIG_H WARNS?= 3 Modified: stable/10/libexec/atf/atf-check/Makefile ============================================================================== --- stable/10/libexec/atf/atf-check/Makefile Sat Dec 28 23:02:48 2013 (r260023) +++ stable/10/libexec/atf/atf-check/Makefile Sat Dec 28 23:08:58 2013 (r260024) @@ -27,6 +27,7 @@ .include +ATF= ${.CURDIR:H:H:H}/contrib/atf .PATH: ${ATF}/atf-sh BINDIR= /usr/libexec @@ -42,4 +43,8 @@ LDFLAGS+= -L${.OBJDIR}/../../../lib/atf/ LDFLAGS+= -L${.OBJDIR}/../../../lib/atf/libatf-c LDADD+= -latf-c++ -latf-c +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Copied: stable/10/libexec/atf/atf-check/Makefile.inc (from r257853, head/libexec/atf/atf-check/Makefile.inc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/libexec/atf/atf-check/Makefile.inc Sat Dec 28 23:08:58 2013 (r260024, copy of r257853, head/libexec/atf/atf-check/Makefile.inc) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +.include "../Makefile.inc" Modified: stable/10/usr.bin/Makefile ============================================================================== --- stable/10/usr.bin/Makefile Sat Dec 28 23:02:48 2013 (r260023) +++ stable/10/usr.bin/Makefile Sat Dec 28 23:08:58 2013 (r260024) @@ -160,6 +160,7 @@ SUBDIR= alias \ tar \ tcopy \ tee \ + ${_tests} \ tftp \ time \ tip \ @@ -330,6 +331,7 @@ SUBDIR+= telnet .if ${MK_TESTS} != "no" _atf= atf +_tests= tests .endif .if ${MK_TEXTPROC} != "no" Modified: stable/10/usr.bin/atf/Makefile ============================================================================== --- stable/10/usr.bin/atf/Makefile Sat Dec 28 23:02:48 2013 (r260023) +++ stable/10/usr.bin/atf/Makefile Sat Dec 28 23:08:58 2013 (r260024) @@ -25,6 +25,6 @@ # # $FreeBSD$ -SUBDIR= atf-sh +SUBDIR= atf-sh tests .include Modified: stable/10/usr.bin/atf/Makefile.inc ============================================================================== --- stable/10/usr.bin/atf/Makefile.inc Sat Dec 28 23:02:48 2013 (r260023) +++ stable/10/usr.bin/atf/Makefile.inc Sat Dec 28 23:08:58 2013 (r260024) @@ -1,6 +1,4 @@ # $FreeBSD$ -ATF= ${.CURDIR}/../../../contrib/atf - BINDIR?= /usr/bin WARNS?= 3 Modified: stable/10/usr.bin/atf/atf-sh/Makefile ============================================================================== --- stable/10/usr.bin/atf/atf-sh/Makefile Sat Dec 28 23:02:48 2013 (r260023) +++ stable/10/usr.bin/atf/atf-sh/Makefile Sat Dec 28 23:08:58 2013 (r260024) @@ -27,6 +27,7 @@ .include +ATF= ${.CURDIR:H:H:H}/contrib/atf .PATH: ${ATF}/atf-sh PROG_CXX= atf-sh @@ -44,4 +45,8 @@ FILESGROUPS= SUBR SUBRDIR= ${SHAREDIR}/atf SUBR= libatf-sh.subr +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include