1#ifndef CK
2#define CK(_x) void _x(int id);
3#define __undo_CK_def
4#endif
5
6CK(register_db_call_marker) /* always has to be first  */
7CK(register_param_used)     /* get_state_hooks have to be registered before smatch_extra */
8CK(register_container_of)
9CK(register_container_of2)
10CK(register_smatch_extra)   /* smatch_extra always has to be SMATCH_EXTRA */
11CK(register_smatch_extra_links)
12CK(register_modification_hooks)
13/*
14 * Implications should probably be after all the modification and smatch_extra
15 * hooks have run.
16 *
17 */
18CK(register_implications)
19CK(register_definition_db_callbacks)
20CK(register_project)
21CK(register_untracked_param)
22CK(register_buf_comparison)
23CK(register_buf_comparison_links)
24CK(register_param_compare_limit)
25CK(register_param_compare_limit_links)
26CK(register_returns_early)
27
28CK(register_param_cleared)  /* param_set relies on param_cleared */
29CK(register_param_set)
30
31CK(register_smatch_ignore)
32CK(register_buf_size)
33CK(register_strlen)
34CK(register_strlen_equiv)
35CK(register_capped)
36CK(register_parse_call_math)
37CK(register_param_filter)
38CK(register_struct_assignment)
39CK(register_comparison)
40CK(register_comparison_links)
41CK(register_comparison_inc_dec)
42CK(register_comparison_inc_dec_links)
43CK(register_function_ptrs)
44CK(register_annotate)
45CK(register_start_states)
46CK(register_type_val)
47CK(register_data_source)
48CK(register_common_functions)
49CK(register_function_info)
50CK(register_type_links)
51CK(register_impossible)
52CK(register_impossible_return)
53CK(register_strings)
54CK(register_integer_overflow)
55CK(register_integer_overflow_links)
56CK(register_real_absolute)
57CK(register_imaginary_absolute)
58CK(register_bits)
59CK(register_fn_arg_link)
60CK(register_parameter_names)
61CK(register_param_limit)
62CK(register_return_to_param)
63CK(register_return_to_param_links)
64CK(register_constraints)
65CK(register_constraints_required)
66CK(register_about_fn_ptr_arg)
67CK(register_mtag)
68CK(register_mtag_map)
69CK(register_mtag_data)
70CK(register_param_to_mtag_data)
71CK(register_array_values)
72CK(register_nul_terminator)
73CK(register_nul_terminator_param_set)
74CK(register_statement_count)
75CK(register_fresh_alloc)
76
77CK(register_kernel_user_data)
78CK(register_kernel_user_data2)
79
80CK(check_debug)
81
82CK(check_bogus_loop)
83
84CK(check_deref)
85CK(check_check_deref)
86CK(check_dereferences_param)
87CK(check_index_overflow)
88CK(check_index_overflow_loop_marker)
89CK(check_testing_index_after_use)
90CK(check_memcpy_overflow)
91CK(check_strcpy_overflow)
92CK(check_sprintf_overflow)
93CK(check_snprintf_overflow)
94CK(check_allocating_enough_data)
95CK(check_leaks)
96CK(check_type)
97CK(check_allocation_funcs)
98CK(check_frees_argument)
99CK(check_deref_check)
100CK(check_signed)
101CK(check_precedence)
102CK(check_unused_ret)
103CK(check_dma_on_stack)
104CK(check_param_mapper)
105CK(check_call_tree)
106CK(check_dev_queue_xmit)
107CK(check_stack)
108CK(check_no_return)
109CK(check_mod_timer)
110CK(check_return)
111CK(check_resource_size)
112CK(check_release_resource)
113CK(check_proc_create)
114CK(check_freeing_null)
115CK(check_frees_param)
116CK(check_free)
117CK(check_frees_param_strict)
118CK(check_free_strict)
119CK(check_no_effect)
120CK(check_kunmap)
121CK(check_snprintf)
122CK(check_macros)
123CK(check_return_efault)
124CK(check_gfp_dma)
125CK(check_unwind)
126CK(check_kmalloc_to_bugon)
127CK(check_platform_device_put)
128CK(check_info_leak)
129CK(check_return_enomem)
130CK(check_get_user_overflow)
131CK(check_get_user_overflow2)
132CK(check_access_ok_math)
133CK(check_container_of)
134CK(check_input_free_device)
135CK(check_select)
136CK(check_memset)
137CK(check_logical_instead_of_bitwise)
138CK(check_kmalloc_wrong_size)
139CK(check_pointer_math)
140CK(check_bit_shift)
141CK(check_macro_side_effects)
142CK(check_sizeof)
143CK(check_return_cast)
144CK(check_or_vs_and)
145CK(check_passes_sizeof)
146CK(check_assign_vs_compare)
147CK(check_missing_break)
148CK(check_array_condition)
149CK(check_struct_type)
150CK(check_64bit_shift)
151CK(check_wrong_size_arg)
152CK(check_cast_assign)
153CK(check_readl_infinite_loops)
154CK(check_double_checking)
155CK(check_shift_to_zero)
156CK(check_indenting)
157CK(check_unreachable)
158CK(check_no_if_block)
159CK(check_buffer_too_small_for_struct)
160CK(check_uninitialized)
161CK(check_signed_integer_overflow_check)
162CK(check_continue_vs_break)
163CK(check_impossible_mask)
164CK(check_syscall_arg_type)
165CK(check_trinity_generator)
166
167/* <- your test goes here */
168/* CK(register_template) */
169
170/* kernel specific */
171CK(check_kernel_printf)
172CK(check_locking)
173CK(check_puts_argument)
174CK(check_err_ptr)
175CK(check_err_ptr_deref)
176CK(check_expects_err_ptr)
177CK(check_held_dev)
178CK(check_return_negative_var)
179CK(check_rosenberg)
180CK(check_rosenberg2)
181CK(check_rosenberg3)
182CK(check_wait_for_common)
183CK(check_bogus_irqrestore)
184CK(check_zero_to_err_ptr)
185CK(check_freeing_devm)
186CK(check_off_by_one_relative)
187CK(check_capable)
188CK(check_ns_capable)
189CK(check_test_bit)
190CK(check_dma_mapping_error)
191CK(check_nospec)
192CK(check_nospec_barrier)
193CK(check_spectre)
194CK(check_spectre_second_half)
195CK(check_implicit_dependencies)
196
197/* wine specific stuff */
198CK(check_wine_filehandles)
199CK(check_wine_WtoA)
200
201CK(check_arm64_tagged)
202
203/* illumos specific */
204CK(check_all_func_returns)
205CK(check_cmn_err)
206
207#include "check_list_local.h"
208
209CK(register_scope)
210CK(register_stored_conditions)
211CK(register_stored_conditions_links)
212CK(register_parsed_conditions)
213CK(register_sval)
214CK(register_buf_size_late)
215CK(register_smatch_extra_late)
216CK(register_assigned_expr) /* This is used by smatch_extra.c so it has to come really late */
217CK(register_assigned_expr_links)
218CK(register_modification_hooks_late)  /* has to come after smatch_extra */
219CK(register_comparison_late) /* has to come after modification_hooks_late */
220CK(register_function_hooks)
221CK(check_kernel)  /* this is overwriting stuff from smatch_extra_late */
222CK(check_wine)
223CK(register_returns)
224
225#ifdef __undo_CK_def
226#undef CK
227#undef __undo_CK_def
228#endif
229