kernel_atomic_dec_test_path: move this into a separate module
[smatch.git] / check_list.h
blob68934d502f5c5aa28832789b570dba31e12f3df3
1 #ifndef CK
2 #define CK(_x) void _x(int id);
3 #define __undo_CK_def
4 #endif
6 CK(register_db_call_marker) /* always has to be first */
7 CK(register_mtag_data) /* before smatch_extra to clear cache at start of function */
8 CK(register_param_used) /* get_state_hooks have to be registered before smatch_extra */
9 CK(register_container_of)
10 CK(register_container_of2)
11 CK(register_smatch_extra)
12 CK(register_smatch_extra_links)
13 CK(register_buf_comparison)
14 CK(register_buf_comparison_links)
15 CK(register_buf_comparison2)
16 CK(register_modification_hooks)
18 * Implications should probably be after all the modification and smatch_extra
19 * hooks have run.
22 CK(register_implications)
23 CK(register_function_hooks_early)
24 CK(register_definition_db_callbacks)
25 CK(register_project) /* has to be early to set up some global stuff */
26 CK(register_untracked_param)
27 CK(register_param_compare_limit)
28 CK(register_param_compare_limit_links)
29 CK(register_returns_early)
31 CK(register_param_cleared) /* param_set relies on param_cleared */
32 CK(register_param_limit) /* param limit has to be before param_set */
33 CK(register_param_set)
35 CK(register_dereferences)
36 CK(register_smatch_ignore)
37 CK(register_buf_size)
38 CK(register_strlen)
39 CK(register_strlen_equiv)
40 CK(register_capped)
41 CK(register_parse_call_math)
42 CK(register_param_filter)
43 CK(register_struct_assignment)
44 CK(register_comparison)
45 CK(register_comparison_links)
46 CK(register_comparison_inc_dec)
47 CK(register_comparison_inc_dec_links)
48 CK(register_function_ptrs)
49 CK(register_annotate)
50 CK(register_start_states)
51 CK(register_type_val)
52 CK(register_data_source)
53 CK(register_common_functions)
54 CK(register_function_info)
55 CK(register_type_links)
56 CK(register_impossible)
57 CK(register_impossible_return)
58 CK(register_strings)
59 CK(register_integer_overflow)
60 CK(register_integer_overflow_links)
61 CK(register_real_absolute)
62 CK(register_imaginary_absolute)
63 CK(register_bits)
64 CK(register_power_of_two)
65 CK(register_fn_arg_link)
66 CK(register_parameter_names)
67 CK(register_return_to_param)
68 CK(register_return_to_param_links)
69 CK(register_constraints)
70 CK(register_constraints_required)
71 CK(register_about_fn_ptr_arg)
72 CK(register_mtag)
73 CK(register_mtag_map)
74 CK(register_param_to_mtag_data)
75 CK(register_array_values)
76 CK(register_nul_terminator)
77 CK(register_nul_terminator_param_set)
78 CK(register_statement_count)
79 CK(register_fresh_alloc)
80 CK(register_ssa)
81 CK(register_unconstant_macros)
82 CK(register_state_assigned)
83 CK(register_points_to_container)
84 CK(register_allocations)
85 CK(register_units)
86 CK(register_goto_tracker)
87 CK(register_refcount)
88 CK(register_refcount_info)
89 CK(register_kernel_atomic_dec_test_path)
91 CK(register_kernel_user_data)
92 CK(register_kernel_user_data2)
93 CK(register_points_to_user_data)
95 CK(register_kernel_host_data)
96 CK(register_points_to_host_data)
97 CK(register_kernel_netdev_priv)
98 CK(register_kernel_err_ptr)
99 CK(register_kernel_has_devm_cleanup)
100 CK(register_kernel_task_state)
101 CK(register_kernel_task_state_info)
103 CK(check_debug)
105 CK(check_bogus_loop)
107 CK(check_deref)
108 CK(check_check_deref)
109 CK(check_dereferences_param)
110 CK(check_index_overflow)
111 CK(check_index_overflow_loop_marker)
112 CK(check_testing_index_after_use)
113 CK(check_memcpy_overflow)
114 CK(check_strcpy_overflow)
115 CK(check_sprintf_overflow)
116 CK(check_snprintf_overflow)
117 CK(check_allocating_enough_data)
118 CK(check_leaks)
119 CK(check_type)
120 CK(check_allocation_funcs)
121 CK(check_frees_argument)
122 CK(check_deref_check)
123 CK(check_signed)
124 CK(check_unsigned_lt_zero)
125 CK(check_precedence)
126 CK(check_unused_ret)
127 CK(check_dma_on_stack)
128 CK(check_param_mapper)
129 CK(check_call_tree)
130 CK(check_dev_queue_xmit)
131 CK(check_stack)
132 CK(check_no_return)
133 CK(check_mod_timer)
134 CK(check_return)
135 CK(check_resource_size)
136 CK(check_release_resource)
137 CK(check_proc_create)
138 CK(check_freeing_null)
139 CK(check_frees_param)
140 CK(check_free)
141 CK(check_frees_param_strict)
142 CK(check_free_strict)
143 CK(check_no_effect)
144 CK(check_kunmap)
145 CK(check_snprintf)
146 CK(check_macros)
147 CK(check_return_efault)
148 CK(check_gfp_dma)
149 CK(check_unwind)
150 CK(check_unwind_info)
151 CK(check_kmalloc_to_bugon)
152 CK(check_platform_device_put)
153 CK(check_info_leak)
154 CK(check_return_enomem)
155 CK(check_get_user_overflow)
156 CK(check_get_user_overflow2)
157 CK(check_access_ok_math)
158 CK(check_container_of)
159 CK(check_input_free_device)
160 CK(check_select)
161 CK(check_memset)
162 CK(check_logical_instead_of_bitwise)
163 CK(check_kmalloc_wrong_size)
164 CK(check_pointer_math)
165 CK(check_bit_shift)
166 CK(check_macro_side_effects)
167 CK(check_sizeof)
168 CK(check_not_passing_gfp)
169 CK(check_return_cast)
170 CK(check_or_vs_and)
171 CK(check_passes_sizeof)
172 CK(check_assign_vs_compare)
173 CK(check_array_condition)
174 CK(check_struct_type)
175 CK(check_64bit_shift)
176 CK(check_wrong_size_arg)
177 CK(check_cast_assign)
178 CK(check_double_checking)
179 CK(check_shift_to_zero)
180 CK(check_indenting)
181 CK(check_unreachable)
182 CK(check_missing_error_code)
183 CK(check_missing_error_code2)
184 CK(check_no_if_block)
185 CK(check_buffer_too_small_for_struct)
186 CK(check_uninitialized)
187 CK(check_signed_integer_overflow_check)
188 CK(check_continue_vs_break)
189 CK(check_impossible_mask)
190 CK(check_postop_timeout)
191 CK(check_atomic_inc_dec)
192 CK(check_atomic_test)
193 CK(check_select_type)
194 CK(check_preempt)
195 CK(check_preempt_info)
196 CK(check_sleep_info)
197 CK(check_scheduling_in_atomic)
198 CK(check_checking_for_null_instead_of_err_ptr)
199 CK(check_syscall_arg_type)
200 CK(register_param_bits_set)
201 CK(register_param_bits_clear)
202 CK(check_do_while_loop_limit)
203 CK(check_ida_alloc)
204 CK(check_divide_condition)
205 CK(check_units)
206 CK(check_impossible_compare)
208 /* <- your test goes here */
209 /* CK(register_template) */
211 /* kernel specific */
212 CK(check_kernel_printf)
213 CK(check_locking)
214 CK(check_puts_argument)
215 CK(check_err_ptr)
216 CK(check_err_ptr_deref)
217 CK(check_expects_err_ptr)
218 CK(check_return_negative_var)
219 CK(check_rosenberg)
220 CK(check_rosenberg2)
221 CK(check_rosenberg3)
222 CK(check_wait_for_common)
223 CK(check_bogus_irqrestore)
224 CK(check_zero_to_err_ptr)
225 CK(check_freeing_devm)
226 CK(check_off_by_one_relative)
227 CK(check_capable)
228 CK(check_ns_capable)
229 CK(check_test_bit)
230 CK(check_nospec)
231 CK(check_nospec_barrier)
232 CK(check_spectre)
233 CK(check_spectre_second_half)
234 CK(check_implicit_dependencies)
235 CK(check_bogus_address_param)
236 CK(check_pm_runtime_get_sync)
237 CK(check_iterator_outside_loop)
238 CK(check_list_add)
239 CK(check_list_add_late)
240 CK(check_sscanf_return)
241 CK(check_kvmalloc_array_zero)
242 CK(check_returns_negative_error_code)
243 CK(check_platform_get_irq_return)
244 CK(check_kvmalloc_NOFS)
245 CK(check_uaf_netdev_priv)
246 //CK(check_host_input)
247 CK(check_direct_return_instead_of_goto)
248 CK(check_negative_error_code_type_promoted)
250 /* wine specific stuff */
251 CK(check_wine_filehandles)
252 CK(check_wine_WtoA)
254 CK(check_arm64_tagged)
256 /* illumos specific */
257 CK(check_all_func_returns)
258 CK(check_cmn_err)
260 #include "check_list_local.h"
262 CK(register_scope)
263 CK(register_stored_conditions)
264 CK(register_stored_conditions_links)
265 CK(register_parsed_conditions)
266 CK(register_sval)
267 CK(register_buf_size_late)
268 CK(register_smatch_extra_late)
269 CK(register_assigned_expr) /* This is used by smatch_extra.c so it has to come really late */
270 CK(register_assigned_expr_links)
271 CK(register_modification_hooks_late) /* has to come after smatch_extra */
272 CK(register_param_key) /* has to come after smatch_extra */
273 CK(register_comparison_late) /* has to come after modification_hooks_late */
274 CK(register_function_hooks)
275 CK(register_definition_db_callbacks_late) /* has to come after register_function_hooks() */
276 CK(check_kernel) /* this is overwriting stuff from smatch_extra_late */
277 CK(check_wine)
278 CK(register_returns)
280 #ifdef __undo_CK_def
281 #undef CK
282 #undef __undo_CK_def
283 #endif