Line data Source code
1 :
2 : struct device;
3 :
4 : void *ldv_dev_get_drvdata(const struct device *dev);
5 : int ldv_dev_set_drvdata(struct device *dev, void *data);
6 :
7 : struct spi_master;
8 : struct device;
9 : struct spi_master *ldv_spi_alloc_master(struct device *host, unsigned size);
10 :
11 : #include <linux/ldv/err.h>
12 :
13 : #include <linux/types.h>
14 : void *ldv_kzalloc(size_t size, gfp_t flags);
15 :
16 : struct clk;
17 :
18 : extern void ldv_clk_disable(struct clk *clk);
19 : extern int ldv_clk_enable(void);
20 :
21 : #include <linux/ldv/common.h>
22 : #include <linux/ldv/irq.h>
23 : #include <verifier/common.h>
24 : #include <verifier/nondet.h>
25 : #include <verifier/memory.h>
26 : #include <verifier/thread.h>
27 :
28 :
29 :
30 : struct ldv_struct_insmod_3 {
31 : int signal_pending;
32 : };
33 :
34 : /* EMG Function declarations */
35 : void ldv_dispatch_default_deregister_1_3_4(void);
36 : void ldv_dispatch_default_deregister_2_3_5(void);
37 : void ldv_dispatch_default_register_1_3_7(void);
38 : void ldv_dispatch_default_register_2_3_6(void);
39 : void ldv_dispatch_insmod_deregister_4_2(void);
40 : void ldv_dispatch_insmod_register_4_3(void);
41 : void ldv_insmod_3(void *);
42 : int ldv_insmod_cubictcp_register_3_11(int (*)(void));
43 : void ldv_insmod_cubictcp_unregister_3_2(void (*)(void));
44 : void ldv_main_4(void *);
45 : void ldv_random_containerless_scenario_1(void *);
46 : void ldv_random_containerless_scenario_2(void *);
47 : void ldv_random_containerless_scenario_callback_1_10(int (*)(char *, struct kernel_param *), char *, struct kernel_param *);
48 : void ldv_random_containerless_scenario_callback_1_4(int (*)(char *, struct kernel_param *), char *, struct kernel_param *);
49 : void ldv_random_containerless_scenario_callback_2_10(void (*)(struct sock *), struct sock *);
50 : void ldv_random_containerless_scenario_callback_2_11(void (*)(struct sock *, u32 , s32 ), struct sock *, unsigned int, int);
51 : void ldv_random_containerless_scenario_callback_2_14(void (*)(struct sock *, u8 ), struct sock *, unsigned char);
52 : void ldv_random_containerless_scenario_callback_2_17(u32 (*)(struct sock *), struct sock *);
53 : void ldv_random_containerless_scenario_callback_2_18(u32 (*)(struct sock *), struct sock *);
54 : void ldv_random_containerless_scenario_callback_2_4(void (*)(struct sock *, u32 , u32 ), struct sock *, unsigned int, unsigned int);
55 : int main(void);
56 :
57 : /* EMG variable declarations */
58 1 : struct ldv_thread ldv_thread_1;
59 1 : struct ldv_thread ldv_thread_2;
60 1 : struct ldv_thread ldv_thread_3;
61 1 : struct ldv_thread ldv_thread_4;
62 :
63 : /* EMG variable initialization */
64 :
65 : /* EMG function definitions */
66 : /* AUX_FUNC ldv_dispatch_default_deregister_1_3_4 */
67 : void ldv_dispatch_default_deregister_1_3_4() {
68 : struct ldv_struct_insmod_3 *cf_arg_1;
69 : /* Skip thread join call */
70 1 : return;
71 : }
72 :
73 : /* AUX_FUNC ldv_dispatch_default_deregister_2_3_5 */
74 : void ldv_dispatch_default_deregister_2_3_5() {
75 : struct ldv_struct_insmod_3 *cf_arg_2;
76 : /* Skip thread join call */
77 1 : return;
78 : }
79 :
80 : /* AUX_FUNC ldv_dispatch_default_register_1_3_7 */
81 : void ldv_dispatch_default_register_1_3_7() {
82 : struct ldv_struct_insmod_3 *cf_arg_1;
83 4 : cf_arg_1 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_3));
84 3 : ldv_random_containerless_scenario_1(cf_arg_1);
85 1 : return;
86 : }
87 :
88 : /* AUX_FUNC ldv_dispatch_default_register_2_3_6 */
89 : void ldv_dispatch_default_register_2_3_6() {
90 : struct ldv_struct_insmod_3 *cf_arg_2;
91 4 : cf_arg_2 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_3));
92 3 : ldv_random_containerless_scenario_2(cf_arg_2);
93 1 : return;
94 : }
95 :
96 : /* AUX_FUNC ldv_dispatch_insmod_deregister_4_2 */
97 : void ldv_dispatch_insmod_deregister_4_2() {
98 : struct ldv_struct_insmod_3 *cf_arg_3;
99 : /* Skip thread join call */
100 1 : return;
101 : }
102 :
103 : /* AUX_FUNC ldv_dispatch_insmod_register_4_3 */
104 : void ldv_dispatch_insmod_register_4_3() {
105 : struct ldv_struct_insmod_3 *cf_arg_3;
106 4 : cf_arg_3 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_3));
107 4 : ldv_insmod_3(cf_arg_3);
108 1 : return;
109 : }
110 :
111 : /* AUX_FUNC ldv_insmod_3 */
112 : void ldv_insmod_3(void *arg0) {
113 : /* LDV {"thread": 3, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'insmod(artificial)'", "function": "ldv_insmod_3"} */
114 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
115 1 : int (*ldv_3_cubictcp_register_default)(void);
116 1 : void (*ldv_3_cubictcp_unregister_default)(void);
117 1 : int ldv_3_ret_default;
118 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
119 : /* LDV {"action": "INSMOD_REGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module initialization."} */
120 2 : ldv_free(arg0);
121 : /* LDV {"action": "INSMOD_REGISTER", "type": "RECEIVE_END"} */
122 :
123 : /* LDV {"action": "CUBICTCP_REGISTER", "type": "CALL_BEGIN", "callback": true, "comment": "Initialize the module after insmod with 'cubictcp_register' function. Invoke callback cubictcp_register from ARTIFICIAL."} */
124 : /* LDV {"type": "CALLBACK", "call": "ldv_3_ret_default = (cubictcp_register)();", "comment": "cubictcp_register"} */
125 2 : ldv_3_ret_default = ldv_insmod_cubictcp_register_3_11(ldv_3_cubictcp_register_default);
126 : /* Callback post-call */
127 2 : ldv_3_ret_default = ldv_post_init(ldv_3_ret_default);
128 : /* LDV {"action": "CUBICTCP_REGISTER", "type": "CALL_END"} */
129 :
130 4 : if (ldv_undef_int()) {
131 : /* LDV {"action": "INIT_FAILED", "type": "CONDITION_BEGIN", "comment": "Failed to initialize the module."} */
132 2 : ldv_assume(ldv_3_ret_default != 0);
133 : /* LDV {"action": "INIT_FAILED", "type": "CONDITION_END"} */
134 :
135 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module exit."} */
136 : /* Skip a non-replicative signal receiving */
137 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_END"} */
138 :
139 : /* Exit function at a terminal state */
140 1 : return;
141 : }
142 : else {
143 : /* LDV {"action": "INIT_SUCCESS", "type": "CONDITION_BEGIN", "comment": "Module has been initialized."} */
144 2 : ldv_assume(ldv_3_ret_default == 0);
145 : /* LDV {"action": "INIT_SUCCESS", "type": "CONDITION_END"} */
146 :
147 4 : if (ldv_undef_int()) {
148 : /* LDV {"action": "DEFAULT_REGISTER_1", "type": "DISPATCH_BEGIN", "comment": "Register 'STRUCT_KERNEL_PARAM' callbacks with unknown registration function."} */
149 2 : ldv_dispatch_default_register_1_3_7();
150 : /* LDV {"action": "DEFAULT_REGISTER_1", "type": "DISPATCH_END"} */
151 :
152 : /* LDV {"action": "DEFAULT_REGISTER_2", "type": "DISPATCH_BEGIN", "comment": "Register 'STRUCT_TCP_CONGESTION_OPS' callbacks with unknown registration function."} */
153 2 : ldv_dispatch_default_register_2_3_6();
154 : /* LDV {"action": "DEFAULT_REGISTER_2", "type": "DISPATCH_END"} */
155 :
156 : /* LDV {"action": "DEFAULT_DEREGISTER_2", "type": "DISPATCH_BEGIN", "comment": "Deregister 'STRUCT_TCP_CONGESTION_OPS' callbacks with unknown deregistration function."} */
157 2 : ldv_dispatch_default_deregister_2_3_5();
158 : /* LDV {"action": "DEFAULT_DEREGISTER_2", "type": "DISPATCH_END"} */
159 :
160 : /* LDV {"action": "DEFAULT_DEREGISTER_1", "type": "DISPATCH_BEGIN", "comment": "Deregister 'STRUCT_KERNEL_PARAM' callbacks with unknown deregistration function."} */
161 2 : ldv_dispatch_default_deregister_1_3_4();
162 : /* LDV {"action": "DEFAULT_DEREGISTER_1", "type": "DISPATCH_END"} */
163 :
164 : }
165 : else {
166 : /* LDV {"action": "NONE", "type": "CONDITION_BEGIN", "comment": "Skip default callbacks registrations and deregistrations."} */
167 : /* LDV {"action": "NONE", "type": "CONDITION_END"} */
168 :
169 : }
170 : /* LDV {"action": "CUBICTCP_UNREGISTER", "type": "CALL_BEGIN", "callback": true, "comment": "Exit the module before its unloading with 'cubictcp_unregister' function. Invoke callback cubictcp_unregister from ARTIFICIAL."} */
171 : /* LDV {"type": "CALLBACK", "call": "(cubictcp_unregister)();", "comment": "cubictcp_unregister"} */
172 4 : ldv_insmod_cubictcp_unregister_3_2(ldv_3_cubictcp_unregister_default);
173 : /* LDV {"action": "CUBICTCP_UNREGISTER", "type": "CALL_END"} */
174 :
175 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module exit."} */
176 : /* Skip a non-replicative signal receiving */
177 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_END"} */
178 :
179 : /* Exit function at a terminal state */
180 1 : return;
181 : }
182 : /* End of the process */
183 : return;
184 : /* LDV {"comment": "End of control function based on process 'insmod(artificial)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_insmod_3"} */
185 : }
186 :
187 : /* AUX_FUNC_CALLBACK ldv_insmod_cubictcp_register_3_11 */
188 : int ldv_insmod_cubictcp_register_3_11(int (*arg0)(void)) {
189 3 : return (cubictcp_register)();
190 1 : }
191 :
192 : /* AUX_FUNC_CALLBACK ldv_insmod_cubictcp_unregister_3_2 */
193 : void ldv_insmod_cubictcp_unregister_3_2(void (*arg0)(void)) {
194 4 : (cubictcp_unregister)();
195 2 : }
196 :
197 : /* AUX_FUNC ldv_main_4 */
198 : void ldv_main_4(void *arg0) {
199 : /* LDV {"thread": 4, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'main(main)'", "function": "ldv_main_4"} */
200 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
201 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
202 : /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Initialize rule models."} */
203 1 : ldv_initialize();
204 : /* LDV {"action": "INIT", "type": "CONDITION_END"} */
205 :
206 : /* LDV {"action": "INSMOD_REGISTER", "type": "DISPATCH_BEGIN", "comment": "Start environment model scenarios."} */
207 2 : ldv_dispatch_insmod_register_4_3();
208 : /* LDV {"action": "INSMOD_REGISTER", "type": "DISPATCH_END"} */
209 :
210 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "Stop environment model scenarios."} */
211 2 : ldv_dispatch_insmod_deregister_4_2();
212 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "DISPATCH_END"} */
213 :
214 : /* LDV {"action": "FINAL", "type": "CONDITION_BEGIN", "comment": "Check rule model state at the exit."} */
215 1 : ldv_check_final_state();
216 1 : ldv_stop();
217 : /* LDV {"action": "FINAL", "type": "CONDITION_END"} */
218 :
219 : /* Exit function at a terminal state */
220 0 : return;
221 : /* End of the process */
222 : return;
223 : /* LDV {"comment": "End of control function based on process 'main(main)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_main_4"} */
224 : }
225 :
226 : /* AUX_FUNC ldv_random_containerless_scenario_1 */
227 : void ldv_random_containerless_scenario_1(void *arg0) {
228 : /* LDV {"thread": 1, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_kernel_param)'", "function": "ldv_random_containerless_scenario_1"} */
229 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
230 1 : int (*ldv_1_callback_get)(char *, struct kernel_param *);
231 1 : int (*ldv_1_callback_set)(char *, struct kernel_param *);
232 1 : struct kernel_param *ldv_1_container_struct_kernel_param;
233 1 : char *ldv_1_ldv_param_10_0_default;
234 1 : char *ldv_1_ldv_param_4_0_default;
235 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
236 1 : /* LDV {"action": "DEFAULT_REGISTER_1", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_KERNEL_PARAM callbacks invocations scenario."} */
237 3 : ldv_free(arg0);
238 1 : /* LDV {"action": "DEFAULT_REGISTER_1", "type": "RECEIVE_END"} */
239 :
240 : /* LDV {"action": "DEFAULT_ALLOC_1", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
241 3 : ldv_1_container_struct_kernel_param = ldv_xmalloc_unknown_size(0);
242 : /* LDV {"action": "DEFAULT_ALLOC_1", "type": "CONDITION_END"} */
243 :
244 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
245 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
246 :
247 : /* Jump to a subprocess 'call' initial state */
248 1 : goto ldv_call_1;
249 : /* End of the process */
250 : return;
251 1 :
252 : /* Sbprocess call */
253 : ldv_call_1:
254 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
255 :
256 4 : if (ldv_undef_int()) {
257 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
258 3 : ldv_1_ldv_param_4_0_default = ldv_xmalloc_unknown_size(0);
259 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
260 :
261 4 : if (ldv_undef_int()) {
262 : /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
263 3 : ldv_1_ldv_param_10_0_default = ldv_xmalloc_unknown_size(0);
264 : /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_END"} */
265 :
266 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback set from kernel_param."} */
267 : /* LDV {"type": "CALLBACK", "call": "((& param_set_int))(ldv_1_ldv_param_10_0_default, ldv_1_container_struct_kernel_param);", "comment": "callback"} */
268 2 : ldv_random_containerless_scenario_callback_1_10(ldv_1_callback_set, ldv_1_ldv_param_10_0_default, ldv_1_container_struct_kernel_param);
269 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
270 :
271 : /* LDV {"action": "POST_CALL_10", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
272 2 : ldv_free(ldv_1_ldv_param_10_0_default);
273 : /* LDV {"action": "POST_CALL_10", "type": "CONDITION_END"} */
274 :
275 : }
276 : else {
277 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback get from kernel_param."} */
278 : /* LDV {"type": "CALLBACK", "call": "((& param_get_int))(ldv_1_ldv_param_4_0_default, ldv_1_container_struct_kernel_param);", "comment": "callback"} */
279 2 : ldv_random_containerless_scenario_callback_1_4(ldv_1_callback_get, ldv_1_ldv_param_4_0_default, ldv_1_container_struct_kernel_param);
280 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
281 :
282 : }
283 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
284 4 : ldv_free(ldv_1_ldv_param_4_0_default);
285 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
286 :
287 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
288 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
289 :
290 : /* Jump to a subprocess 'call' initial state */
291 1 : goto ldv_call_1;
292 : }
293 : else {
294 : /* LDV {"action": "DEFAULT_FREE_1", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
295 2 : ldv_free(ldv_1_container_struct_kernel_param);
296 : /* LDV {"action": "DEFAULT_FREE_1", "type": "CONDITION_END"} */
297 :
298 : /* LDV {"action": "DEFAULT_DEREGISTER_1", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_KERNEL_PARAM callbacks invocations scenario."} */
299 : /* Skip a non-replicative signal receiving */
300 : /* LDV {"action": "DEFAULT_DEREGISTER_1", "type": "RECEIVE_END"} */
301 :
302 : /* Exit function at a terminal state */
303 1 : return;
304 : }
305 : /* End of the subprocess 'call' */
306 : return;
307 : /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_kernel_param)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_1"} */
308 : }
309 :
310 : /* AUX_FUNC ldv_random_containerless_scenario_2 */
311 : void ldv_random_containerless_scenario_2(void *arg0) {
312 : /* LDV {"thread": 2, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_tcp_congestion_ops)'", "function": "ldv_random_containerless_scenario_2"} */
313 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
314 1 : void (*ldv_2_callback_cong_avoid)(struct sock *, u32 , u32 );
315 1 : void (*ldv_2_callback_init)(struct sock *);
316 1 : void (*ldv_2_callback_pkts_acked)(struct sock *, u32 , s32 );
317 1 : void (*ldv_2_callback_set_state)(struct sock *, u8 );
318 1 : u32 (*ldv_2_callback_ssthresh)(struct sock *);
319 1 : u32 (*ldv_2_callback_undo_cwnd)(struct sock *);
320 1 : struct sock *ldv_2_container_struct_sock_ptr;
321 1 : unsigned int ldv_2_ldv_param_11_1_default;
322 1 : int ldv_2_ldv_param_11_2_default;
323 1 : unsigned char ldv_2_ldv_param_14_1_default;
324 1 : unsigned int ldv_2_ldv_param_4_1_default;
325 1 : unsigned int ldv_2_ldv_param_4_2_default;
326 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
327 1 : /* LDV {"action": "DEFAULT_REGISTER_2", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_TCP_CONGESTION_OPS callbacks invocations scenario."} */
328 2 : ldv_free(arg0);
329 : /* LDV {"action": "DEFAULT_REGISTER_2", "type": "RECEIVE_END"} */
330 :
331 : /* LDV {"action": "DEFAULT_ALLOC_2", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
332 3 : ldv_2_container_struct_sock_ptr = ldv_xmalloc_unknown_size(0);
333 : /* LDV {"action": "DEFAULT_ALLOC_2", "type": "CONDITION_END"} */
334 :
335 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
336 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
337 :
338 : /* Jump to a subprocess 'call' initial state */
339 1 : goto ldv_call_2;
340 : /* End of the process */
341 : return;
342 1 :
343 : /* Sbprocess call */
344 : ldv_call_2:
345 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
346 :
347 4 : if (ldv_undef_int()) {
348 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
349 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
350 :
351 2 : switch (ldv_undef_int()) {
352 3 : case 1: {
353 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback undo_cwnd from tcp_congestion_ops."} */
354 : /* LDV {"type": "CALLBACK", "call": "((& bictcp_undo_cwnd))(ldv_2_container_struct_sock_ptr);", "comment": "callback"} */
355 2 : ldv_random_containerless_scenario_callback_2_18(ldv_2_callback_undo_cwnd, ldv_2_container_struct_sock_ptr);
356 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
357 :
358 1 : break;
359 1 : }
360 3 : case 2: {
361 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback ssthresh from tcp_congestion_ops."} */
362 : /* LDV {"type": "CALLBACK", "call": "((& bictcp_recalc_ssthresh))(ldv_2_container_struct_sock_ptr);", "comment": "callback"} */
363 2 : ldv_random_containerless_scenario_callback_2_17(ldv_2_callback_ssthresh, ldv_2_container_struct_sock_ptr);
364 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
365 :
366 1 : break;
367 1 : }
368 3 : case 3: {
369 : /* LDV {"action": "PRE_CALL_14", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
370 : /* LDV {"action": "PRE_CALL_14", "type": "CONDITION_END"} */
371 :
372 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback set_state from tcp_congestion_ops."} */
373 : /* LDV {"type": "CALLBACK", "call": "((& bictcp_state))(ldv_2_container_struct_sock_ptr, ldv_2_ldv_param_14_1_default);", "comment": "callback"} */
374 2 : ldv_random_containerless_scenario_callback_2_14(ldv_2_callback_set_state, ldv_2_container_struct_sock_ptr, ldv_2_ldv_param_14_1_default);
375 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
376 :
377 : /* LDV {"action": "POST_CALL_14", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
378 : /* LDV {"action": "POST_CALL_14", "type": "CONDITION_END"} */
379 :
380 1 : break;
381 1 : }
382 3 : case 4: {
383 : /* LDV {"action": "PRE_CALL_11", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
384 : /* LDV {"action": "PRE_CALL_11", "type": "CONDITION_END"} */
385 :
386 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback pkts_acked from tcp_congestion_ops."} */
387 : /* LDV {"type": "CALLBACK", "call": "((& bictcp_acked))(ldv_2_container_struct_sock_ptr, ldv_2_ldv_param_11_1_default, ldv_2_ldv_param_11_2_default);", "comment": "callback"} */
388 2 : ldv_random_containerless_scenario_callback_2_11(ldv_2_callback_pkts_acked, ldv_2_container_struct_sock_ptr, ldv_2_ldv_param_11_1_default, ldv_2_ldv_param_11_2_default);
389 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
390 :
391 : /* LDV {"action": "POST_CALL_11", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
392 : /* LDV {"action": "POST_CALL_11", "type": "CONDITION_END"} */
393 :
394 1 : break;
395 1 : }
396 3 : case 5: {
397 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback init from tcp_congestion_ops."} */
398 : /* LDV {"type": "CALLBACK", "call": "((& bictcp_init))(ldv_2_container_struct_sock_ptr);", "comment": "callback"} */
399 2 : ldv_random_containerless_scenario_callback_2_10(ldv_2_callback_init, ldv_2_container_struct_sock_ptr);
400 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
401 :
402 1 : break;
403 1 : }
404 3 : case 6: {
405 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback cong_avoid from tcp_congestion_ops."} */
406 : /* LDV {"type": "CALLBACK", "call": "((& bictcp_cong_avoid))(ldv_2_container_struct_sock_ptr, ldv_2_ldv_param_4_1_default, ldv_2_ldv_param_4_2_default);", "comment": "callback"} */
407 2 : ldv_random_containerless_scenario_callback_2_4(ldv_2_callback_cong_avoid, ldv_2_container_struct_sock_ptr, ldv_2_ldv_param_4_1_default, ldv_2_ldv_param_4_2_default);
408 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
409 :
410 1 : break;
411 1 : }
412 2 : default: ldv_stop();
413 1 : }
414 0 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
415 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
416 0 :
417 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
418 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
419 :
420 : /* Jump to a subprocess 'call' initial state */
421 6 : goto ldv_call_2;
422 : }
423 : else {
424 : /* LDV {"action": "DEFAULT_FREE_2", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
425 2 : ldv_free(ldv_2_container_struct_sock_ptr);
426 : /* LDV {"action": "DEFAULT_FREE_2", "type": "CONDITION_END"} */
427 :
428 : /* LDV {"action": "DEFAULT_DEREGISTER_2", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_TCP_CONGESTION_OPS callbacks invocations scenario."} */
429 : /* Skip a non-replicative signal receiving */
430 : /* LDV {"action": "DEFAULT_DEREGISTER_2", "type": "RECEIVE_END"} */
431 :
432 : /* Exit function at a terminal state */
433 1 : return;
434 : }
435 : /* End of the subprocess 'call' */
436 : return;
437 : /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_tcp_congestion_ops)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_2"} */
438 : }
439 :
440 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_1_10 */
441 : void ldv_random_containerless_scenario_callback_1_10(int (*arg0)(char *, struct kernel_param *), char *arg1, struct kernel_param *arg2) {
442 1 : ((& param_set_int))(arg1, arg2);
443 1 : }
444 :
445 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_1_4 */
446 : void ldv_random_containerless_scenario_callback_1_4(int (*arg0)(char *, struct kernel_param *), char *arg1, struct kernel_param *arg2) {
447 1 : ((& param_get_int))(arg1, arg2);
448 1 : }
449 :
450 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_2_10 */
451 : void ldv_random_containerless_scenario_callback_2_10(void (*arg0)(struct sock *), struct sock *arg1) {
452 4 : ((& bictcp_init))(arg1);
453 1 : }
454 :
455 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_2_11 */
456 : void ldv_random_containerless_scenario_callback_2_11(void (*arg0)(struct sock *, u32 , s32 ), struct sock *arg1, unsigned int arg2, int arg3) {
457 3 : ((& bictcp_acked))(arg1, arg2, arg3);
458 1 : }
459 :
460 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_2_14 */
461 : void ldv_random_containerless_scenario_callback_2_14(void (*arg0)(struct sock *, u8 ), struct sock *arg1, unsigned char arg2) {
462 3 : ((& bictcp_state))(arg1, arg2);
463 1 : }
464 :
465 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_2_17 */
466 : void ldv_random_containerless_scenario_callback_2_17(u32 (*arg0)(struct sock *), struct sock *arg1) {
467 2 : ((& bictcp_recalc_ssthresh))(arg1);
468 1 : }
469 :
470 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_2_18 */
471 : void ldv_random_containerless_scenario_callback_2_18(u32 (*arg0)(struct sock *), struct sock *arg1) {
472 2 : ((& bictcp_undo_cwnd))(arg1);
473 1 : }
474 :
475 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_2_4 */
476 : void ldv_random_containerless_scenario_callback_2_4(void (*arg0)(struct sock *, u32 , u32 ), struct sock *arg1, unsigned int arg2, unsigned int arg3) {
477 5 : ((& bictcp_cong_avoid))(arg1, arg2, arg3);
478 1 : }
479 :
480 : /* AUX_FUNC main */
481 : int main() {
482 1 : ldv_main_4(0);
483 0 : return 0;
484 : }
485 :
486 :
487 : /* AUX_FUNC ERR_PTR */
488 : static inline void *ERR_PTR (long int error)
489 : {
490 :
491 : return ldv_err_ptr(error);
492 : }
493 :
494 : /* AUX_FUNC PTR_ERR */
495 : static inline long int PTR_ERR (void const *ptr)
496 : {
497 :
498 : return ldv_ptr_err(ptr);
499 : }
500 :
501 : /* AUX_FUNC IS_ERR */
502 : static inline long int IS_ERR (void const *ptr)
503 : {
504 :
505 : return ldv_is_err(ptr);
506 : }
507 :
508 : /* AUX_FUNC IS_ERR_OR_NULL */
509 : static inline long int IS_ERR_OR_NULL (void const *ptr)
510 : {
511 :
512 : return ldv_is_err_or_null(ptr);
513 : }
514 :
515 : /* AUX_FUNC kzalloc */
516 : static inline void *kzalloc (size_t size, gfp_t flags)
517 : {
518 :
519 : return ldv_kzalloc(size, flags);
520 : }
|