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 : #include <linux/cdev.h>
29 : #include <linux/miscdevice.h>
30 : #include <linux/netdevice.h>
31 : #include <linux/net.h>
32 : #include <linux/seq_file.h>
33 : #include <linux/fs.h>
34 : #include <linux/pagemap.h>
35 : #include <linux/poll.h>
36 :
37 :
38 : struct ldv_struct_insmod_6 {
39 : int signal_pending;
40 : };
41 1 :
42 : struct ldv_struct_random_containerless_scenario_4 {
43 : struct notifier_block *arg0;
44 : int signal_pending;
45 : };
46 :
47 : /* EMG Function declarations */
48 : void ldv_character_driver_scenario_1(void *);
49 : int ldv_character_driver_scenario_probe_1_13(int (*)(struct inode *, struct file *), struct inode *, struct file *);
50 : void ldv_character_driver_scenario_write_1_4(ssize_t (*)(struct file *, char *, size_t , loff_t *), struct file *, char *, long unsigned int, loff_t *);
51 : void ldv_dispatch_default_deregister_1_6_4(void);
52 : void ldv_dispatch_default_deregister_2_6_5(void);
53 : void ldv_dispatch_default_deregister_3_6_6(void);
54 : void ldv_dispatch_default_deregister_7_6_7(void);
55 : void ldv_dispatch_default_register_1_6_11(void);
56 : void ldv_dispatch_default_register_2_6_10(void);
57 : void ldv_dispatch_default_register_3_6_9(void);
58 : void ldv_dispatch_default_register_7_6_8(void);
59 : void ldv_dispatch_deregister_7_1(struct notifier_block *);
60 : void ldv_dispatch_insmod_deregister_9_2(void);
61 : void ldv_dispatch_insmod_register_9_3(void);
62 : void ldv_dispatch_register_8_3(struct notifier_block *);
63 : int ldv_emg_register_netdevice_notifier(struct notifier_block *);
64 : int ldv_emg_unregister_netdevice_notifier(struct notifier_block *);
65 : void ldv_insmod_6(void *);
66 : void ldv_insmod_packet_exit_6_2(void (*)(void));
67 : int ldv_insmod_packet_init_6_15(int (*)(void));
68 : void ldv_main_9(void *);
69 : void ldv_random_containerless_scenario_4(void *);
70 : void ldv_random_containerless_scenario_5(void *);
71 : void ldv_random_containerless_scenario_callback_4_3(int (*)(struct notifier_block *, long unsigned int, void *), struct notifier_block *, long unsigned int, void *);
72 : void ldv_random_containerless_scenario_callback_5_4(void (*)(struct net *), struct net *);
73 : void ldv_random_containerless_scenario_callback_5_8(int (*)(struct net *), struct net *);
74 : void ldv_random_proto_scenario_2(void *);
75 : void ldv_random_proto_scenario_callback_2_10(int (*)(struct socket *, struct sockaddr *, int, int), struct socket *, struct sockaddr *, int, int);
76 : void ldv_random_proto_scenario_callback_2_13(int (*)(struct net *, struct socket *, int, int), struct net *, struct socket *, int, int);
77 : void ldv_random_proto_scenario_callback_2_16(int (*)(struct socket *, struct sockaddr *, int *, int), struct socket *, struct sockaddr *, int *, int);
78 : void ldv_random_proto_scenario_callback_2_19(int (*)(struct socket *, int, int, char *, int *), struct socket *, int, int, char *, int *);
79 : void ldv_random_proto_scenario_callback_2_22(int (*)(struct socket *, unsigned int, long unsigned int), struct socket *, unsigned int, long unsigned int);
80 : void ldv_random_proto_scenario_callback_2_25(int (*)(struct socket *, int), struct socket *, int);
81 : void ldv_random_proto_scenario_callback_2_28(loff_t (*)(struct file *, loff_t , int), struct file *, long long int, int);
82 : void ldv_random_proto_scenario_callback_2_31(int (*)(struct file *, struct socket *, struct vm_area_struct *), struct file *, struct socket *, struct vm_area_struct *);
83 : void ldv_random_proto_scenario_callback_2_32(int (*)(struct inode *, struct file *), struct inode *, struct file *);
84 : void ldv_random_proto_scenario_callback_2_33(unsigned int (*)(struct file *, struct socket *, struct poll_table_struct *), struct file *, struct socket *, struct poll_table_struct *);
85 : void ldv_random_proto_scenario_callback_2_34(int (*)(struct socket *, struct sockaddr *, int), struct socket *, struct sockaddr *, int);
86 : void ldv_random_proto_scenario_callback_2_37(ssize_t (*)(struct file *, char *, size_t , loff_t *), struct file *, char *, long unsigned int, loff_t *);
87 : void ldv_random_proto_scenario_callback_2_4(int (*)(struct socket *, struct socket *, int), struct socket *, struct socket *, int);
88 : void ldv_random_proto_scenario_callback_2_40(int (*)(struct kiocb *, struct socket *, struct msghdr *, size_t , int), struct kiocb *, struct socket *, struct msghdr *, long unsigned int, int);
89 : void ldv_random_proto_scenario_callback_2_43(int (*)(struct socket *), struct socket *);
90 : void ldv_random_proto_scenario_callback_2_44(int (*)(struct kiocb *, struct socket *, struct msghdr *, size_t ), struct kiocb *, struct socket *, struct msghdr *, long unsigned int);
91 : void ldv_random_proto_scenario_callback_2_47(ssize_t (*)(struct socket *, struct page *, int, size_t , int), struct socket *, struct page *, int, long unsigned int, int);
92 : void ldv_random_proto_scenario_callback_2_50(int (*)(struct socket *, int, int, char *, unsigned int), struct socket *, int, int, char *, unsigned int);
93 : void ldv_random_proto_scenario_callback_2_53(int (*)(struct socket *, int), struct socket *, int);
94 : void ldv_random_proto_scenario_callback_2_56(int (*)(struct socket *, struct socket *), struct socket *, struct socket *);
95 : void ldv_traverse_kernel_items_scenario_3(void *);
96 : void *ldv_traverse_kernel_items_scenario_next_3_7(void *(*)(struct seq_file *, void *, loff_t *), struct seq_file *, void *, loff_t *);
97 : void ldv_traverse_kernel_items_scenario_show_3_6(int (*)(struct seq_file *, void *), struct seq_file *, void *);
98 : void *ldv_traverse_kernel_items_scenario_start_3_13(void *(*)(struct seq_file *, loff_t *), struct seq_file *, loff_t *);
99 : void ldv_traverse_kernel_items_scenario_stop_3_2(void (*)(struct seq_file *, void *), struct seq_file *, void *);
100 : int main(void);
101 :
102 : /* EMG variable declarations */
103 1 : struct ldv_thread ldv_thread_1;
104 1 : struct ldv_thread ldv_thread_2;
105 1 : struct ldv_thread ldv_thread_3;
106 1 : struct ldv_thread ldv_thread_4;
107 1 : struct ldv_thread ldv_thread_5;
108 1 : struct ldv_thread ldv_thread_6;
109 1 : struct ldv_thread ldv_thread_9;
110 :
111 : /* EMG variable initialization */
112 :
113 : /* EMG function definitions */
114 : /* AUX_FUNC ldv_character_driver_scenario_1 */
115 : void ldv_character_driver_scenario_1(void *arg0) {
116 : /* LDV {"thread": 1, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'character_driver_scenario(file_operations)'", "function": "ldv_character_driver_scenario_1"} */
117 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
118 1 : struct file_operations *ldv_1_container_file_operations;
119 1 : char *ldv_1_ldv_param_4_1_default;
120 1 : long long int *ldv_1_ldv_param_4_3_default;
121 1 : struct file *ldv_1_resource_file;
122 1 : struct inode *ldv_1_resource_inode;
123 1 : int ldv_1_ret_default;
124 1 : long unsigned int ldv_1_size_cnt_write_size;
125 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
126 1 : /* Initialize automaton variables */
127 2 : ldv_1_ret_default = 1;
128 1 : /* LDV {"action": "DEFAULT_REGISTER_1", "type": "RECEIVE_BEGIN", "comment": "Begin FILE_OPERATIONS callbacks invocations scenario."} */
129 3 : ldv_free(arg0);
130 1 : /* LDV {"action": "DEFAULT_REGISTER_1", "type": "RECEIVE_END"} */
131 1 :
132 1 : /* LDV {"action": "DEFAULT_ALLOC_1", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
133 3 : ldv_1_container_file_operations = ldv_xmalloc_unknown_size(0);
134 : /* LDV {"action": "DEFAULT_ALLOC_1", "type": "CONDITION_END"} */
135 :
136 : /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Allocate memory for file and inode structures."} */
137 3 : ldv_1_resource_file = ldv_xmalloc(sizeof(struct file));
138 3 : ldv_1_resource_inode = ldv_xmalloc(sizeof(struct inode));
139 3 : ldv_1_size_cnt_write_size = ldv_undef_int();
140 : /* LDV {"action": "INIT", "type": "CONDITION_END"} */
141 :
142 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Device appeared in the system."} */
143 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
144 :
145 : /* Jump to a subprocess 'main' initial state */
146 1 : goto ldv_main_1;
147 : /* End of the process */
148 : return;
149 1 :
150 : /* Sbprocess main */
151 : ldv_main_1:
152 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
153 :
154 4 : if (ldv_undef_int()) {
155 : /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Open the device file. Invoke callback open from file_operations."} */
156 : /* LDV {"type": "CALLBACK", "call": "ldv_1_ret_default = ((& packet_seq_open))(ldv_1_resource_inode, ldv_1_resource_file);", "comment": "probe"} */
157 2 : ldv_1_ret_default = ldv_character_driver_scenario_probe_1_13(ldv_1_container_file_operations->open, ldv_1_resource_inode, ldv_1_resource_file);
158 : /* Callback post-call */
159 2 : ldv_1_ret_default = ldv_filter_err_code(ldv_1_ret_default);
160 : /* LDV {"action": "PROBE", "type": "CALL_END"} */
161 :
162 4 : if (ldv_undef_int()) {
163 : /* LDV {"action": "PROBE_SUCCESS", "type": "CONDITION_BEGIN", "comment": "Device file is opened successfully."} */
164 2 : ldv_assume(ldv_1_ret_default == 0);
165 : /* LDV {"action": "PROBE_SUCCESS", "type": "CONDITION_END"} */
166 :
167 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Device file is opened, ready to read and write."} */
168 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
169 :
170 : /* Jump to a subprocess 'call' initial state */
171 1 : goto ldv_call_1;
172 : }
173 : else {
174 : /* LDV {"action": "PROBE_FAIL", "type": "CONDITION_BEGIN", "comment": "Failed to open devices file."} */
175 2 : ldv_assume(ldv_1_ret_default != 0);
176 : /* LDV {"action": "PROBE_FAIL", "type": "CONDITION_END"} */
177 :
178 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Device appeared in the system."} */
179 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
180 :
181 : /* Jump to a subprocess 'main' initial state */
182 1 : goto ldv_main_1;
183 : }
184 : }
185 : else {
186 : /* LDV {"action": "FREE", "type": "CONDITION_BEGIN", "comment": "Free memory of file and inode structures."} */
187 2 : ldv_free(ldv_1_resource_file);
188 2 : ldv_free(ldv_1_resource_inode);
189 : /* LDV {"action": "FREE", "type": "CONDITION_END"} */
190 :
191 : /* LDV {"action": "DEFAULT_FREE_1", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
192 2 : ldv_free(ldv_1_container_file_operations);
193 : /* LDV {"action": "DEFAULT_FREE_1", "type": "CONDITION_END"} */
194 :
195 : /* LDV {"action": "DEFAULT_DEREGISTER_1", "type": "RECEIVE_BEGIN", "comment": "Finish FILE_OPERATIONS callbacks invocations scenario."} */
196 : /* Skip a non-replicative signal receiving */
197 : /* LDV {"action": "DEFAULT_DEREGISTER_1", "type": "RECEIVE_END"} */
198 :
199 : /* Exit function at a terminal state */
200 1 : return;
201 : }
202 : /* End of the subprocess 'main' */
203 : return;
204 1 :
205 : /* Sbprocess call */
206 : ldv_call_1:
207 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
208 :
209 2 : switch (ldv_undef_int()) {
210 3 : case 1: {
211 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
212 3 : ldv_1_ldv_param_4_1_default = ldv_xmalloc_unknown_size(0);
213 3 : ldv_1_ldv_param_4_3_default = ldv_xmalloc_unknown_size(0);
214 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
215 :
216 : /* LDV {"action": "WRITE", "type": "CALL_BEGIN", "callback": true, "comment": "Write data to the device. Invoke callback write from FILE_OPERATIONS."} */
217 : /* Callback pre-call */
218 2 : ldv_assume(ldv_1_size_cnt_write_size <= (INT_MAX & PAGE_CACHE_MASK));
219 3 : if (ldv_1_container_file_operations->write) {
220 : /* LDV {"type": "CALLBACK", "call": "(ldv_1_container_file_operations->write)(ldv_1_resource_file, ldv_1_ldv_param_4_1_default, ldv_1_size_cnt_write_size, ldv_1_ldv_param_4_3_default);", "comment": "write"} */
221 3 : ldv_character_driver_scenario_write_1_4(ldv_1_container_file_operations->write, ldv_1_resource_file, ldv_1_ldv_param_4_1_default, ldv_1_size_cnt_write_size, ldv_1_ldv_param_4_3_default);
222 : }
223 : /* LDV {"action": "WRITE", "type": "CALL_END"} */
224 :
225 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
226 4 : ldv_free(ldv_1_ldv_param_4_1_default);
227 2 : ldv_free(ldv_1_ldv_param_4_3_default);
228 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
229 :
230 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Device file is opened, ready to read and write."} */
231 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
232 :
233 : /* Jump to a subprocess 'call' initial state */
234 1 : goto ldv_call_1;
235 1 : break;
236 : }
237 3 : case 2: {
238 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "comment": "Call callback 'callback' of a process 'character_driver_scenario' of an interface category 'file_operations'"} */
239 : /* Skip callback without implementations */
240 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
241 :
242 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Device file is opened, ready to read and write."} */
243 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
244 :
245 : /* Jump to a subprocess 'call' initial state */
246 1 : goto ldv_call_1;
247 : /* Jump to a subprocess 'call' initial state */
248 : goto ldv_call_1;
249 1 : break;
250 : }
251 3 : case 3: {
252 : /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "comment": "Call callback 'release' of a process 'character_driver_scenario' of an interface category 'file_operations'"} */
253 : /* Skip callback without implementations */
254 : /* LDV {"action": "RELEASE", "type": "CALL_END"} */
255 :
256 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Device appeared in the system."} */
257 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
258 :
259 : /* Jump to a subprocess 'main' initial state */
260 1 : goto ldv_main_1;
261 1 : break;
262 : }
263 2 : default: ldv_stop();
264 1 : }
265 0 : /* End of the subprocess 'call' */
266 0 : return;
267 : /* LDV {"comment": "End of control function based on process 'character_driver_scenario(file_operations)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_character_driver_scenario_1"} */
268 : }
269 :
270 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_probe_1_13 */
271 : int ldv_character_driver_scenario_probe_1_13(int (*arg0)(struct inode *, struct file *), struct inode *arg1, struct file *arg2) {
272 3 : return ((& packet_seq_open))(arg1, arg2);
273 : }
274 1 :
275 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_write_1_4 */
276 : void ldv_character_driver_scenario_write_1_4(ssize_t (*arg0)(struct file *, char *, size_t , loff_t *), struct file *arg1, char *arg2, long unsigned int arg3, long long int *arg4) {
277 1 : (*arg0)(arg1, arg2, arg3, arg4);
278 1 : }
279 :
280 : /* AUX_FUNC ldv_dispatch_default_deregister_1_6_4 */
281 : void ldv_dispatch_default_deregister_1_6_4() {
282 : struct ldv_struct_insmod_6 *cf_arg_1;
283 : /* Skip thread join call */
284 1 : return;
285 : }
286 :
287 : /* AUX_FUNC ldv_dispatch_default_deregister_2_6_5 */
288 : void ldv_dispatch_default_deregister_2_6_5() {
289 : struct ldv_struct_insmod_6 *cf_arg_2;
290 : /* Skip thread join call */
291 1 : return;
292 : }
293 :
294 : /* AUX_FUNC ldv_dispatch_default_deregister_3_6_6 */
295 : void ldv_dispatch_default_deregister_3_6_6() {
296 : struct ldv_struct_insmod_6 *cf_arg_3;
297 : /* Skip thread join call */
298 1 : return;
299 : }
300 :
301 : /* AUX_FUNC ldv_dispatch_default_deregister_7_6_7 */
302 : void ldv_dispatch_default_deregister_7_6_7() {
303 : struct ldv_struct_insmod_6 *cf_arg_5;
304 : /* Skip thread join call */
305 1 : return;
306 : }
307 :
308 : /* AUX_FUNC ldv_dispatch_default_register_1_6_11 */
309 : void ldv_dispatch_default_register_1_6_11() {
310 : struct ldv_struct_insmod_6 *cf_arg_1;
311 4 : cf_arg_1 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_6));
312 3 : ldv_character_driver_scenario_1(cf_arg_1);
313 1 : return;
314 : }
315 :
316 : /* AUX_FUNC ldv_dispatch_default_register_2_6_10 */
317 : void ldv_dispatch_default_register_2_6_10() {
318 : struct ldv_struct_insmod_6 *cf_arg_2;
319 4 : cf_arg_2 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_6));
320 3 : ldv_random_proto_scenario_2(cf_arg_2);
321 1 : return;
322 : }
323 :
324 : /* AUX_FUNC ldv_dispatch_default_register_3_6_9 */
325 : void ldv_dispatch_default_register_3_6_9() {
326 : struct ldv_struct_insmod_6 *cf_arg_3;
327 4 : cf_arg_3 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_6));
328 3 : ldv_traverse_kernel_items_scenario_3(cf_arg_3);
329 1 : return;
330 : }
331 :
332 : /* AUX_FUNC ldv_dispatch_default_register_7_6_8 */
333 : void ldv_dispatch_default_register_7_6_8() {
334 : struct ldv_struct_insmod_6 *cf_arg_5;
335 4 : cf_arg_5 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_6));
336 3 : ldv_random_containerless_scenario_5(cf_arg_5);
337 1 : return;
338 : }
339 :
340 : /* AUX_FUNC ldv_dispatch_deregister_7_1 */
341 : void ldv_dispatch_deregister_7_1(struct notifier_block *arg0) {
342 : struct ldv_struct_random_containerless_scenario_4 *cf_arg_4;
343 : /* Skip thread join call */
344 2 : return;
345 : }
346 :
347 : /* AUX_FUNC ldv_dispatch_insmod_deregister_9_2 */
348 : void ldv_dispatch_insmod_deregister_9_2() {
349 : struct ldv_struct_insmod_6 *cf_arg_6;
350 : /* Skip thread join call */
351 1 : return;
352 : }
353 :
354 : /* AUX_FUNC ldv_dispatch_insmod_register_9_3 */
355 : void ldv_dispatch_insmod_register_9_3() {
356 : struct ldv_struct_insmod_6 *cf_arg_6;
357 4 : cf_arg_6 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_6));
358 4 : ldv_insmod_6(cf_arg_6);
359 1 : return;
360 : }
361 :
362 : /* AUX_FUNC ldv_dispatch_register_8_3 */
363 : void ldv_dispatch_register_8_3(struct notifier_block *arg0) {
364 : struct ldv_struct_random_containerless_scenario_4 *cf_arg_4;
365 4 : cf_arg_4 = ldv_xmalloc(sizeof(struct ldv_struct_random_containerless_scenario_4));
366 2 : cf_arg_4->arg0 = arg0;
367 2 : ldv_random_containerless_scenario_4(cf_arg_4);
368 1 : return;
369 : }
370 :
371 : /* AUX_FUNC ldv_emg_register_netdevice_notifier */
372 : int ldv_emg_register_netdevice_notifier(struct notifier_block *arg0) {
373 : /* LDV {"comment": "Control function 'register_netdevice_notifier'", "type": "CONTROL_FUNCTION_BEGIN", "function": "ldv_emg_register_netdevice_notifier"} */
374 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
375 1 : struct notifier_block *ldv_8_struct_notifier_block_struct_notifier_block;
376 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
377 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
378 :
379 4 : if (ldv_undef_int()) {
380 : /* LDV {"action": "ASSIGN", "type": "CONDITION_BEGIN", "comment": "Get 'struct_notifier_block' callbacks to register."} */
381 1 : ldv_8_struct_notifier_block_struct_notifier_block = arg0;
382 : /* LDV {"action": "ASSIGN", "type": "CONDITION_END"} */
383 :
384 : /* LDV {"action": "REGISTER", "type": "DISPATCH_BEGIN", "comment": "Register STRUCT_NOTIFIER_BLOCK callbacks."} */
385 2 : ldv_dispatch_register_8_3(ldv_8_struct_notifier_block_struct_notifier_block);
386 : /* LDV {"action": "REGISTER", "type": "DISPATCH_END"} */
387 :
388 : /* LDV {"action": "FAIL", "type": "CONDITION_BEGIN", "comment": "Fail registration of 'struct_notifier_block' callbacks."} */
389 3 : return ldv_undef_int_negative();
390 : /* LDV {"action": "FAIL", "type": "CONDITION_END"} */
391 :
392 : /* Exit function at a terminal state */
393 : }
394 : else {
395 : /* LDV {"action": "SUCCESS", "type": "CONDITION_BEGIN", "comment": "Registration of 'struct_notifier_block' callbacks has been successful."} */
396 1 : return 0;
397 : /* LDV {"action": "SUCCESS", "type": "CONDITION_END"} */
398 :
399 : /* Exit function at a terminal state */
400 : }
401 : /* End of the process */
402 : /* LDV {"comment": "End of control function based on process 'register_netdevice_notifier'", "type": "CONTROL_FUNCTION_END", "function": "ldv_emg_register_netdevice_notifier"} */
403 : }
404 :
405 : /* AUX_FUNC ldv_emg_unregister_netdevice_notifier */
406 : int ldv_emg_unregister_netdevice_notifier(struct notifier_block *arg0) {
407 : /* LDV {"comment": "Control function 'unregister_netdevice_notifier'", "type": "CONTROL_FUNCTION_BEGIN", "function": "ldv_emg_unregister_netdevice_notifier"} */
408 2 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
409 : struct notifier_block *ldv_7_struct_notifier_block_struct_notifier_block;
410 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
411 : /* LDV {"action": "ASSIGN", "type": "CONDITION_BEGIN", "comment": "Get 'struct_notifier_block' callbacks to deregister."} */
412 2 : ldv_7_struct_notifier_block_struct_notifier_block = arg0;
413 : /* LDV {"action": "ASSIGN", "type": "CONDITION_END"} */
414 :
415 : /* LDV {"action": "DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "Deregister STRUCT_NOTIFIER_BLOCK callbacks."} */
416 4 : ldv_dispatch_deregister_7_1(ldv_7_struct_notifier_block_struct_notifier_block);
417 2 : /* LDV {"action": "DEREGISTER", "type": "DISPATCH_END"} */
418 :
419 : /* Exit function at a terminal state */
420 : /* End of the process */
421 : /* LDV {"comment": "End of control function based on process 'unregister_netdevice_notifier'", "type": "CONTROL_FUNCTION_END", "function": "ldv_emg_unregister_netdevice_notifier"} */
422 : }
423 :
424 : /* AUX_FUNC ldv_insmod_6 */
425 : void ldv_insmod_6(void *arg0) {
426 : /* LDV {"thread": 6, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'insmod(artificial)'", "function": "ldv_insmod_6"} */
427 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
428 1 : void (*ldv_6_packet_exit_default)(void);
429 1 : int (*ldv_6_packet_init_default)(void);
430 1 : int ldv_6_ret_default;
431 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
432 : /* LDV {"action": "INSMOD_REGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module initialization."} */
433 2 : ldv_free(arg0);
434 : /* LDV {"action": "INSMOD_REGISTER", "type": "RECEIVE_END"} */
435 :
436 : /* LDV {"action": "PACKET_INIT", "type": "CALL_BEGIN", "callback": true, "comment": "Initialize the module after insmod with 'packet_init' function. Invoke callback packet_init from ARTIFICIAL."} */
437 : /* LDV {"type": "CALLBACK", "call": "ldv_6_ret_default = (packet_init)();", "comment": "packet_init"} */
438 2 : ldv_6_ret_default = ldv_insmod_packet_init_6_15(ldv_6_packet_init_default);
439 : /* Callback post-call */
440 2 : ldv_6_ret_default = ldv_post_init(ldv_6_ret_default);
441 : /* LDV {"action": "PACKET_INIT", "type": "CALL_END"} */
442 :
443 4 : if (ldv_undef_int()) {
444 : /* LDV {"action": "INIT_FAILED", "type": "CONDITION_BEGIN", "comment": "Failed to initialize the module."} */
445 2 : ldv_assume(ldv_6_ret_default != 0);
446 : /* LDV {"action": "INIT_FAILED", "type": "CONDITION_END"} */
447 :
448 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module exit."} */
449 : /* Skip a non-replicative signal receiving */
450 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_END"} */
451 :
452 : /* Exit function at a terminal state */
453 1 : return;
454 : }
455 : else {
456 : /* LDV {"action": "INIT_SUCCESS", "type": "CONDITION_BEGIN", "comment": "Module has been initialized."} */
457 2 : ldv_assume(ldv_6_ret_default == 0);
458 : /* LDV {"action": "INIT_SUCCESS", "type": "CONDITION_END"} */
459 :
460 4 : if (ldv_undef_int()) {
461 : /* LDV {"action": "DEFAULT_REGISTER_1", "type": "DISPATCH_BEGIN", "comment": "Register 'FILE_OPERATIONS' callbacks with unknown registration function."} */
462 2 : ldv_dispatch_default_register_1_6_11();
463 : /* LDV {"action": "DEFAULT_REGISTER_1", "type": "DISPATCH_END"} */
464 :
465 : /* LDV {"action": "DEFAULT_REGISTER_2", "type": "DISPATCH_BEGIN", "comment": "Register 'PROTO' callbacks with unknown registration function."} */
466 2 : ldv_dispatch_default_register_2_6_10();
467 : /* LDV {"action": "DEFAULT_REGISTER_2", "type": "DISPATCH_END"} */
468 :
469 : /* LDV {"action": "DEFAULT_REGISTER_3", "type": "DISPATCH_BEGIN", "comment": "Register 'SEQ_OPERATIONS' callbacks with unknown registration function."} */
470 2 : ldv_dispatch_default_register_3_6_9();
471 : /* LDV {"action": "DEFAULT_REGISTER_3", "type": "DISPATCH_END"} */
472 :
473 : /* LDV {"action": "DEFAULT_REGISTER_7", "type": "DISPATCH_BEGIN", "comment": "Register 'STRUCT_PERNET_OPERATIONS' callbacks with unknown registration function."} */
474 2 : ldv_dispatch_default_register_7_6_8();
475 : /* LDV {"action": "DEFAULT_REGISTER_7", "type": "DISPATCH_END"} */
476 :
477 : /* LDV {"action": "DEFAULT_DEREGISTER_7", "type": "DISPATCH_BEGIN", "comment": "Deregister 'STRUCT_PERNET_OPERATIONS' callbacks with unknown deregistration function."} */
478 2 : ldv_dispatch_default_deregister_7_6_7();
479 : /* LDV {"action": "DEFAULT_DEREGISTER_7", "type": "DISPATCH_END"} */
480 :
481 : /* LDV {"action": "DEFAULT_DEREGISTER_3", "type": "DISPATCH_BEGIN", "comment": "Deregister 'SEQ_OPERATIONS' callbacks with unknown deregistration function."} */
482 2 : ldv_dispatch_default_deregister_3_6_6();
483 : /* LDV {"action": "DEFAULT_DEREGISTER_3", "type": "DISPATCH_END"} */
484 :
485 : /* LDV {"action": "DEFAULT_DEREGISTER_2", "type": "DISPATCH_BEGIN", "comment": "Deregister 'PROTO' callbacks with unknown deregistration function."} */
486 2 : ldv_dispatch_default_deregister_2_6_5();
487 : /* LDV {"action": "DEFAULT_DEREGISTER_2", "type": "DISPATCH_END"} */
488 :
489 : /* LDV {"action": "DEFAULT_DEREGISTER_1", "type": "DISPATCH_BEGIN", "comment": "Deregister 'FILE_OPERATIONS' callbacks with unknown deregistration function."} */
490 2 : ldv_dispatch_default_deregister_1_6_4();
491 : /* LDV {"action": "DEFAULT_DEREGISTER_1", "type": "DISPATCH_END"} */
492 :
493 : }
494 : else {
495 : /* LDV {"action": "NONE", "type": "CONDITION_BEGIN", "comment": "Skip default callbacks registrations and deregistrations."} */
496 : /* LDV {"action": "NONE", "type": "CONDITION_END"} */
497 :
498 : }
499 : /* LDV {"action": "PACKET_EXIT", "type": "CALL_BEGIN", "callback": true, "comment": "Exit the module before its unloading with 'packet_exit' function. Invoke callback packet_exit from ARTIFICIAL."} */
500 : /* LDV {"type": "CALLBACK", "call": "(packet_exit)();", "comment": "packet_exit"} */
501 4 : ldv_insmod_packet_exit_6_2(ldv_6_packet_exit_default);
502 : /* LDV {"action": "PACKET_EXIT", "type": "CALL_END"} */
503 :
504 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module exit."} */
505 : /* Skip a non-replicative signal receiving */
506 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_END"} */
507 :
508 : /* Exit function at a terminal state */
509 1 : return;
510 : }
511 : /* End of the process */
512 : return;
513 : /* LDV {"comment": "End of control function based on process 'insmod(artificial)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_insmod_6"} */
514 : }
515 :
516 : /* AUX_FUNC_CALLBACK ldv_insmod_packet_exit_6_2 */
517 : void ldv_insmod_packet_exit_6_2(void (*arg0)(void)) {
518 4 : (packet_exit)();
519 2 : }
520 :
521 : /* AUX_FUNC_CALLBACK ldv_insmod_packet_init_6_15 */
522 : int ldv_insmod_packet_init_6_15(int (*arg0)(void)) {
523 4 : return (packet_init)();
524 1 : }
525 :
526 : /* AUX_FUNC ldv_main_9 */
527 : void ldv_main_9(void *arg0) {
528 : /* LDV {"thread": 9, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'main(main)'", "function": "ldv_main_9"} */
529 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
530 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
531 : /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Initialize rule models."} */
532 1 : ldv_initialize();
533 : /* LDV {"action": "INIT", "type": "CONDITION_END"} */
534 :
535 : /* LDV {"action": "INSMOD_REGISTER", "type": "DISPATCH_BEGIN", "comment": "Start environment model scenarios."} */
536 2 : ldv_dispatch_insmod_register_9_3();
537 : /* LDV {"action": "INSMOD_REGISTER", "type": "DISPATCH_END"} */
538 :
539 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "Stop environment model scenarios."} */
540 2 : ldv_dispatch_insmod_deregister_9_2();
541 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "DISPATCH_END"} */
542 :
543 : /* LDV {"action": "FINAL", "type": "CONDITION_BEGIN", "comment": "Check rule model state at the exit."} */
544 1 : ldv_check_final_state();
545 1 : ldv_stop();
546 : /* LDV {"action": "FINAL", "type": "CONDITION_END"} */
547 :
548 : /* Exit function at a terminal state */
549 0 : return;
550 : /* End of the process */
551 : return;
552 : /* LDV {"comment": "End of control function based on process 'main(main)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_main_9"} */
553 : }
554 :
555 : /* AUX_FUNC ldv_random_containerless_scenario_4 */
556 : void ldv_random_containerless_scenario_4(void *arg0) {
557 : /* LDV {"thread": 4, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_notifier_block)'", "function": "ldv_random_containerless_scenario_4"} */
558 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
559 1 : int (*ldv_4_callback_notifier_call)(struct notifier_block *, long unsigned int, void *);
560 1 : struct notifier_block *ldv_4_container_struct_notifier_block;
561 1 : long unsigned int ldv_4_ldv_param_3_1_default;
562 1 : void *ldv_4_ldv_param_3_2_default;
563 1 : /* Received labels */
564 1 : struct ldv_struct_random_containerless_scenario_4 *data = (struct ldv_struct_random_containerless_scenario_4*) arg0;
565 :
566 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
567 : /* LDV {"action": "REGISTER", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_NOTIFIER_BLOCK callbacks invocations scenario."} */
568 : /* Assign recieved labels */
569 2 : if (data) {
570 1 : ldv_4_container_struct_notifier_block = data->arg0;
571 2 : ldv_free(data);
572 : }
573 : /* LDV {"action": "REGISTER", "type": "RECEIVE_END"} */
574 :
575 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
576 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
577 :
578 : /* Jump to a subprocess 'call' initial state */
579 2 : goto ldv_call_4;
580 : /* End of the process */
581 : return;
582 1 :
583 : /* Sbprocess call */
584 : ldv_call_4:
585 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
586 :
587 4 : if (ldv_undef_int()) {
588 : /* LDV {"action": "PRE_CALL_3", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
589 2 : ldv_4_ldv_param_3_2_default = ldv_xmalloc_unknown_size(0);
590 : /* LDV {"action": "PRE_CALL_3", "type": "CONDITION_END"} */
591 :
592 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback notifier_call from notifier_block."} */
593 : /* LDV {"type": "CALLBACK", "call": "((& packet_notifier))(ldv_4_container_struct_notifier_block, ldv_4_ldv_param_3_1_default, ldv_4_ldv_param_3_2_default);", "comment": "callback"} */
594 2 : ldv_random_containerless_scenario_callback_4_3(ldv_4_callback_notifier_call, ldv_4_container_struct_notifier_block, ldv_4_ldv_param_3_1_default, ldv_4_ldv_param_3_2_default);
595 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
596 :
597 : /* LDV {"action": "POST_CALL_3", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
598 2 : ldv_free(ldv_4_ldv_param_3_2_default);
599 : /* LDV {"action": "POST_CALL_3", "type": "CONDITION_END"} */
600 :
601 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
602 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
603 :
604 : /* Jump to a subprocess 'call' initial state */
605 1 : goto ldv_call_4;
606 : }
607 : else {
608 : /* LDV {"action": "DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_NOTIFIER_BLOCK callbacks invocations scenario."} */
609 : /* Skip a non-replicative signal receiving */
610 : /* LDV {"action": "DEREGISTER", "type": "RECEIVE_END"} */
611 :
612 : /* Exit function at a terminal state */
613 1 : return;
614 : }
615 : /* End of the subprocess 'call' */
616 : return;
617 : /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_notifier_block)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_4"} */
618 : }
619 :
620 : /* AUX_FUNC ldv_random_containerless_scenario_5 */
621 : void ldv_random_containerless_scenario_5(void *arg0) {
622 : /* LDV {"thread": 5, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_pernet_operations)'", "function": "ldv_random_containerless_scenario_5"} */
623 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
624 1 : void (*ldv_5_callback_exit)(struct net *);
625 1 : int (*ldv_5_callback_init)(struct net *);
626 1 : struct net *ldv_5_container_struct_net_ptr;
627 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
628 : /* LDV {"action": "DEFAULT_REGISTER_7", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_PERNET_OPERATIONS callbacks invocations scenario."} */
629 2 : ldv_free(arg0);
630 : /* LDV {"action": "DEFAULT_REGISTER_7", "type": "RECEIVE_END"} */
631 :
632 : /* LDV {"action": "DEFAULT_ALLOC_7", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
633 3 : ldv_5_container_struct_net_ptr = ldv_xmalloc_unknown_size(0);
634 : /* LDV {"action": "DEFAULT_ALLOC_7", "type": "CONDITION_END"} */
635 :
636 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
637 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
638 :
639 : /* Jump to a subprocess 'call' initial state */
640 1 : goto ldv_call_5;
641 : /* End of the process */
642 : return;
643 1 :
644 : /* Sbprocess call */
645 : ldv_call_5:
646 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
647 :
648 2 : switch (ldv_undef_int()) {
649 3 : case 1: {
650 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback init from pernet_operations."} */
651 : /* LDV {"type": "CALLBACK", "call": "((& packet_net_init))(ldv_5_container_struct_net_ptr);", "comment": "callback"} */
652 2 : ldv_random_containerless_scenario_callback_5_8(ldv_5_callback_init, ldv_5_container_struct_net_ptr);
653 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
654 :
655 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
656 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
657 :
658 : /* Jump to a subprocess 'call' initial state */
659 1 : goto ldv_call_5;
660 1 : break;
661 : }
662 3 : case 2: {
663 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback exit from pernet_operations."} */
664 : /* LDV {"type": "CALLBACK", "call": "((& packet_net_exit))(ldv_5_container_struct_net_ptr);", "comment": "callback"} */
665 2 : ldv_random_containerless_scenario_callback_5_4(ldv_5_callback_exit, ldv_5_container_struct_net_ptr);
666 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
667 :
668 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
669 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
670 :
671 : /* Jump to a subprocess 'call' initial state */
672 1 : goto ldv_call_5;
673 : /* Jump to a subprocess 'call' initial state */
674 : goto ldv_call_5;
675 1 : break;
676 : }
677 3 : case 3: {
678 : /* LDV {"action": "DEFAULT_FREE_7", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
679 2 : ldv_free(ldv_5_container_struct_net_ptr);
680 : /* LDV {"action": "DEFAULT_FREE_7", "type": "CONDITION_END"} */
681 :
682 : /* LDV {"action": "DEFAULT_DEREGISTER_7", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_PERNET_OPERATIONS callbacks invocations scenario."} */
683 : /* Skip a non-replicative signal receiving */
684 : /* LDV {"action": "DEFAULT_DEREGISTER_7", "type": "RECEIVE_END"} */
685 :
686 : /* Exit function at a terminal state */
687 1 : return;
688 1 : break;
689 : }
690 2 : default: ldv_stop();
691 1 : }
692 0 : /* End of the subprocess 'call' */
693 0 : return;
694 : /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_pernet_operations)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_5"} */
695 : }
696 :
697 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_4_3 */
698 : void ldv_random_containerless_scenario_callback_4_3(int (*arg0)(struct notifier_block *, long unsigned int, void *), struct notifier_block *arg1, long unsigned int arg2, void *arg3) {
699 2 : ((& packet_notifier))(arg1, arg2, arg3);
700 1 : }
701 :
702 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_5_4 */
703 : void ldv_random_containerless_scenario_callback_5_4(void (*arg0)(struct net *), struct net *arg1) {
704 2 : ((& packet_net_exit))(arg1);
705 1 : }
706 :
707 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_5_8 */
708 : void ldv_random_containerless_scenario_callback_5_8(int (*arg0)(struct net *), struct net *arg1) {
709 2 : ((& packet_net_init))(arg1);
710 1 : }
711 :
712 : /* AUX_FUNC ldv_random_proto_scenario_2 */
713 : void ldv_random_proto_scenario_2(void *arg0) {
714 : /* LDV {"thread": 2, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_proto_scenario(proto)'", "function": "ldv_random_proto_scenario_2"} */
715 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
716 1 : int (*ldv_2_callback_accept)(struct socket *, struct socket *, int);
717 1 : int (*ldv_2_callback_connect)(struct socket *, struct sockaddr *, int, int);
718 1 : int (*ldv_2_callback_create)(struct net *, struct socket *, int, int);
719 1 : int (*ldv_2_callback_getname)(struct socket *, struct sockaddr *, int *, int);
720 1 : int (*ldv_2_callback_getsockopt)(struct socket *, int, int, char *, int *);
721 1 : int (*ldv_2_callback_ioctl)(struct socket *, unsigned int, long unsigned int);
722 1 : int (*ldv_2_callback_listen)(struct socket *, int);
723 1 : loff_t (*ldv_2_callback_llseek)(struct file *, loff_t , int);
724 1 : int (*ldv_2_callback_mmap)(struct file *, struct socket *, struct vm_area_struct *);
725 1 : int (*ldv_2_callback_open)(struct inode *, struct file *);
726 1 : unsigned int (*ldv_2_callback_poll)(struct file *, struct socket *, struct poll_table_struct *);
727 1 : int (*ldv_2_callback_probe)(struct socket *, struct sockaddr *, int);
728 1 : ssize_t (*ldv_2_callback_read)(struct file *, char *, size_t , loff_t *);
729 : int (*ldv_2_callback_recvmsg)(struct kiocb *, struct socket *, struct msghdr *, size_t , int);
730 1 : int (*ldv_2_callback_release)(struct socket *);
731 1 : int (*ldv_2_callback_sendmsg)(struct kiocb *, struct socket *, struct msghdr *, size_t );
732 : ssize_t (*ldv_2_callback_sendpage)(struct socket *, struct page *, int, size_t , int);
733 1 : int (*ldv_2_callback_setsockopt)(struct socket *, int, int, char *, unsigned int);
734 : int (*ldv_2_callback_shutdown)(struct socket *, int);
735 1 : int (*ldv_2_callback_socketpair)(struct socket *, struct socket *);
736 1 : struct socket *ldv_2_container_socket;
737 1 : struct file *ldv_2_container_struct_file_ptr;
738 1 : struct inode *ldv_2_container_struct_inode_ptr;
739 1 : struct kiocb *ldv_2_container_struct_kiocb_ptr;
740 1 : struct msghdr *ldv_2_container_struct_msghdr_ptr;
741 1 : struct net *ldv_2_container_struct_net_ptr;
742 1 : struct page *ldv_2_container_struct_page_ptr;
743 1 : struct poll_table_struct *ldv_2_container_struct_poll_table_struct_ptr;
744 1 : struct sockaddr *ldv_2_container_struct_sockaddr_ptr;
745 1 : struct vm_area_struct *ldv_2_container_struct_vm_area_struct_ptr;
746 1 : int ldv_2_ldv_param_10_2_default;
747 1 : int ldv_2_ldv_param_10_3_default;
748 1 : int ldv_2_ldv_param_13_2_default;
749 1 : int ldv_2_ldv_param_13_3_default;
750 1 : int *ldv_2_ldv_param_16_2_default;
751 1 : int ldv_2_ldv_param_16_3_default;
752 1 : int ldv_2_ldv_param_19_1_default;
753 1 : int ldv_2_ldv_param_19_2_default;
754 1 : char *ldv_2_ldv_param_19_3_default;
755 1 : int *ldv_2_ldv_param_19_4_default;
756 1 : unsigned int ldv_2_ldv_param_22_1_default;
757 1 : long unsigned int ldv_2_ldv_param_22_2_default;
758 1 : int ldv_2_ldv_param_25_1_default;
759 1 : long long int ldv_2_ldv_param_28_1_default;
760 1 : int ldv_2_ldv_param_28_2_default;
761 1 : int ldv_2_ldv_param_34_2_default;
762 1 : char *ldv_2_ldv_param_37_1_default;
763 1 : long unsigned int ldv_2_ldv_param_37_2_default;
764 1 : long long int *ldv_2_ldv_param_37_3_default;
765 1 : long unsigned int ldv_2_ldv_param_40_3_default;
766 1 : int ldv_2_ldv_param_40_4_default;
767 1 : long unsigned int ldv_2_ldv_param_44_3_default;
768 1 : int ldv_2_ldv_param_47_2_default;
769 1 : long unsigned int ldv_2_ldv_param_47_3_default;
770 1 : int ldv_2_ldv_param_47_4_default;
771 1 : struct socket *ldv_2_ldv_param_4_1_default;
772 1 : int ldv_2_ldv_param_4_2_default;
773 1 : int ldv_2_ldv_param_50_1_default;
774 1 : int ldv_2_ldv_param_50_2_default;
775 1 : char *ldv_2_ldv_param_50_3_default;
776 1 : unsigned int ldv_2_ldv_param_50_4_default;
777 1 : int ldv_2_ldv_param_53_1_default;
778 1 : struct socket *ldv_2_ldv_param_56_1_default;
779 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
780 1 : /* LDV {"action": "DEFAULT_REGISTER_2", "type": "RECEIVE_BEGIN", "comment": "Begin PROTO callbacks invocations scenario."} */
781 3 : ldv_free(arg0);
782 1 : /* LDV {"action": "DEFAULT_REGISTER_2", "type": "RECEIVE_END"} */
783 1 :
784 1 : /* LDV {"action": "DEFAULT_ALLOC_2", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
785 4 : ldv_2_container_socket = ldv_xmalloc_unknown_size(0);
786 4 : ldv_2_container_struct_file_ptr = ldv_xmalloc_unknown_size(0);
787 4 : ldv_2_container_struct_inode_ptr = ldv_xmalloc_unknown_size(0);
788 4 : ldv_2_container_struct_kiocb_ptr = ldv_xmalloc_unknown_size(0);
789 4 : ldv_2_container_struct_msghdr_ptr = ldv_xmalloc_unknown_size(0);
790 4 : ldv_2_container_struct_net_ptr = ldv_xmalloc_unknown_size(0);
791 4 : ldv_2_container_struct_page_ptr = ldv_xmalloc_unknown_size(0);
792 4 : ldv_2_container_struct_poll_table_struct_ptr = ldv_xmalloc_unknown_size(0);
793 4 : ldv_2_container_struct_sockaddr_ptr = ldv_xmalloc_unknown_size(0);
794 4 : ldv_2_container_struct_vm_area_struct_ptr = ldv_xmalloc_unknown_size(0);
795 1 : /* LDV {"action": "DEFAULT_ALLOC_2", "type": "CONDITION_END"} */
796 1 :
797 1 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
798 1 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
799 1 :
800 1 : /* Jump to a subprocess 'call' initial state */
801 1 : goto ldv_call_2;
802 : /* End of the process */
803 : return;
804 1 :
805 : /* Sbprocess call */
806 : ldv_call_2:
807 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
808 :
809 4 : if (ldv_undef_int()) {
810 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
811 3 : ldv_2_ldv_param_4_1_default = ldv_xmalloc_unknown_size(0);
812 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
813 :
814 2 : switch (ldv_undef_int()) {
815 3 : case 1: {
816 : /* LDV {"action": "PRE_CALL_56", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
817 3 : ldv_2_ldv_param_56_1_default = ldv_xmalloc_unknown_size(0);
818 : /* LDV {"action": "PRE_CALL_56", "type": "CONDITION_END"} */
819 :
820 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback socketpair from proto_ops."} */
821 : /* LDV {"type": "CALLBACK", "call": "((& sock_no_socketpair))(ldv_2_container_socket, ldv_2_ldv_param_56_1_default);", "comment": "callback"} */
822 2 : ldv_random_proto_scenario_callback_2_56(ldv_2_callback_socketpair, ldv_2_container_socket, ldv_2_ldv_param_56_1_default);
823 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
824 :
825 : /* LDV {"action": "POST_CALL_56", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
826 2 : ldv_free(ldv_2_ldv_param_56_1_default);
827 : /* LDV {"action": "POST_CALL_56", "type": "CONDITION_END"} */
828 :
829 1 : break;
830 1 : }
831 3 : case 2: {
832 : /* LDV {"action": "PRE_CALL_53", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
833 : /* LDV {"action": "PRE_CALL_53", "type": "CONDITION_END"} */
834 :
835 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback shutdown from proto_ops."} */
836 : /* LDV {"type": "CALLBACK", "call": "((& sock_no_shutdown))(ldv_2_container_socket, ldv_2_ldv_param_53_1_default);", "comment": "callback"} */
837 2 : ldv_random_proto_scenario_callback_2_53(ldv_2_callback_shutdown, ldv_2_container_socket, ldv_2_ldv_param_53_1_default);
838 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
839 :
840 : /* LDV {"action": "POST_CALL_53", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
841 : /* LDV {"action": "POST_CALL_53", "type": "CONDITION_END"} */
842 :
843 1 : break;
844 1 : }
845 3 : case 3: {
846 : /* LDV {"action": "PRE_CALL_50", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
847 3 : ldv_2_ldv_param_50_3_default = ldv_xmalloc_unknown_size(0);
848 : /* LDV {"action": "PRE_CALL_50", "type": "CONDITION_END"} */
849 :
850 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback setsockopt from proto_ops."} */
851 : /* LDV {"type": "CALLBACK", "call": "((& sock_no_setsockopt))(ldv_2_container_socket, ldv_2_ldv_param_50_1_default, ldv_2_ldv_param_50_2_default, ldv_2_ldv_param_50_3_default, ldv_2_ldv_param_50_4_default);", "comment": "callback"} */
852 2 : ldv_random_proto_scenario_callback_2_50(ldv_2_callback_setsockopt, ldv_2_container_socket, ldv_2_ldv_param_50_1_default, ldv_2_ldv_param_50_2_default, ldv_2_ldv_param_50_3_default, ldv_2_ldv_param_50_4_default);
853 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
854 :
855 : /* LDV {"action": "POST_CALL_50", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
856 2 : ldv_free(ldv_2_ldv_param_50_3_default);
857 : /* LDV {"action": "POST_CALL_50", "type": "CONDITION_END"} */
858 :
859 1 : break;
860 1 : }
861 3 : case 4: {
862 : /* LDV {"action": "PRE_CALL_47", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
863 : /* LDV {"action": "PRE_CALL_47", "type": "CONDITION_END"} */
864 :
865 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback sendpage from proto_ops."} */
866 : /* LDV {"type": "CALLBACK", "call": "((& sock_no_sendpage))(ldv_2_container_socket, ldv_2_container_struct_page_ptr, ldv_2_ldv_param_47_2_default, ldv_2_ldv_param_47_3_default, ldv_2_ldv_param_47_4_default);", "comment": "callback"} */
867 2 : ldv_random_proto_scenario_callback_2_47(ldv_2_callback_sendpage, ldv_2_container_socket, ldv_2_container_struct_page_ptr, ldv_2_ldv_param_47_2_default, ldv_2_ldv_param_47_3_default, ldv_2_ldv_param_47_4_default);
868 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
869 :
870 : /* LDV {"action": "POST_CALL_47", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
871 : /* LDV {"action": "POST_CALL_47", "type": "CONDITION_END"} */
872 :
873 1 : break;
874 1 : }
875 3 : case 5: {
876 : /* LDV {"action": "PRE_CALL_44", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
877 : /* LDV {"action": "PRE_CALL_44", "type": "CONDITION_END"} */
878 :
879 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback sendmsg from proto_ops."} */
880 : /* LDV {"type": "CALLBACK", "call": "((& packet_sendmsg_spkt))(ldv_2_container_struct_kiocb_ptr, ldv_2_container_socket, ldv_2_container_struct_msghdr_ptr, ldv_2_ldv_param_44_3_default);", "comment": "callback"} */
881 2 : ldv_random_proto_scenario_callback_2_44(ldv_2_callback_sendmsg, ldv_2_container_struct_kiocb_ptr, ldv_2_container_socket, ldv_2_container_struct_msghdr_ptr, ldv_2_ldv_param_44_3_default);
882 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
883 :
884 : /* LDV {"action": "POST_CALL_44", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
885 : /* LDV {"action": "POST_CALL_44", "type": "CONDITION_END"} */
886 :
887 1 : break;
888 1 : }
889 3 : case 6: {
890 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback release from proto_ops."} */
891 : /* LDV {"type": "CALLBACK", "call": "((& packet_release))(ldv_2_container_socket);", "comment": "callback"} */
892 2 : ldv_random_proto_scenario_callback_2_43(ldv_2_callback_release, ldv_2_container_socket);
893 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
894 :
895 1 : break;
896 1 : }
897 3 : case 7: {
898 : /* LDV {"action": "PRE_CALL_40", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
899 : /* LDV {"action": "PRE_CALL_40", "type": "CONDITION_END"} */
900 :
901 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback recvmsg from proto_ops."} */
902 : /* LDV {"type": "CALLBACK", "call": "((& packet_recvmsg))(ldv_2_container_struct_kiocb_ptr, ldv_2_container_socket, ldv_2_container_struct_msghdr_ptr, ldv_2_ldv_param_40_3_default, ldv_2_ldv_param_40_4_default);", "comment": "callback"} */
903 2 : ldv_random_proto_scenario_callback_2_40(ldv_2_callback_recvmsg, ldv_2_container_struct_kiocb_ptr, ldv_2_container_socket, ldv_2_container_struct_msghdr_ptr, ldv_2_ldv_param_40_3_default, ldv_2_ldv_param_40_4_default);
904 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
905 :
906 : /* LDV {"action": "POST_CALL_40", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
907 : /* LDV {"action": "POST_CALL_40", "type": "CONDITION_END"} */
908 :
909 1 : break;
910 1 : }
911 3 : case 8: {
912 : /* LDV {"action": "PRE_CALL_37", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
913 3 : ldv_2_ldv_param_37_1_default = ldv_xmalloc_unknown_size(0);
914 3 : ldv_2_ldv_param_37_3_default = ldv_xmalloc_unknown_size(0);
915 : /* LDV {"action": "PRE_CALL_37", "type": "CONDITION_END"} */
916 :
917 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback read from file_operations."} */
918 : /* LDV {"type": "CALLBACK", "call": "((& seq_read))(ldv_2_container_struct_file_ptr, ldv_2_ldv_param_37_1_default, ldv_2_ldv_param_37_2_default, ldv_2_ldv_param_37_3_default);", "comment": "callback"} */
919 2 : ldv_random_proto_scenario_callback_2_37(ldv_2_callback_read, ldv_2_container_struct_file_ptr, ldv_2_ldv_param_37_1_default, ldv_2_ldv_param_37_2_default, ldv_2_ldv_param_37_3_default);
920 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
921 :
922 : /* LDV {"action": "POST_CALL_37", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
923 2 : ldv_free(ldv_2_ldv_param_37_1_default);
924 2 : ldv_free(ldv_2_ldv_param_37_3_default);
925 : /* LDV {"action": "POST_CALL_37", "type": "CONDITION_END"} */
926 :
927 1 : break;
928 1 : }
929 3 : case 9: {
930 : /* LDV {"action": "PRE_CALL_34", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
931 : /* LDV {"action": "PRE_CALL_34", "type": "CONDITION_END"} */
932 :
933 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback bind from proto_ops."} */
934 : /* LDV {"type": "CALLBACK", "call": "((& packet_bind_spkt))(ldv_2_container_socket, ldv_2_container_struct_sockaddr_ptr, ldv_2_ldv_param_34_2_default);", "comment": "callback"} */
935 2 : ldv_random_proto_scenario_callback_2_34(ldv_2_callback_probe, ldv_2_container_socket, ldv_2_container_struct_sockaddr_ptr, ldv_2_ldv_param_34_2_default);
936 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
937 :
938 : /* LDV {"action": "POST_CALL_34", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
939 : /* LDV {"action": "POST_CALL_34", "type": "CONDITION_END"} */
940 :
941 1 : break;
942 1 : }
943 3 : case 10: {
944 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback poll from proto_ops."} */
945 : /* LDV {"type": "CALLBACK", "call": "((& datagram_poll))(ldv_2_container_struct_file_ptr, ldv_2_container_socket, ldv_2_container_struct_poll_table_struct_ptr);", "comment": "callback"} */
946 2 : ldv_random_proto_scenario_callback_2_33(ldv_2_callback_poll, ldv_2_container_struct_file_ptr, ldv_2_container_socket, ldv_2_container_struct_poll_table_struct_ptr);
947 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
948 :
949 1 : break;
950 1 : }
951 3 : case 11: {
952 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback open from file_operations."} */
953 : /* LDV {"type": "CALLBACK", "call": "((& packet_seq_open))(ldv_2_container_struct_inode_ptr, ldv_2_container_struct_file_ptr);", "comment": "callback"} */
954 2 : ldv_random_proto_scenario_callback_2_32(ldv_2_callback_open, ldv_2_container_struct_inode_ptr, ldv_2_container_struct_file_ptr);
955 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
956 :
957 1 : break;
958 1 : }
959 3 : case 12: {
960 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback mmap from proto_ops."} */
961 : /* LDV {"type": "CALLBACK", "call": "((& sock_no_mmap))(ldv_2_container_struct_file_ptr, ldv_2_container_socket, ldv_2_container_struct_vm_area_struct_ptr);", "comment": "callback"} */
962 2 : ldv_random_proto_scenario_callback_2_31(ldv_2_callback_mmap, ldv_2_container_struct_file_ptr, ldv_2_container_socket, ldv_2_container_struct_vm_area_struct_ptr);
963 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
964 :
965 1 : break;
966 1 : }
967 3 : case 13: {
968 : /* LDV {"action": "PRE_CALL_28", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
969 : /* LDV {"action": "PRE_CALL_28", "type": "CONDITION_END"} */
970 :
971 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback llseek from file_operations."} */
972 : /* LDV {"type": "CALLBACK", "call": "((& seq_lseek))(ldv_2_container_struct_file_ptr, ldv_2_ldv_param_28_1_default, ldv_2_ldv_param_28_2_default);", "comment": "callback"} */
973 2 : ldv_random_proto_scenario_callback_2_28(ldv_2_callback_llseek, ldv_2_container_struct_file_ptr, ldv_2_ldv_param_28_1_default, ldv_2_ldv_param_28_2_default);
974 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
975 :
976 : /* LDV {"action": "POST_CALL_28", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
977 : /* LDV {"action": "POST_CALL_28", "type": "CONDITION_END"} */
978 :
979 1 : break;
980 1 : }
981 3 : case 14: {
982 : /* LDV {"action": "PRE_CALL_25", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
983 : /* LDV {"action": "PRE_CALL_25", "type": "CONDITION_END"} */
984 :
985 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback listen from proto_ops."} */
986 : /* LDV {"type": "CALLBACK", "call": "((& sock_no_listen))(ldv_2_container_socket, ldv_2_ldv_param_25_1_default);", "comment": "callback"} */
987 2 : ldv_random_proto_scenario_callback_2_25(ldv_2_callback_listen, ldv_2_container_socket, ldv_2_ldv_param_25_1_default);
988 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
989 :
990 : /* LDV {"action": "POST_CALL_25", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
991 : /* LDV {"action": "POST_CALL_25", "type": "CONDITION_END"} */
992 :
993 1 : break;
994 1 : }
995 3 : case 15: {
996 : /* LDV {"action": "PRE_CALL_22", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
997 : /* LDV {"action": "PRE_CALL_22", "type": "CONDITION_END"} */
998 :
999 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback ioctl from proto_ops."} */
1000 : /* LDV {"type": "CALLBACK", "call": "((& packet_ioctl))(ldv_2_container_socket, ldv_2_ldv_param_22_1_default, ldv_2_ldv_param_22_2_default);", "comment": "callback"} */
1001 2 : ldv_random_proto_scenario_callback_2_22(ldv_2_callback_ioctl, ldv_2_container_socket, ldv_2_ldv_param_22_1_default, ldv_2_ldv_param_22_2_default);
1002 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1003 :
1004 : /* LDV {"action": "POST_CALL_22", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1005 : /* LDV {"action": "POST_CALL_22", "type": "CONDITION_END"} */
1006 :
1007 1 : break;
1008 1 : }
1009 3 : case 16: {
1010 : /* LDV {"action": "PRE_CALL_19", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1011 3 : ldv_2_ldv_param_19_3_default = ldv_xmalloc_unknown_size(0);
1012 3 : ldv_2_ldv_param_19_4_default = ldv_xmalloc_unknown_size(0);
1013 : /* LDV {"action": "PRE_CALL_19", "type": "CONDITION_END"} */
1014 :
1015 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback getsockopt from proto_ops."} */
1016 : /* LDV {"type": "CALLBACK", "call": "((& sock_no_getsockopt))(ldv_2_container_socket, ldv_2_ldv_param_19_1_default, ldv_2_ldv_param_19_2_default, ldv_2_ldv_param_19_3_default, ldv_2_ldv_param_19_4_default);", "comment": "callback"} */
1017 2 : ldv_random_proto_scenario_callback_2_19(ldv_2_callback_getsockopt, ldv_2_container_socket, ldv_2_ldv_param_19_1_default, ldv_2_ldv_param_19_2_default, ldv_2_ldv_param_19_3_default, ldv_2_ldv_param_19_4_default);
1018 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1019 :
1020 : /* LDV {"action": "POST_CALL_19", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1021 2 : ldv_free(ldv_2_ldv_param_19_3_default);
1022 2 : ldv_free(ldv_2_ldv_param_19_4_default);
1023 : /* LDV {"action": "POST_CALL_19", "type": "CONDITION_END"} */
1024 :
1025 1 : break;
1026 1 : }
1027 3 : case 17: {
1028 : /* LDV {"action": "PRE_CALL_16", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1029 3 : ldv_2_ldv_param_16_2_default = ldv_xmalloc_unknown_size(0);
1030 : /* LDV {"action": "PRE_CALL_16", "type": "CONDITION_END"} */
1031 :
1032 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback getname from proto_ops."} */
1033 : /* LDV {"type": "CALLBACK", "call": "((& packet_getname_spkt))(ldv_2_container_socket, ldv_2_container_struct_sockaddr_ptr, ldv_2_ldv_param_16_2_default, ldv_2_ldv_param_16_3_default);", "comment": "callback"} */
1034 2 : ldv_random_proto_scenario_callback_2_16(ldv_2_callback_getname, ldv_2_container_socket, ldv_2_container_struct_sockaddr_ptr, ldv_2_ldv_param_16_2_default, ldv_2_ldv_param_16_3_default);
1035 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1036 :
1037 : /* LDV {"action": "POST_CALL_16", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1038 2 : ldv_free(ldv_2_ldv_param_16_2_default);
1039 : /* LDV {"action": "POST_CALL_16", "type": "CONDITION_END"} */
1040 :
1041 1 : break;
1042 1 : }
1043 3 : case 18: {
1044 : /* LDV {"action": "PRE_CALL_13", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1045 : /* LDV {"action": "PRE_CALL_13", "type": "CONDITION_END"} */
1046 :
1047 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback create from net_proto_family."} */
1048 : /* LDV {"type": "CALLBACK", "call": "((& packet_create))(ldv_2_container_struct_net_ptr, ldv_2_container_socket, ldv_2_ldv_param_13_2_default, ldv_2_ldv_param_13_3_default);", "comment": "callback"} */
1049 2 : ldv_random_proto_scenario_callback_2_13(ldv_2_callback_create, ldv_2_container_struct_net_ptr, ldv_2_container_socket, ldv_2_ldv_param_13_2_default, ldv_2_ldv_param_13_3_default);
1050 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1051 :
1052 : /* LDV {"action": "POST_CALL_13", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1053 : /* LDV {"action": "POST_CALL_13", "type": "CONDITION_END"} */
1054 :
1055 1 : break;
1056 1 : }
1057 3 : case 19: {
1058 : /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1059 : /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_END"} */
1060 :
1061 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback connect from proto_ops."} */
1062 : /* LDV {"type": "CALLBACK", "call": "((& sock_no_connect))(ldv_2_container_socket, ldv_2_container_struct_sockaddr_ptr, ldv_2_ldv_param_10_2_default, ldv_2_ldv_param_10_3_default);", "comment": "callback"} */
1063 2 : ldv_random_proto_scenario_callback_2_10(ldv_2_callback_connect, ldv_2_container_socket, ldv_2_container_struct_sockaddr_ptr, ldv_2_ldv_param_10_2_default, ldv_2_ldv_param_10_3_default);
1064 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1065 :
1066 : /* LDV {"action": "POST_CALL_10", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1067 : /* LDV {"action": "POST_CALL_10", "type": "CONDITION_END"} */
1068 :
1069 1 : break;
1070 1 : }
1071 3 : case 20: {
1072 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback accept from proto_ops."} */
1073 : /* LDV {"type": "CALLBACK", "call": "((& sock_no_accept))(ldv_2_container_socket, ldv_2_ldv_param_4_1_default, ldv_2_ldv_param_4_2_default);", "comment": "callback"} */
1074 2 : ldv_random_proto_scenario_callback_2_4(ldv_2_callback_accept, ldv_2_container_socket, ldv_2_ldv_param_4_1_default, ldv_2_ldv_param_4_2_default);
1075 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1076 :
1077 1 : break;
1078 1 : }
1079 2 : default: ldv_stop();
1080 1 : }
1081 0 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1082 40 : ldv_free(ldv_2_ldv_param_4_1_default);
1083 0 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
1084 :
1085 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1086 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1087 :
1088 : /* Jump to a subprocess 'call' initial state */
1089 1 : goto ldv_call_2;
1090 : }
1091 : else {
1092 : /* LDV {"action": "DEFAULT_FREE_2", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
1093 2 : ldv_free(ldv_2_container_socket);
1094 2 : ldv_free(ldv_2_container_struct_file_ptr);
1095 2 : ldv_free(ldv_2_container_struct_inode_ptr);
1096 2 : ldv_free(ldv_2_container_struct_kiocb_ptr);
1097 2 : ldv_free(ldv_2_container_struct_msghdr_ptr);
1098 2 : ldv_free(ldv_2_container_struct_net_ptr);
1099 2 : ldv_free(ldv_2_container_struct_page_ptr);
1100 2 : ldv_free(ldv_2_container_struct_poll_table_struct_ptr);
1101 2 : ldv_free(ldv_2_container_struct_sockaddr_ptr);
1102 2 : ldv_free(ldv_2_container_struct_vm_area_struct_ptr);
1103 : /* LDV {"action": "DEFAULT_FREE_2", "type": "CONDITION_END"} */
1104 :
1105 : /* LDV {"action": "DEFAULT_DEREGISTER_2", "type": "RECEIVE_BEGIN", "comment": "Finish PROTO callbacks invocations scenario."} */
1106 : /* Skip a non-replicative signal receiving */
1107 : /* LDV {"action": "DEFAULT_DEREGISTER_2", "type": "RECEIVE_END"} */
1108 :
1109 : /* Exit function at a terminal state */
1110 1 : return;
1111 : }
1112 : /* End of the subprocess 'call' */
1113 : return;
1114 : /* LDV {"comment": "End of control function based on process 'random_proto_scenario(proto)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_proto_scenario_2"} */
1115 : }
1116 :
1117 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_10 */
1118 : void ldv_random_proto_scenario_callback_2_10(int (*arg0)(struct socket *, struct sockaddr *, int, int), struct socket *arg1, struct sockaddr *arg2, int arg3, int arg4) {
1119 1 : ((& sock_no_connect))(arg1, arg2, arg3, arg4);
1120 1 : }
1121 :
1122 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_13 */
1123 : void ldv_random_proto_scenario_callback_2_13(int (*arg0)(struct net *, struct socket *, int, int), struct net *arg1, struct socket *arg2, int arg3, int arg4) {
1124 3 : ((& packet_create))(arg1, arg2, arg3, arg4);
1125 1 : }
1126 :
1127 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_16 */
1128 : void ldv_random_proto_scenario_callback_2_16(int (*arg0)(struct socket *, struct sockaddr *, int *, int), struct socket *arg1, struct sockaddr *arg2, int *arg3, int arg4) {
1129 3 : ((& packet_getname_spkt))(arg1, arg2, arg3, arg4);
1130 1 : }
1131 :
1132 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_19 */
1133 : void ldv_random_proto_scenario_callback_2_19(int (*arg0)(struct socket *, int, int, char *, int *), struct socket *arg1, int arg2, int arg3, char *arg4, int *arg5) {
1134 1 : ((& sock_no_getsockopt))(arg1, arg2, arg3, arg4, arg5);
1135 1 : }
1136 :
1137 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_22 */
1138 : void ldv_random_proto_scenario_callback_2_22(int (*arg0)(struct socket *, unsigned int, long unsigned int), struct socket *arg1, unsigned int arg2, long unsigned int arg3) {
1139 5 : ((& packet_ioctl))(arg1, arg2, arg3);
1140 1 : }
1141 :
1142 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_25 */
1143 : void ldv_random_proto_scenario_callback_2_25(int (*arg0)(struct socket *, int), struct socket *arg1, int arg2) {
1144 1 : ((& sock_no_listen))(arg1, arg2);
1145 1 : }
1146 :
1147 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_28 */
1148 : void ldv_random_proto_scenario_callback_2_28(loff_t (*arg0)(struct file *, loff_t , int), struct file *arg1, long long int arg2, int arg3) {
1149 1 : ((& seq_lseek))(arg1, arg2, arg3);
1150 1 : }
1151 :
1152 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_31 */
1153 : void ldv_random_proto_scenario_callback_2_31(int (*arg0)(struct file *, struct socket *, struct vm_area_struct *), struct file *arg1, struct socket *arg2, struct vm_area_struct *arg3) {
1154 1 : ((& sock_no_mmap))(arg1, arg2, arg3);
1155 1 : }
1156 :
1157 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_32 */
1158 : void ldv_random_proto_scenario_callback_2_32(int (*arg0)(struct inode *, struct file *), struct inode *arg1, struct file *arg2) {
1159 2 : ((& packet_seq_open))(arg1, arg2);
1160 1 : }
1161 :
1162 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_33 */
1163 : void ldv_random_proto_scenario_callback_2_33(unsigned int (*arg0)(struct file *, struct socket *, struct poll_table_struct *), struct file *arg1, struct socket *arg2, struct poll_table_struct *arg3) {
1164 1 : ((& datagram_poll))(arg1, arg2, arg3);
1165 1 : }
1166 :
1167 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_34 */
1168 : void ldv_random_proto_scenario_callback_2_34(int (*arg0)(struct socket *, struct sockaddr *, int), struct socket *arg1, struct sockaddr *arg2, int arg3) {
1169 4 : ((& packet_bind_spkt))(arg1, arg2, arg3);
1170 1 : }
1171 :
1172 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_37 */
1173 : void ldv_random_proto_scenario_callback_2_37(ssize_t (*arg0)(struct file *, char *, size_t , loff_t *), struct file *arg1, char *arg2, long unsigned int arg3, long long int *arg4) {
1174 1 : ((& seq_read))(arg1, arg2, arg3, arg4);
1175 1 : }
1176 :
1177 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_4 */
1178 : void ldv_random_proto_scenario_callback_2_4(int (*arg0)(struct socket *, struct socket *, int), struct socket *arg1, struct socket *arg2, int arg3) {
1179 1 : ((& sock_no_accept))(arg1, arg2, arg3);
1180 1 : }
1181 :
1182 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_40 */
1183 : void ldv_random_proto_scenario_callback_2_40(int (*arg0)(struct kiocb *, struct socket *, struct msghdr *, size_t , int), struct kiocb *arg1, struct socket *arg2, struct msghdr *arg3, long unsigned int arg4, int arg5) {
1184 4 : ((& packet_recvmsg))(arg1, arg2, arg3, arg4, arg5);
1185 1 : }
1186 :
1187 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_43 */
1188 : void ldv_random_proto_scenario_callback_2_43(int (*arg0)(struct socket *), struct socket *arg1) {
1189 3 : ((& packet_release))(arg1);
1190 1 : }
1191 :
1192 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_44 */
1193 : void ldv_random_proto_scenario_callback_2_44(int (*arg0)(struct kiocb *, struct socket *, struct msghdr *, size_t ), struct kiocb *arg1, struct socket *arg2, struct msghdr *arg3, long unsigned int arg4) {
1194 7 : ((& packet_sendmsg_spkt))(arg1, arg2, arg3, arg4);
1195 1 : }
1196 :
1197 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_47 */
1198 : void ldv_random_proto_scenario_callback_2_47(ssize_t (*arg0)(struct socket *, struct page *, int, size_t , int), struct socket *arg1, struct page *arg2, int arg3, long unsigned int arg4, int arg5) {
1199 1 : ((& sock_no_sendpage))(arg1, arg2, arg3, arg4, arg5);
1200 1 : }
1201 :
1202 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_50 */
1203 : void ldv_random_proto_scenario_callback_2_50(int (*arg0)(struct socket *, int, int, char *, unsigned int), struct socket *arg1, int arg2, int arg3, char *arg4, unsigned int arg5) {
1204 1 : ((& sock_no_setsockopt))(arg1, arg2, arg3, arg4, arg5);
1205 1 : }
1206 :
1207 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_53 */
1208 : void ldv_random_proto_scenario_callback_2_53(int (*arg0)(struct socket *, int), struct socket *arg1, int arg2) {
1209 1 : ((& sock_no_shutdown))(arg1, arg2);
1210 1 : }
1211 :
1212 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_56 */
1213 : void ldv_random_proto_scenario_callback_2_56(int (*arg0)(struct socket *, struct socket *), struct socket *arg1, struct socket *arg2) {
1214 1 : ((& sock_no_socketpair))(arg1, arg2);
1215 1 : }
1216 :
1217 : /* AUX_FUNC ldv_traverse_kernel_items_scenario_3 */
1218 : void ldv_traverse_kernel_items_scenario_3(void *arg0) {
1219 : /* LDV {"thread": 3, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'traverse_kernel_items_scenario(seq_operations)'", "function": "ldv_traverse_kernel_items_scenario_3"} */
1220 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1221 1 : long long int *ldv_3_ldv_param_13_1_default;
1222 1 : void *ldv_3_ldv_param_2_1_default;
1223 1 : void *ldv_3_ldv_param_6_1_default;
1224 1 : void *ldv_3_ldv_param_7_1_default;
1225 1 : long long int *ldv_3_ldv_param_7_2_default;
1226 1 : struct seq_operations *ldv_3_ops_seq_operations;
1227 1 : void *ldv_3_ret_default;
1228 1 : struct seq_file *ldv_3_seq_file_seq_file;
1229 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1230 1 : /* LDV {"action": "DEFAULT_REGISTER_3", "type": "RECEIVE_BEGIN", "comment": "Begin SEQ_OPERATIONS callbacks invocations scenario."} */
1231 3 : ldv_free(arg0);
1232 1 : /* LDV {"action": "DEFAULT_REGISTER_3", "type": "RECEIVE_END"} */
1233 1 :
1234 : /* LDV {"action": "DEFAULT_ALLOC_3", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
1235 3 : ldv_3_seq_file_seq_file = ldv_xmalloc_unknown_size(0);
1236 3 : ldv_3_ops_seq_operations = ldv_xmalloc_unknown_size(0);
1237 : /* LDV {"action": "DEFAULT_ALLOC_3", "type": "CONDITION_END"} */
1238 :
1239 : /* LDV {"action": "START_STEP", "type": "SUBPROCESS_BEGIN", "comment": "Start sequence or do nothing."} */
1240 : /* LDV {"action": "START_STEP", "type": "SUBPROCESS_END"} */
1241 :
1242 : /* Jump to a subprocess 'start_step' initial state */
1243 1 : goto ldv_start_step_3;
1244 : /* End of the process */
1245 : return;
1246 1 :
1247 : /* Sbprocess start_step */
1248 : ldv_start_step_3:
1249 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1250 :
1251 : /* LDV {"action": "PRE_CALL_13", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1252 3 : ldv_3_ldv_param_13_1_default = ldv_xmalloc_unknown_size(0);
1253 : /* LDV {"action": "PRE_CALL_13", "type": "CONDITION_END"} */
1254 :
1255 : /* LDV {"action": "START", "type": "CALL_BEGIN", "callback": true, "comment": "Initialize data for walking through a list of kernel items. Invoke callback start from seq_operations."} */
1256 : /* LDV {"type": "CALLBACK", "call": "ldv_3_ret_default = ((& packet_seq_start))(ldv_3_seq_file_seq_file, ldv_3_ldv_param_13_1_default);", "comment": "start"} */
1257 2 : ldv_3_ret_default = ldv_traverse_kernel_items_scenario_start_3_13(ldv_3_ops_seq_operations->start, ldv_3_seq_file_seq_file, ldv_3_ldv_param_13_1_default);
1258 : /* LDV {"action": "START", "type": "CALL_END"} */
1259 :
1260 : /* LDV {"action": "POST_CALL_13", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1261 2 : ldv_free(ldv_3_ldv_param_13_1_default);
1262 : /* LDV {"action": "POST_CALL_13", "type": "CONDITION_END"} */
1263 :
1264 4 : if (ldv_undef_int()) {
1265 : /* LDV {"action": "START_SUCCESS", "type": "CONDITION_BEGIN", "comment": "A new sequence is initialized successfully."} */
1266 2 : ldv_assume(ldv_3_ret_default != 0);
1267 : /* LDV {"action": "START_SUCCESS", "type": "CONDITION_END"} */
1268 :
1269 : /* LDV {"action": "NEXT_STEP", "type": "SUBPROCESS_BEGIN", "comment": "Continue iteration over kernel items."} */
1270 : /* LDV {"action": "NEXT_STEP", "type": "SUBPROCESS_END"} */
1271 :
1272 : /* Jump to a subprocess 'next_step' initial state */
1273 1 : goto ldv_next_step_3;
1274 : }
1275 : else {
1276 : /* LDV {"action": "START_FAILED", "type": "CONDITION_BEGIN", "comment": "Failed to initialize a new sequence."} */
1277 2 : ldv_assume(ldv_3_ret_default == 0);
1278 : /* LDV {"action": "START_FAILED", "type": "CONDITION_END"} */
1279 :
1280 : /* LDV {"action": "DEFAULT_FREE_3", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
1281 2 : ldv_free(ldv_3_seq_file_seq_file);
1282 : /* LDV {"action": "DEFAULT_FREE_3", "type": "CONDITION_END"} */
1283 :
1284 : /* LDV {"action": "DEFAULT_DEREGISTER_3", "type": "RECEIVE_BEGIN", "comment": "Finish SEQ_OPERATIONS callbacks invocations scenario."} */
1285 : /* Skip a non-replicative signal receiving */
1286 : /* LDV {"action": "DEFAULT_DEREGISTER_3", "type": "RECEIVE_END"} */
1287 :
1288 : /* Exit function at a terminal state */
1289 1 : return;
1290 : }
1291 : /* End of the subprocess 'start_step' */
1292 : return;
1293 1 :
1294 : /* Sbprocess next_step */
1295 : ldv_next_step_3:
1296 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1297 :
1298 : /* LDV {"action": "PRE_CALL_7", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1299 2 : ldv_3_ldv_param_7_1_default = ldv_xmalloc_unknown_size(0);
1300 3 : ldv_3_ldv_param_7_2_default = ldv_xmalloc_unknown_size(0);
1301 : /* LDV {"action": "PRE_CALL_7", "type": "CONDITION_END"} */
1302 :
1303 : /* LDV {"action": "NEXT", "type": "CALL_BEGIN", "callback": true, "comment": "Advance to the new item. Invoke callback next from seq_operations."} */
1304 : /* LDV {"type": "CALLBACK", "call": "ldv_3_ret_default = ((& packet_seq_next))(ldv_3_seq_file_seq_file, ldv_3_ldv_param_7_1_default, ldv_3_ldv_param_7_2_default);", "comment": "next"} */
1305 2 : ldv_3_ret_default = ldv_traverse_kernel_items_scenario_next_3_7(ldv_3_ops_seq_operations->next, ldv_3_seq_file_seq_file, ldv_3_ldv_param_7_1_default, ldv_3_ldv_param_7_2_default);
1306 : /* LDV {"action": "NEXT", "type": "CALL_END"} */
1307 :
1308 : /* LDV {"action": "POST_CALL_7", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1309 2 : ldv_free(ldv_3_ldv_param_7_1_default);
1310 2 : ldv_free(ldv_3_ldv_param_7_2_default);
1311 : /* LDV {"action": "POST_CALL_7", "type": "CONDITION_END"} */
1312 :
1313 : /* LDV {"action": "PRE_CALL_6", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1314 2 : ldv_3_ldv_param_6_1_default = ldv_xmalloc_unknown_size(0);
1315 : /* LDV {"action": "PRE_CALL_6", "type": "CONDITION_END"} */
1316 :
1317 : /* LDV {"action": "SHOW", "type": "CALL_BEGIN", "callback": true, "comment": "Show current item: put data into the seq_file output buffer. Invoke callback show from seq_operations."} */
1318 : /* LDV {"type": "CALLBACK", "call": "((& packet_seq_show))(ldv_3_seq_file_seq_file, ldv_3_ldv_param_6_1_default);", "comment": "show"} */
1319 2 : ldv_traverse_kernel_items_scenario_show_3_6(ldv_3_ops_seq_operations->show, ldv_3_seq_file_seq_file, ldv_3_ldv_param_6_1_default);
1320 : /* LDV {"action": "SHOW", "type": "CALL_END"} */
1321 :
1322 : /* LDV {"action": "POST_CALL_6", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1323 2 : ldv_free(ldv_3_ldv_param_6_1_default);
1324 : /* LDV {"action": "POST_CALL_6", "type": "CONDITION_END"} */
1325 :
1326 4 : if (ldv_undef_int()) {
1327 : /* LDV {"action": "NEXT_SUCCESS", "type": "CONDITION_BEGIN", "comment": "More items to show are left."} */
1328 2 : ldv_assume(ldv_3_ret_default != 0);
1329 : /* LDV {"action": "NEXT_SUCCESS", "type": "CONDITION_END"} */
1330 :
1331 : /* LDV {"action": "NEXT_STEP", "type": "SUBPROCESS_BEGIN", "comment": "Continue iteration over kernel items."} */
1332 : /* LDV {"action": "NEXT_STEP", "type": "SUBPROCESS_END"} */
1333 :
1334 : /* Jump to a subprocess 'next_step' initial state */
1335 1 : goto ldv_next_step_3;
1336 : }
1337 : else {
1338 : /* LDV {"action": "NEXT_FAIL", "type": "CONDITION_BEGIN", "comment": "The last kernel item is reached."} */
1339 2 : ldv_assume(ldv_3_ret_default == 0);
1340 : /* LDV {"action": "NEXT_FAIL", "type": "CONDITION_END"} */
1341 :
1342 : /* LDV {"action": "PRE_CALL_2", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1343 2 : ldv_3_ldv_param_2_1_default = ldv_xmalloc_unknown_size(0);
1344 : /* LDV {"action": "PRE_CALL_2", "type": "CONDITION_END"} */
1345 :
1346 : /* LDV {"action": "STOP", "type": "CALL_BEGIN", "callback": true, "comment": "End of the sequence is reached, do necessary cleanup. Invoke callback stop from seq_operations."} */
1347 : /* LDV {"type": "CALLBACK", "call": "((& packet_seq_stop))(ldv_3_seq_file_seq_file, ldv_3_ldv_param_2_1_default);", "comment": "stop"} */
1348 2 : ldv_traverse_kernel_items_scenario_stop_3_2(ldv_3_ops_seq_operations->stop, ldv_3_seq_file_seq_file, ldv_3_ldv_param_2_1_default);
1349 : /* LDV {"action": "STOP", "type": "CALL_END"} */
1350 :
1351 : /* LDV {"action": "POST_CALL_2", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1352 2 : ldv_free(ldv_3_ldv_param_2_1_default);
1353 : /* LDV {"action": "POST_CALL_2", "type": "CONDITION_END"} */
1354 :
1355 : /* LDV {"action": "START_STEP", "type": "SUBPROCESS_BEGIN", "comment": "Start sequence or do nothing."} */
1356 : /* LDV {"action": "START_STEP", "type": "SUBPROCESS_END"} */
1357 :
1358 : /* Jump to a subprocess 'start_step' initial state */
1359 1 : goto ldv_start_step_3;
1360 : }
1361 : /* End of the subprocess 'next_step' */
1362 : return;
1363 : /* LDV {"comment": "End of control function based on process 'traverse_kernel_items_scenario(seq_operations)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_traverse_kernel_items_scenario_3"} */
1364 : }
1365 :
1366 : /* AUX_FUNC_CALLBACK ldv_traverse_kernel_items_scenario_next_3_7 */
1367 : void * ldv_traverse_kernel_items_scenario_next_3_7(void *(*arg0)(struct seq_file *, void *, loff_t *), struct seq_file *arg1, void *arg2, long long int *arg3) {
1368 4 : return ((& packet_seq_next))(arg1, arg2, arg3);
1369 : }
1370 :
1371 : /* AUX_FUNC_CALLBACK ldv_traverse_kernel_items_scenario_show_3_6 */
1372 1 : void ldv_traverse_kernel_items_scenario_show_3_6(int (*arg0)(struct seq_file *, void *), struct seq_file *arg1, void *arg2) {
1373 3 : ((& packet_seq_show))(arg1, arg2);
1374 1 : }
1375 :
1376 : /* AUX_FUNC_CALLBACK ldv_traverse_kernel_items_scenario_start_3_13 */
1377 : void * ldv_traverse_kernel_items_scenario_start_3_13(void *(*arg0)(struct seq_file *, loff_t *), struct seq_file *arg1, long long int *arg2) {
1378 4 : return ((& packet_seq_start))(arg1, arg2);
1379 : }
1380 :
1381 1 : /* AUX_FUNC_CALLBACK ldv_traverse_kernel_items_scenario_stop_3_2 */
1382 : void ldv_traverse_kernel_items_scenario_stop_3_2(void (*arg0)(struct seq_file *, void *), struct seq_file *arg1, void *arg2) {
1383 2 : ((& packet_seq_stop))(arg1, arg2);
1384 1 : }
1385 :
1386 : /* AUX_FUNC main */
1387 : int main() {
1388 1 : ldv_main_9(0);
1389 0 : return 0;
1390 : }
1391 :
1392 :
1393 : /* AUX_FUNC ERR_PTR */
1394 : static inline void *ERR_PTR (long int error)
1395 : {
1396 :
1397 : return ldv_err_ptr(error);
1398 : }
1399 :
1400 : /* AUX_FUNC PTR_ERR */
1401 : static inline long int PTR_ERR (void const *ptr)
1402 : {
1403 :
1404 : return ldv_ptr_err(ptr);
1405 : }
1406 :
1407 : /* AUX_FUNC IS_ERR */
1408 : static inline long int IS_ERR (void const *ptr)
1409 : {
1410 :
1411 : return ldv_is_err(ptr);
1412 : }
1413 :
1414 : /* AUX_FUNC IS_ERR_OR_NULL */
1415 : static inline long int IS_ERR_OR_NULL (void const *ptr)
1416 : {
1417 :
1418 : return ldv_is_err_or_null(ptr);
1419 : }
1420 :
1421 : /* AUX_FUNC kzalloc */
1422 : static inline void *kzalloc (size_t size, gfp_t flags)
1423 : {
1424 :
1425 : return ldv_kzalloc(size, flags);
1426 : }
1427 :
1428 : /* AUX_FUNC ldv_unregister_netdevice_notifier_6 */
1429 : int ldv_unregister_netdevice_notifier_6 (struct notifier_block *ldv_func_arg1)
1430 : {
1431 2 :
1432 : /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'unregister_netdevice_notifier'"} */
1433 6 : return ldv_emg_unregister_netdevice_notifier(ldv_func_arg1);
1434 : }
1435 :
1436 : /* AUX_FUNC ldv_register_netdevice_notifier_7 */
1437 : int ldv_register_netdevice_notifier_7 (struct notifier_block *ldv_func_arg1)
1438 : {
1439 1 :
1440 : /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'register_netdevice_notifier'"} */
1441 4 : return ldv_emg_register_netdevice_notifier(ldv_func_arg1);
1442 : }
|