/illumos-gate/usr/src/tools/smatch/src/ |
H A D | check_rosenberg.c | 61 static int check_struct(struct expression *expr, struct symbol *type) in check_struct() 106 static int warn_on_holey_struct(struct expression *expr) in warn_on_holey_struct() 116 static int has_global_scope(struct expression *expr) in has_global_scope() 130 struct expression *ptr; in match_clear() 143 static int was_memset(struct expression *expr) in was_memset() 193 static int check_members_initialized(struct expression *expr) in check_members_initialized() 237 static void check_was_initialized(struct expression *data) in check_was_initialized() 256 static void check_skb_put(struct expression *data) in check_skb_put() 274 struct expression *data; in match_copy_to_user() 295 static struct smatch_state *alloc_expr_state(struct expression *expr) in alloc_expr_state() [all …]
|
H A D | smatch_parse_call_math.c | 119 struct expression *arg; in read_rl_from_var() 268 static int get_arg_number(struct expression *expr) in get_arg_number() 407 static char *format_expr(struct expression *expr) in format_expr() 421 struct expression *tmp; in get_value_in_terms_of_parameter_math() 444 struct expression *tmp, *expr; in get_value_in_terms_of_parameter_math_var_sym() 473 struct expression *right; in match_alloc() 474 struct expression *size_expr; in match_alloc() 491 struct expression *arg; in swap_format() 597 static void match_call_assignment(struct expression *expr) in match_call_assignment() 607 const char *get_allocation_math(struct expression *expr) in get_allocation_math() [all …]
|
H A D | check_deref.c | 59 static void is_ok(struct sm_state *sm, struct expression *mod_expr) in is_ok() 64 static void check_dereference(struct expression *expr) in check_dereference() 141 static void match_dereferences(struct expression *expr) in match_dereferences() 148 static void match_pointer_as_array(struct expression *expr) in match_pointer_as_array() 155 static void set_param_dereferenced(struct expression *call, struct expression *arg, char *key, char… in set_param_dereferenced() 185 static void match_assign(struct expression *expr) in match_assign() 204 static void match_assigns_address(struct expression *expr) in match_assigns_address() 206 struct expression *right; in match_assigns_address() 214 static void match_condition(struct expression *expr) in match_condition() 225 static int called_with_no_fail(struct expression *call, int param) in called_with_no_fail() [all …]
|
H A D | show-parse.c | 540 struct expression *to = case_stmt->case_to; in show_switch_statement() 615 return show_expression(stmt->expression); in show_statement() 718 int val = show_expression(stmt->expression); in show_statement() 736 struct expression *arg, *fn; in show_call_expression() 778 static int show_comma(struct expression *expr) in show_comma() 858 struct expression *target = expr->left; in show_assignment() 873 struct expression *expr = stmt->ret_value; in show_return_stmt() 964 struct expression *expr = sym->initializer; in show_symbol_init() 1066 struct expression *entry; in show_initializer_expr() 1102 struct expression *expr = sym->initializer; in show_symbol_expr_init() [all …]
|
H A D | check_pointer_math.c | 24 static void set_undefined(struct sm_state *sm, struct expression *mod_expr) in set_undefined() 30 static int is_sizeof(struct expression *expr) in is_sizeof() 35 static int is_macro(struct expression *expr, const char *macro_name) in is_macro() 38 struct expression *outside_expr; in is_macro() 51 static int is_size_in_bytes(struct expression *expr) in is_size_in_bytes() 67 static void match_binop(struct expression *expr) in match_binop() 99 static void match_assign(struct expression *expr) in match_assign() 109 static void check_assign(struct expression *expr) in check_assign()
|
H A D | smatch_recurse.c | 22 static int recurse(struct expression *expr, in recurse() 23 int (func)(struct expression *expr, void *p), in recurse() 114 static int has_symbol_helper(struct expression *expr, void *_sym) in has_symbol_helper() 125 int has_symbol(struct expression *expr, struct symbol *sym) in has_symbol() 131 struct expression *expr; 136 static int has_var_helper(struct expression *expr, void *_var) in has_var_helper() 161 int has_variable(struct expression *expr, struct expression *var) in has_variable() 176 static int has_inc_dec_helper(struct expression *expr, void *unused) in has_inc_dec_helper() 187 int has_inc_dec(struct expression *expr) in has_inc_dec()
|
H A D | smatch_param_cleared.c | 38 static void db_param_cleared(struct expression *expr, int param, char *key, char *value) in db_param_cleared() 40 struct expression *arg; in db_param_cleared() 63 static void match_memset(const char *fn, struct expression *expr, void *arg) in match_memset() 68 static void match_memcpy(const char *fn, struct expression *expr, void *arg) in match_memcpy() 73 static void print_return_value_param(int return_id, char *return_ranges, struct expression *expr) in print_return_value_param() 136 static void match_usb_control_msg(const char *fn, struct expression *expr, void *_size_arg) in match_usb_control_msg() 138 struct expression *inout; in match_usb_control_msg() 149 static void match_assign(struct expression *expr) in match_assign() 163 static void match_array_assign(struct expression *expr) in match_array_assign() 165 struct expression *array_expr; in match_array_assign()
|
H A D | check_signed.c | 34 static void match_assign(struct expression *expr) in match_assign() 88 static int cap_gt_zero_and_lt(struct expression *expr) in cap_gt_zero_and_lt() 91 struct expression *var = expr->left; in cap_gt_zero_and_lt() 92 struct expression *tmp; in cap_gt_zero_and_lt() 107 struct expression *right = strip_expr(tmp->right); in cap_gt_zero_and_lt() 136 static int cap_lt_zero_or_gt(struct expression *expr) in cap_lt_zero_or_gt() 139 struct expression *var = expr->left; in cap_lt_zero_or_gt() 140 struct expression *tmp; in cap_lt_zero_or_gt() 155 struct expression *right = strip_expr(tmp->right); in cap_lt_zero_or_gt() 184 static int cap_both_sides(struct expression *expr) in cap_both_sides() [all …]
|
H A D | check_zero_to_err_ptr.c | 24 static int is_comparison_call(struct expression *expr) in is_comparison_call() 34 static int next_line_is_if(struct expression *expr) in next_line_is_if() 36 struct expression *next; in next_line_is_if() 49 static int next_line_checks_IS_ERR(struct expression *call, struct expression *arg) in next_line_checks_IS_ERR() 51 struct expression *next; in next_line_checks_IS_ERR() 52 struct expression *tmp; in next_line_checks_IS_ERR() 122 static void match_err_ptr(const char *fn, struct expression *expr, void *data) in match_err_ptr() 124 struct expression *arg_expr; in match_err_ptr()
|
H A D | check_arm64_tagged.c | 22 static bool expr_has_memory_addr(struct expression *expr); 28 static void match_assign(struct expression *expr) in match_assign() 53 static bool expr_has_untagged_symbol(struct expression *expr) in expr_has_untagged_symbol() 72 static bool expr_has_untagged_member(struct expression *expr) in expr_has_untagged_member() 85 static bool expr_has_macro_with_name(struct expression *expr, const char *macro_name) in expr_has_macro_with_name() 93 static bool expr_has_untagged_macro(struct expression *expr) in expr_has_untagged_macro() 115 static bool expr_has_memory_addr(struct expression *expr) in expr_has_memory_addr() 188 static void match_condition(struct expression *expr) in match_condition() 191 struct expression *val = NULL; in match_condition()
|
H A D | smatch_type_val.c | 66 struct expression *expr; 187 struct expression *expr; in is_ignored_fake_assignment() 217 struct expression *expr; in is_container_of() 233 struct expression *expr; in is_driver_data() 265 struct expression *expr; in is_ignored_macro() 305 struct expression *expr; in is_ignored_function() 348 struct expression *expr; in is_uncasted_pointer_assign() 420 struct expression *expr, *right; in is_uncasted_fn_param_from_db() 521 struct expression *right; in match_assign_pointer() 577 struct expression *expr; in asm_expr() [all …]
|
H A D | check_precedence.c | 23 static int is_bool(struct expression *expr) in is_bool() 35 static int is_bool_from_context(struct expression *expr) in is_bool_from_context() 46 static int is_bool_op(struct expression *expr) in is_bool_op() 59 static void match_condition(struct expression *expr) in match_condition() 103 static void match_binop(struct expression *expr) in match_binop() 111 static void match_mask(struct expression *expr) in match_mask() 123 static void match_mask_compare(struct expression *expr) in match_mask_compare() 133 static void match_subtract_shift(struct expression *expr) in match_subtract_shift()
|
H A D | check_resource_size.c | 23 static int is_probably_ok(struct expression *expr) in is_probably_ok() 35 static void verify_size_expr(struct expression *expr) in verify_size_expr() 48 static void handle_assigned_expr(struct expression *expr) in handle_assigned_expr() 55 expr = (struct expression *)state->data; in handle_assigned_expr() 59 static void match_resource(const char *fn, struct expression *expr, void *_arg_no) in match_resource() 61 struct expression *arg_expr; in match_resource()
|
H A D | smatch_function_hooks.c | 356 struct expression *expr; 367 struct expression *var_expr; 529 struct expression *arg; in handle_ret_equals_param() 549 struct expression *arg; in impossible_limit() 744 struct expression *var_expr; in compare_db_return_states_callbacks() 881 struct expression *expr; in call_ranged_return_hooks() 981 struct expression *right; in db_return_states_assign() 1042 struct expression *right; in match_assign_call() 1211 struct expression *tmp; in is_condition_call() 1238 struct expression *fn; in match_function_call() [all …]
|
H A D | smatch_type.c | 206 return get_type(stmt->expression); in get_expr_stmt_type() 391 int expr_unsigned(struct expression *expr) in expr_unsigned() 403 int expr_signed(struct expression *expr) in expr_signed() 426 int is_pointer(struct expression *expr) in is_pointer() 508 int nr_bits(struct expression *expr) in nr_bits() 518 int is_void_pointer(struct expression *expr) in is_void_pointer() 531 int is_char_pointer(struct expression *expr) in is_char_pointer() 544 int is_string(struct expression *expr) in is_string() 564 int is_static(struct expression *expr) in is_static() 756 struct symbol *get_arg_type_from_key(struct expression *fn, int param, struct expression *arg, cons… in get_arg_type_from_key() [all …]
|
H A D | check_missing_break.c | 28 static struct expression *skip_this; 50 static struct smatch_state *alloc_my_state(struct expression *expr) in alloc_my_state() 66 struct expression *last_print_expr; 67 static void print_missing_break(struct expression *expr) in print_missing_break() 80 static void match_assign(struct expression *expr) in match_assign() 82 struct expression *left; in match_assign() 96 static void match_symbol(struct expression *expr) in match_symbol() 117 struct expression *switch_expr; in merge_hook()
|
H A D | smatch_array_values.c | 41 static int is_file_local(struct expression *array) in is_file_local() 57 static char *get_toplevel_name(struct expression *array) in get_toplevel_name() 77 static char *get_member_array(struct expression *array) in get_member_array() 90 static char *get_array_name(struct expression *array) in get_array_name() 109 int get_array_rl(struct expression *expr, struct range_list **rl) in get_array_rl() 111 struct expression *array; in get_array_rl() 159 static void match_assign(struct expression *expr) in match_assign() 161 struct expression *left, *array; in match_assign() 191 static void mark_strings_unknown(const char *fn, struct expression *expr, void *_arg) in mark_strings_unknown() 193 struct expression *dest; in mark_strings_unknown()
|
H A D | smatch_expression_stacks.c | 21 void push_expression(struct expression_list **estack, struct expression *expr) in push_expression() 26 struct expression *pop_expression(struct expression_list **estack) in pop_expression() 28 struct expression *expr; in pop_expression() 35 struct expression *top_expression(struct expression_list *estack) in top_expression() 37 struct expression *expr; in top_expression()
|
H A D | smatch_data_source.c | 24 static char *get_source_parameter(struct expression *expr) in get_source_parameter() 26 struct expression *tmp; in get_source_parameter() 68 static char *get_source_assignment(struct expression *expr) in get_source_assignment() 70 struct expression *right; in get_source_assignment() 92 static char *get_source_str(struct expression *arg) in get_source_str() 102 static void match_caller_info(struct expression *expr) in match_caller_info() 104 struct expression *arg; in match_caller_info()
|
H A D | check_dereferences_param.c | 34 static void set_ignore(struct sm_state *sm, struct expression *mod_expr) in set_ignore() 55 static void check_deref(struct expression *expr) in check_deref() 57 struct expression *tmp; in check_deref() 77 static void match_dereference(struct expression *expr) in match_dereference() 84 static void set_param_dereferenced(struct expression *call, struct expression *arg, char *key, char… in set_param_dereferenced() 111 static void match_pointer_as_array(struct expression *expr) in match_pointer_as_array()
|
H A D | check_dev_queue_xmit.c | 31 static void ok_to_use(struct sm_state *sm, struct expression *mod_expr) in ok_to_use() 38 struct expression *tmp; in valid_use() 60 static void match_symbol(struct expression *expr) in match_symbol() 75 static void match_kfree_skb(const char *fn, struct expression *expr, void *param) in match_kfree_skb() 77 struct expression *arg; in match_kfree_skb() 85 static void match_xmit(const char *fn, struct expression *expr, void *param) in match_xmit() 87 struct expression *arg; in match_xmit()
|
H A D | smatch_function_ptrs.c | 30 static char *get_from__symbol_get(struct expression *expr) in get_from__symbol_get() 32 struct expression *arg; in get_from__symbol_get() 53 static int xxx_is_array(struct expression *expr) in xxx_is_array() 81 static struct expression *xxx_get_array_base(struct expression *expr) in xxx_get_array_base() 93 static char *get_array_ptr(struct expression *expr) in get_array_ptr() 95 struct expression *array; in get_array_ptr() 155 char *get_returned_ptr(struct expression *expr) in get_returned_ptr() 180 char *get_fnptr_name(struct expression *expr) in get_fnptr_name() 237 struct expression *arg, *tmp; in match_passes_function_pointer() 315 struct expression *right; in match_function_assign() [all …]
|
H A D | smatch_flow.c | 33 struct expression *__inline_fn; 228 struct expression *expr; in __process_post_op_stack() 239 struct expression *right; in handle_comma_assigns() 240 struct expression *assign; in handle_comma_assigns() 259 struct expression *assign; in handle_postop_assigns() 279 struct expression *parent; in prev_expression_is_getting_address() 428 struct expression *right; in __split_expr() 581 struct expression *expr; in is_forever_loop() 746 struct expression *expr; in split_asm_constraints() 1224 struct expression *expr; in split_expr_list() [all …]
|
H A D | check_frees_param.c | 33 static void set_ignore(struct sm_state *sm, struct expression *mod_expr) in set_ignore() 38 static void freed_variable(struct expression *expr) in freed_variable() 52 static void match_free(const char *fn, struct expression *expr, void *param) in match_free() 54 struct expression *arg; in match_free() 62 static void set_param_freed(struct expression *call, struct expression *arg, char *key, char *unuse… in set_param_freed()
|
H A D | smatch_container_of.c | 27 struct expression *param_expr; in get_param_from_container_of() 58 struct expression *param_expr; in get_offset_from_container_of() 119 static struct expression *get_partial_deref(struct expression *expr, int cnt) in get_partial_deref() 154 static char *get_shared_str(struct expression *expr, struct expression *container) in get_shared_str() 156 struct expression *one, *two; in get_shared_str() 192 struct expression *expr) in get_stored_container_name() 218 static char *get_container_name_helper(struct expression *container, struct expression *expr) in get_container_name_helper() 262 char *get_container_name(struct expression *container, struct expression *expr) in get_container_name() 286 static bool is_fn_ptr(struct expression *expr) in is_fn_ptr() 304 static void match_call(struct expression *call) in match_call() [all …]
|