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/net.h>
31 : #include <linux/seq_file.h>
32 : #include <linux/fs.h>
33 : #include <linux/pagemap.h>
34 : #include <linux/poll.h>
35 :
36 :
37 : struct ldv_struct_insmod_6 {
38 : int signal_pending;
39 : };
40 1 :
41 : struct ldv_struct_random_proto_scenario_2 {
42 : struct net *arg0;
43 : int signal_pending;
44 : };
45 :
46 : /* EMG Function declarations */
47 : void ldv_character_driver_scenario_1(void *);
48 : int ldv_character_driver_scenario_probe_1_13(int (*)(struct inode *, struct file *), struct inode *, struct file *);
49 : 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 *);
50 : void ldv_dispatch_default_deregister_1_6_4(void);
51 : void ldv_dispatch_default_deregister_2_6_5(void);
52 : void ldv_dispatch_default_deregister_4_6_6(void);
53 : void ldv_dispatch_default_deregister_5_6_7(void);
54 : void ldv_dispatch_default_register_1_6_10(void);
55 : void ldv_dispatch_default_register_4_6_9(void);
56 : void ldv_dispatch_default_register_5_6_8(void);
57 : void ldv_dispatch_insmod_deregister_8_2(void);
58 : void ldv_dispatch_insmod_register_8_3(void);
59 : extern struct ctl_table_header *ldv_emg_register_net_sysctl_table(struct net *, struct ctl_path *, ctl_table *);
60 : void ldv_insmod_6(void *);
61 : void ldv_insmod_af_unix_exit_6_2(void (*)(void));
62 : int ldv_insmod_af_unix_init_6_14(int (*)(void));
63 : void ldv_main_8(void *);
64 : void ldv_random_containerless_scenario_5(void *);
65 : void ldv_random_containerless_scenario_callback_5_4(void (*)(struct net *), struct net *);
66 : void ldv_random_containerless_scenario_callback_5_8(int (*)(struct net *), struct net *);
67 : void ldv_random_proto_scenario_2(void *);
68 : void ldv_random_proto_scenario_3(void *);
69 : void ldv_random_proto_scenario_callback_2_12(int (*)(struct net *, struct socket *, int, int), struct net *, struct socket *, int, int);
70 : void ldv_random_proto_scenario_callback_2_15(int (*)(struct socket *, struct sockaddr *, pid_t *, int), struct socket *, struct sockaddr *, pid_t *, int);
71 : void ldv_random_proto_scenario_callback_2_18(int (*)(struct socket *, int, int, char *, pid_t *), struct socket *, int, int, char *, pid_t *);
72 : void ldv_random_proto_scenario_callback_2_21(int (*)(struct socket *, unsigned int, long unsigned int), struct socket *, unsigned int, long unsigned int);
73 : void ldv_random_proto_scenario_callback_2_24(int (*)(struct socket *, int), struct socket *, int);
74 : void ldv_random_proto_scenario_callback_2_27(loff_t (*)(struct file *, loff_t , int), struct file *, long long int, int);
75 : void ldv_random_proto_scenario_callback_2_30(int (*)(struct file *, struct socket *, struct vm_area_struct *), struct file *, struct socket *, struct vm_area_struct *);
76 : void ldv_random_proto_scenario_callback_2_31(int (*)(struct inode *, struct file *), struct inode *, struct file *);
77 : void ldv_random_proto_scenario_callback_2_32(unsigned int (*)(struct file *, struct socket *, poll_table *), struct file *, struct socket *, poll_table *);
78 : void ldv_random_proto_scenario_callback_2_33(int (*)(struct socket *, struct sockaddr *, int), struct socket *, struct sockaddr *, int);
79 : void ldv_random_proto_scenario_callback_2_36(ssize_t (*)(struct file *, char *, size_t , loff_t *), struct file *, char *, long unsigned int, loff_t *);
80 : void ldv_random_proto_scenario_callback_2_39(int (*)(struct kiocb *, struct socket *, struct msghdr *, size_t , int), struct kiocb *, struct socket *, struct msghdr *, long unsigned int, int);
81 : void ldv_random_proto_scenario_callback_2_4(int (*)(struct socket *, struct socket *, int), struct socket *, struct socket *, int);
82 : void ldv_random_proto_scenario_callback_2_42(int (*)(struct socket *), struct socket *);
83 : void ldv_random_proto_scenario_callback_2_43(int (*)(struct kiocb *, struct socket *, struct msghdr *, size_t ), struct kiocb *, struct socket *, struct msghdr *, long unsigned int);
84 : void ldv_random_proto_scenario_callback_2_46(ssize_t (*)(struct socket *, struct page *, int, size_t , int), struct socket *, struct page *, int, long unsigned int, int);
85 : void ldv_random_proto_scenario_callback_2_49(int (*)(struct socket *, int, int, char *, unsigned int), struct socket *, int, int, char *, unsigned int);
86 : void ldv_random_proto_scenario_callback_2_52(int (*)(struct socket *, int), struct socket *, int);
87 : void ldv_random_proto_scenario_callback_2_55(int (*)(struct socket *, struct socket *), struct socket *, struct socket *);
88 : void ldv_random_proto_scenario_callback_2_9(int (*)(struct socket *, struct sockaddr *, int, int), struct socket *, struct sockaddr *, int, int);
89 : void ldv_random_proto_scenario_callback_3_12(int (*)(struct net *, struct socket *, int, int), struct net *, struct socket *, int, int);
90 : void ldv_random_proto_scenario_callback_3_15(int (*)(struct socket *, struct sockaddr *, pid_t *, int), struct socket *, struct sockaddr *, pid_t *, int);
91 : void ldv_random_proto_scenario_callback_3_18(int (*)(struct socket *, int, int, char *, pid_t *), struct socket *, int, int, char *, pid_t *);
92 : void ldv_random_proto_scenario_callback_3_21(int (*)(struct socket *, unsigned int, long unsigned int), struct socket *, unsigned int, long unsigned int);
93 : void ldv_random_proto_scenario_callback_3_24(int (*)(struct socket *, int), struct socket *, int);
94 : void ldv_random_proto_scenario_callback_3_27(loff_t (*)(struct file *, loff_t , int), struct file *, long long int, int);
95 : void ldv_random_proto_scenario_callback_3_30(int (*)(struct file *, struct socket *, struct vm_area_struct *), struct file *, struct socket *, struct vm_area_struct *);
96 : void ldv_random_proto_scenario_callback_3_31(int (*)(struct inode *, struct file *), struct inode *, struct file *);
97 : void ldv_random_proto_scenario_callback_3_32(unsigned int (*)(struct file *, struct socket *, poll_table *), struct file *, struct socket *, poll_table *);
98 : void ldv_random_proto_scenario_callback_3_33(int (*)(struct socket *, struct sockaddr *, int), struct socket *, struct sockaddr *, int);
99 : void ldv_random_proto_scenario_callback_3_36(ssize_t (*)(struct file *, char *, size_t , loff_t *), struct file *, char *, long unsigned int, loff_t *);
100 : void ldv_random_proto_scenario_callback_3_39(int (*)(struct kiocb *, struct socket *, struct msghdr *, size_t , int), struct kiocb *, struct socket *, struct msghdr *, long unsigned int, int);
101 : void ldv_random_proto_scenario_callback_3_4(int (*)(struct socket *, struct socket *, int), struct socket *, struct socket *, int);
102 : void ldv_random_proto_scenario_callback_3_42(int (*)(struct socket *), struct socket *);
103 : void ldv_random_proto_scenario_callback_3_43(int (*)(struct kiocb *, struct socket *, struct msghdr *, size_t ), struct kiocb *, struct socket *, struct msghdr *, long unsigned int);
104 : void ldv_random_proto_scenario_callback_3_46(ssize_t (*)(struct socket *, struct page *, int, size_t , int), struct socket *, struct page *, int, long unsigned int, int);
105 : void ldv_random_proto_scenario_callback_3_49(int (*)(struct socket *, int, int, char *, unsigned int), struct socket *, int, int, char *, unsigned int);
106 : void ldv_random_proto_scenario_callback_3_52(int (*)(struct socket *, int), struct socket *, int);
107 : void ldv_random_proto_scenario_callback_3_55(int (*)(struct socket *, struct socket *), struct socket *, struct socket *);
108 : void ldv_random_proto_scenario_callback_3_9(int (*)(struct socket *, struct sockaddr *, int, int), struct socket *, struct sockaddr *, int, int);
109 : void ldv_traverse_kernel_items_scenario_4(void *);
110 : void *ldv_traverse_kernel_items_scenario_next_4_7(void *(*)(struct seq_file *, void *, loff_t *), struct seq_file *, void *, loff_t *);
111 : void ldv_traverse_kernel_items_scenario_show_4_6(int (*)(struct seq_file *, void *), struct seq_file *, void *);
112 : void *ldv_traverse_kernel_items_scenario_start_4_13(void *(*)(struct seq_file *, loff_t *), struct seq_file *, loff_t *);
113 : void ldv_traverse_kernel_items_scenario_stop_4_2(void (*)(struct seq_file *, void *), struct seq_file *, void *);
114 : int main(void);
115 :
116 : /* EMG variable declarations */
117 1 : struct ldv_thread ldv_thread_1;
118 1 : struct ldv_thread ldv_thread_2;
119 1 : struct ldv_thread ldv_thread_3;
120 1 : struct ldv_thread ldv_thread_4;
121 1 : struct ldv_thread ldv_thread_5;
122 1 : struct ldv_thread ldv_thread_6;
123 1 : struct ldv_thread ldv_thread_8;
124 :
125 : /* EMG variable initialization */
126 :
127 : /* EMG function definitions */
128 : /* AUX_FUNC ldv_character_driver_scenario_1 */
129 : void ldv_character_driver_scenario_1(void *arg0) {
130 : /* LDV {"thread": 1, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'character_driver_scenario(file_operations)'", "function": "ldv_character_driver_scenario_1"} */
131 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
132 1 : struct file_operations *ldv_1_container_file_operations;
133 1 : char *ldv_1_ldv_param_4_1_default;
134 1 : long long int *ldv_1_ldv_param_4_3_default;
135 1 : struct file *ldv_1_resource_file;
136 1 : struct inode *ldv_1_resource_inode;
137 1 : int ldv_1_ret_default;
138 1 : long unsigned int ldv_1_size_cnt_write_size;
139 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
140 1 : /* Initialize automaton variables */
141 2 : ldv_1_ret_default = 1;
142 1 : /* LDV {"action": "DEFAULT_REGISTER_1", "type": "RECEIVE_BEGIN", "comment": "Begin FILE_OPERATIONS callbacks invocations scenario."} */
143 3 : ldv_free(arg0);
144 1 : /* LDV {"action": "DEFAULT_REGISTER_1", "type": "RECEIVE_END"} */
145 1 :
146 1 : /* LDV {"action": "DEFAULT_ALLOC_1", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
147 3 : ldv_1_container_file_operations = ldv_xmalloc_unknown_size(0);
148 : /* LDV {"action": "DEFAULT_ALLOC_1", "type": "CONDITION_END"} */
149 :
150 : /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Allocate memory for file and inode structures."} */
151 3 : ldv_1_resource_file = ldv_xmalloc(sizeof(struct file));
152 3 : ldv_1_resource_inode = ldv_xmalloc(sizeof(struct inode));
153 3 : ldv_1_size_cnt_write_size = ldv_undef_int();
154 : /* LDV {"action": "INIT", "type": "CONDITION_END"} */
155 :
156 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Device appeared in the system."} */
157 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
158 :
159 : /* Jump to a subprocess 'main' initial state */
160 1 : goto ldv_main_1;
161 : /* End of the process */
162 : return;
163 1 :
164 : /* Sbprocess main */
165 : ldv_main_1:
166 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
167 :
168 4 : if (ldv_undef_int()) {
169 : /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Open the device file. Invoke callback open from file_operations."} */
170 : /* LDV {"type": "CALLBACK", "call": "ldv_1_ret_default = ((& unix_seq_open))(ldv_1_resource_inode, ldv_1_resource_file);", "comment": "probe"} */
171 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);
172 : /* Callback post-call */
173 2 : ldv_1_ret_default = ldv_filter_err_code(ldv_1_ret_default);
174 : /* LDV {"action": "PROBE", "type": "CALL_END"} */
175 :
176 4 : if (ldv_undef_int()) {
177 : /* LDV {"action": "PROBE_SUCCESS", "type": "CONDITION_BEGIN", "comment": "Device file is opened successfully."} */
178 2 : ldv_assume(ldv_1_ret_default == 0);
179 : /* LDV {"action": "PROBE_SUCCESS", "type": "CONDITION_END"} */
180 :
181 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Device file is opened, ready to read and write."} */
182 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
183 :
184 : /* Jump to a subprocess 'call' initial state */
185 1 : goto ldv_call_1;
186 : }
187 : else {
188 : /* LDV {"action": "PROBE_FAIL", "type": "CONDITION_BEGIN", "comment": "Failed to open devices file."} */
189 2 : ldv_assume(ldv_1_ret_default != 0);
190 : /* LDV {"action": "PROBE_FAIL", "type": "CONDITION_END"} */
191 :
192 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Device appeared in the system."} */
193 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
194 :
195 : /* Jump to a subprocess 'main' initial state */
196 1 : goto ldv_main_1;
197 : }
198 : }
199 : else {
200 : /* LDV {"action": "FREE", "type": "CONDITION_BEGIN", "comment": "Free memory of file and inode structures."} */
201 2 : ldv_free(ldv_1_resource_file);
202 2 : ldv_free(ldv_1_resource_inode);
203 : /* LDV {"action": "FREE", "type": "CONDITION_END"} */
204 :
205 : /* LDV {"action": "DEFAULT_FREE_1", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
206 2 : ldv_free(ldv_1_container_file_operations);
207 : /* LDV {"action": "DEFAULT_FREE_1", "type": "CONDITION_END"} */
208 :
209 : /* LDV {"action": "DEFAULT_DEREGISTER_1", "type": "RECEIVE_BEGIN", "comment": "Finish FILE_OPERATIONS callbacks invocations scenario."} */
210 : /* Skip a non-replicative signal receiving */
211 : /* LDV {"action": "DEFAULT_DEREGISTER_1", "type": "RECEIVE_END"} */
212 :
213 : /* Exit function at a terminal state */
214 1 : return;
215 : }
216 : /* End of the subprocess 'main' */
217 : return;
218 1 :
219 : /* Sbprocess call */
220 : ldv_call_1:
221 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
222 :
223 2 : switch (ldv_undef_int()) {
224 3 : case 1: {
225 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
226 3 : ldv_1_ldv_param_4_1_default = ldv_xmalloc_unknown_size(0);
227 3 : ldv_1_ldv_param_4_3_default = ldv_xmalloc_unknown_size(0);
228 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
229 :
230 : /* LDV {"action": "WRITE", "type": "CALL_BEGIN", "callback": true, "comment": "Write data to the device. Invoke callback write from FILE_OPERATIONS."} */
231 : /* Callback pre-call */
232 2 : ldv_assume(ldv_1_size_cnt_write_size <= (INT_MAX & PAGE_CACHE_MASK));
233 3 : if (ldv_1_container_file_operations->write) {
234 : /* 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"} */
235 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);
236 : }
237 : /* LDV {"action": "WRITE", "type": "CALL_END"} */
238 :
239 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
240 4 : ldv_free(ldv_1_ldv_param_4_1_default);
241 2 : ldv_free(ldv_1_ldv_param_4_3_default);
242 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
243 :
244 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Device file is opened, ready to read and write."} */
245 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
246 :
247 : /* Jump to a subprocess 'call' initial state */
248 1 : goto ldv_call_1;
249 1 : break;
250 : }
251 3 : case 2: {
252 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "comment": "Call callback 'callback' of a process 'character_driver_scenario' of an interface category 'file_operations'"} */
253 : /* Skip callback without implementations */
254 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
255 :
256 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Device file is opened, ready to read and write."} */
257 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
258 :
259 : /* Jump to a subprocess 'call' initial state */
260 1 : goto ldv_call_1;
261 : /* Jump to a subprocess 'call' initial state */
262 : goto ldv_call_1;
263 1 : break;
264 : }
265 3 : case 3: {
266 : /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "comment": "Call callback 'release' of a process 'character_driver_scenario' of an interface category 'file_operations'"} */
267 : /* Skip callback without implementations */
268 : /* LDV {"action": "RELEASE", "type": "CALL_END"} */
269 :
270 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Device appeared in the system."} */
271 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
272 :
273 : /* Jump to a subprocess 'main' initial state */
274 1 : goto ldv_main_1;
275 1 : break;
276 : }
277 2 : default: ldv_stop();
278 1 : }
279 0 : /* End of the subprocess 'call' */
280 0 : return;
281 : /* LDV {"comment": "End of control function based on process 'character_driver_scenario(file_operations)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_character_driver_scenario_1"} */
282 : }
283 :
284 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_probe_1_13 */
285 : int ldv_character_driver_scenario_probe_1_13(int (*arg0)(struct inode *, struct file *), struct inode *arg1, struct file *arg2) {
286 3 : return ((& unix_seq_open))(arg1, arg2);
287 : }
288 1 :
289 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_write_1_4 */
290 : 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) {
291 1 : (*arg0)(arg1, arg2, arg3, arg4);
292 1 : }
293 :
294 : /* AUX_FUNC ldv_dispatch_default_deregister_1_6_4 */
295 : void ldv_dispatch_default_deregister_1_6_4() {
296 : struct ldv_struct_insmod_6 *cf_arg_1;
297 : /* Skip thread join call */
298 1 : return;
299 : }
300 :
301 : /* AUX_FUNC ldv_dispatch_default_deregister_2_6_5 */
302 : void ldv_dispatch_default_deregister_2_6_5() {
303 : struct ldv_struct_insmod_6 *cf_arg_2;
304 : struct ldv_struct_insmod_6 *cf_arg_3;
305 : /* Skip thread join call */
306 : /* Skip thread join call */
307 1 : return;
308 : }
309 :
310 : /* AUX_FUNC ldv_dispatch_default_deregister_4_6_6 */
311 : void ldv_dispatch_default_deregister_4_6_6() {
312 : struct ldv_struct_insmod_6 *cf_arg_4;
313 : /* Skip thread join call */
314 1 : return;
315 : }
316 :
317 : /* AUX_FUNC ldv_dispatch_default_deregister_5_6_7 */
318 : void ldv_dispatch_default_deregister_5_6_7() {
319 : struct ldv_struct_insmod_6 *cf_arg_5;
320 : /* Skip thread join call */
321 1 : return;
322 : }
323 :
324 : /* AUX_FUNC ldv_dispatch_default_register_1_6_10 */
325 : void ldv_dispatch_default_register_1_6_10() {
326 : struct ldv_struct_insmod_6 *cf_arg_1;
327 4 : cf_arg_1 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_6));
328 3 : ldv_character_driver_scenario_1(cf_arg_1);
329 1 : return;
330 : }
331 :
332 : /* AUX_FUNC ldv_dispatch_default_register_4_6_9 */
333 : void ldv_dispatch_default_register_4_6_9() {
334 : struct ldv_struct_insmod_6 *cf_arg_4;
335 4 : cf_arg_4 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_6));
336 3 : ldv_traverse_kernel_items_scenario_4(cf_arg_4);
337 1 : return;
338 : }
339 :
340 : /* AUX_FUNC ldv_dispatch_default_register_5_6_8 */
341 : void ldv_dispatch_default_register_5_6_8() {
342 : struct ldv_struct_insmod_6 *cf_arg_5;
343 4 : cf_arg_5 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_6));
344 3 : ldv_random_containerless_scenario_5(cf_arg_5);
345 1 : return;
346 : }
347 :
348 : /* AUX_FUNC ldv_dispatch_insmod_deregister_8_2 */
349 : void ldv_dispatch_insmod_deregister_8_2() {
350 : struct ldv_struct_insmod_6 *cf_arg_6;
351 : /* Skip thread join call */
352 1 : return;
353 : }
354 :
355 : /* AUX_FUNC ldv_dispatch_insmod_register_8_3 */
356 : void ldv_dispatch_insmod_register_8_3() {
357 : struct ldv_struct_insmod_6 *cf_arg_6;
358 4 : cf_arg_6 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_6));
359 4 : ldv_insmod_6(cf_arg_6);
360 1 : return;
361 : }
362 :
363 : /* AUX_FUNC ldv_insmod_6 */
364 : void ldv_insmod_6(void *arg0) {
365 : /* LDV {"thread": 6, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'insmod(artificial)'", "function": "ldv_insmod_6"} */
366 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
367 1 : void (*ldv_6_af_unix_exit_default)(void);
368 1 : int (*ldv_6_af_unix_init_default)(void);
369 1 : int ldv_6_ret_default;
370 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
371 : /* LDV {"action": "INSMOD_REGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module initialization."} */
372 2 : ldv_free(arg0);
373 : /* LDV {"action": "INSMOD_REGISTER", "type": "RECEIVE_END"} */
374 :
375 : /* LDV {"action": "AF_UNIX_INIT", "type": "CALL_BEGIN", "callback": true, "comment": "Initialize the module after insmod with 'af_unix_init' function. Invoke callback af_unix_init from ARTIFICIAL."} */
376 : /* LDV {"type": "CALLBACK", "call": "ldv_6_ret_default = (af_unix_init)();", "comment": "af_unix_init"} */
377 2 : ldv_6_ret_default = ldv_insmod_af_unix_init_6_14(ldv_6_af_unix_init_default);
378 : /* Callback post-call */
379 2 : ldv_6_ret_default = ldv_post_init(ldv_6_ret_default);
380 : /* LDV {"action": "AF_UNIX_INIT", "type": "CALL_END"} */
381 :
382 4 : if (ldv_undef_int()) {
383 : /* LDV {"action": "INIT_FAILED", "type": "CONDITION_BEGIN", "comment": "Failed to initialize the module."} */
384 2 : ldv_assume(ldv_6_ret_default != 0);
385 : /* LDV {"action": "INIT_FAILED", "type": "CONDITION_END"} */
386 :
387 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module exit."} */
388 : /* Skip a non-replicative signal receiving */
389 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_END"} */
390 :
391 : /* Exit function at a terminal state */
392 1 : return;
393 : }
394 : else {
395 : /* LDV {"action": "INIT_SUCCESS", "type": "CONDITION_BEGIN", "comment": "Module has been initialized."} */
396 2 : ldv_assume(ldv_6_ret_default == 0);
397 : /* LDV {"action": "INIT_SUCCESS", "type": "CONDITION_END"} */
398 :
399 4 : if (ldv_undef_int()) {
400 : /* LDV {"action": "DEFAULT_REGISTER_1", "type": "DISPATCH_BEGIN", "comment": "Register 'FILE_OPERATIONS' callbacks with unknown registration function."} */
401 2 : ldv_dispatch_default_register_1_6_10();
402 : /* LDV {"action": "DEFAULT_REGISTER_1", "type": "DISPATCH_END"} */
403 :
404 : /* LDV {"action": "DEFAULT_REGISTER_4", "type": "DISPATCH_BEGIN", "comment": "Register 'SEQ_OPERATIONS' callbacks with unknown registration function."} */
405 2 : ldv_dispatch_default_register_4_6_9();
406 : /* LDV {"action": "DEFAULT_REGISTER_4", "type": "DISPATCH_END"} */
407 :
408 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "DISPATCH_BEGIN", "comment": "Register 'STRUCT_PERNET_OPERATIONS' callbacks with unknown registration function."} */
409 2 : ldv_dispatch_default_register_5_6_8();
410 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "DISPATCH_END"} */
411 :
412 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "DISPATCH_BEGIN", "comment": "Deregister 'STRUCT_PERNET_OPERATIONS' callbacks with unknown deregistration function."} */
413 2 : ldv_dispatch_default_deregister_5_6_7();
414 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "DISPATCH_END"} */
415 :
416 : /* LDV {"action": "DEFAULT_DEREGISTER_4", "type": "DISPATCH_BEGIN", "comment": "Deregister 'SEQ_OPERATIONS' callbacks with unknown deregistration function."} */
417 2 : ldv_dispatch_default_deregister_4_6_6();
418 : /* LDV {"action": "DEFAULT_DEREGISTER_4", "type": "DISPATCH_END"} */
419 :
420 : /* LDV {"action": "DEFAULT_DEREGISTER_2", "type": "DISPATCH_BEGIN", "comment": "Deregister 'PROTO' callbacks with unknown deregistration function."} */
421 2 : ldv_dispatch_default_deregister_2_6_5();
422 : /* LDV {"action": "DEFAULT_DEREGISTER_2", "type": "DISPATCH_END"} */
423 :
424 : /* LDV {"action": "DEFAULT_DEREGISTER_1", "type": "DISPATCH_BEGIN", "comment": "Deregister 'FILE_OPERATIONS' callbacks with unknown deregistration function."} */
425 2 : ldv_dispatch_default_deregister_1_6_4();
426 : /* LDV {"action": "DEFAULT_DEREGISTER_1", "type": "DISPATCH_END"} */
427 :
428 : }
429 : else {
430 : /* LDV {"action": "NONE", "type": "CONDITION_BEGIN", "comment": "Skip default callbacks registrations and deregistrations."} */
431 : /* LDV {"action": "NONE", "type": "CONDITION_END"} */
432 :
433 : }
434 : /* LDV {"action": "AF_UNIX_EXIT", "type": "CALL_BEGIN", "callback": true, "comment": "Exit the module before its unloading with 'af_unix_exit' function. Invoke callback af_unix_exit from ARTIFICIAL."} */
435 : /* LDV {"type": "CALLBACK", "call": "(af_unix_exit)();", "comment": "af_unix_exit"} */
436 4 : ldv_insmod_af_unix_exit_6_2(ldv_6_af_unix_exit_default);
437 : /* LDV {"action": "AF_UNIX_EXIT", "type": "CALL_END"} */
438 :
439 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module exit."} */
440 : /* Skip a non-replicative signal receiving */
441 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_END"} */
442 :
443 : /* Exit function at a terminal state */
444 1 : return;
445 : }
446 : /* End of the process */
447 : return;
448 : /* LDV {"comment": "End of control function based on process 'insmod(artificial)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_insmod_6"} */
449 : }
450 :
451 : /* AUX_FUNC_CALLBACK ldv_insmod_af_unix_exit_6_2 */
452 : void ldv_insmod_af_unix_exit_6_2(void (*arg0)(void)) {
453 4 : (af_unix_exit)();
454 2 : }
455 :
456 : /* AUX_FUNC_CALLBACK ldv_insmod_af_unix_init_6_14 */
457 : int ldv_insmod_af_unix_init_6_14(int (*arg0)(void)) {
458 3 : return (af_unix_init)();
459 1 : }
460 :
461 : /* AUX_FUNC ldv_main_8 */
462 : void ldv_main_8(void *arg0) {
463 : /* LDV {"thread": 8, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'main(main)'", "function": "ldv_main_8"} */
464 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
465 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
466 : /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Initialize rule models."} */
467 1 : ldv_initialize();
468 : /* LDV {"action": "INIT", "type": "CONDITION_END"} */
469 :
470 : /* LDV {"action": "INSMOD_REGISTER", "type": "DISPATCH_BEGIN", "comment": "Start environment model scenarios."} */
471 2 : ldv_dispatch_insmod_register_8_3();
472 : /* LDV {"action": "INSMOD_REGISTER", "type": "DISPATCH_END"} */
473 :
474 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "Stop environment model scenarios."} */
475 2 : ldv_dispatch_insmod_deregister_8_2();
476 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "DISPATCH_END"} */
477 :
478 : /* LDV {"action": "FINAL", "type": "CONDITION_BEGIN", "comment": "Check rule model state at the exit."} */
479 1 : ldv_check_final_state();
480 1 : ldv_stop();
481 : /* LDV {"action": "FINAL", "type": "CONDITION_END"} */
482 :
483 : /* Exit function at a terminal state */
484 0 : return;
485 : /* End of the process */
486 : return;
487 : /* LDV {"comment": "End of control function based on process 'main(main)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_main_8"} */
488 : }
489 :
490 : /* AUX_FUNC ldv_random_containerless_scenario_5 */
491 : void ldv_random_containerless_scenario_5(void *arg0) {
492 : /* LDV {"thread": 5, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_pernet_operations)'", "function": "ldv_random_containerless_scenario_5"} */
493 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
494 1 : void (*ldv_5_callback_exit)(struct net *);
495 1 : int (*ldv_5_callback_init)(struct net *);
496 1 : struct net *ldv_5_container_struct_net_ptr;
497 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
498 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_PERNET_OPERATIONS callbacks invocations scenario."} */
499 2 : ldv_free(arg0);
500 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_END"} */
501 :
502 : /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
503 3 : ldv_5_container_struct_net_ptr = ldv_xmalloc_unknown_size(0);
504 : /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_END"} */
505 :
506 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
507 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
508 :
509 : /* Jump to a subprocess 'call' initial state */
510 1 : goto ldv_call_5;
511 : /* End of the process */
512 : return;
513 1 :
514 : /* Sbprocess call */
515 : ldv_call_5:
516 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
517 :
518 2 : switch (ldv_undef_int()) {
519 3 : case 1: {
520 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback init from pernet_operations."} */
521 : /* LDV {"type": "CALLBACK", "call": "((& unix_net_init))(ldv_5_container_struct_net_ptr);", "comment": "callback"} */
522 2 : ldv_random_containerless_scenario_callback_5_8(ldv_5_callback_init, ldv_5_container_struct_net_ptr);
523 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
524 :
525 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
526 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
527 :
528 : /* Jump to a subprocess 'call' initial state */
529 1 : goto ldv_call_5;
530 1 : break;
531 : }
532 3 : case 2: {
533 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback exit from pernet_operations."} */
534 : /* LDV {"type": "CALLBACK", "call": "((& unix_net_exit))(ldv_5_container_struct_net_ptr);", "comment": "callback"} */
535 2 : ldv_random_containerless_scenario_callback_5_4(ldv_5_callback_exit, ldv_5_container_struct_net_ptr);
536 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
537 :
538 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
539 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
540 :
541 : /* Jump to a subprocess 'call' initial state */
542 1 : goto ldv_call_5;
543 : /* Jump to a subprocess 'call' initial state */
544 : goto ldv_call_5;
545 1 : break;
546 : }
547 3 : case 3: {
548 : /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
549 2 : ldv_free(ldv_5_container_struct_net_ptr);
550 : /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_END"} */
551 :
552 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_PERNET_OPERATIONS callbacks invocations scenario."} */
553 : /* Skip a non-replicative signal receiving */
554 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_END"} */
555 :
556 : /* Exit function at a terminal state */
557 1 : return;
558 1 : break;
559 : }
560 2 : default: ldv_stop();
561 1 : }
562 0 : /* End of the subprocess 'call' */
563 0 : return;
564 : /* 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"} */
565 : }
566 :
567 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_5_4 */
568 : void ldv_random_containerless_scenario_callback_5_4(void (*arg0)(struct net *), struct net *arg1) {
569 2 : ((& unix_net_exit))(arg1);
570 1 : }
571 :
572 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_5_8 */
573 : void ldv_random_containerless_scenario_callback_5_8(int (*arg0)(struct net *), struct net *arg1) {
574 3 : ((& unix_net_init))(arg1);
575 1 : }
576 :
577 : /* AUX_FUNC ldv_random_proto_scenario_2 */
578 : void ldv_random_proto_scenario_2(void *arg0) {
579 : /* LDV {"thread": 2, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_proto_scenario(proto)'", "function": "ldv_random_proto_scenario_2"} */
580 0 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
581 0 : int (*ldv_2_callback_accept)(struct socket *, struct socket *, int);
582 0 : int (*ldv_2_callback_connect)(struct socket *, struct sockaddr *, int, int);
583 0 : int (*ldv_2_callback_create)(struct net *, struct socket *, int, int);
584 0 : int (*ldv_2_callback_getname)(struct socket *, struct sockaddr *, pid_t *, int);
585 0 : int (*ldv_2_callback_getsockopt)(struct socket *, int, int, char *, pid_t *);
586 0 : int (*ldv_2_callback_ioctl)(struct socket *, unsigned int, long unsigned int);
587 0 : int (*ldv_2_callback_listen)(struct socket *, int);
588 0 : loff_t (*ldv_2_callback_llseek)(struct file *, loff_t , int);
589 0 : int (*ldv_2_callback_mmap)(struct file *, struct socket *, struct vm_area_struct *);
590 0 : int (*ldv_2_callback_open)(struct inode *, struct file *);
591 0 : unsigned int (*ldv_2_callback_poll)(struct file *, struct socket *, poll_table *);
592 0 : int (*ldv_2_callback_probe)(struct socket *, struct sockaddr *, int);
593 0 : ssize_t (*ldv_2_callback_read)(struct file *, char *, size_t , loff_t *);
594 : int (*ldv_2_callback_recvmsg)(struct kiocb *, struct socket *, struct msghdr *, size_t , int);
595 0 : int (*ldv_2_callback_release)(struct socket *);
596 0 : int (*ldv_2_callback_sendmsg)(struct kiocb *, struct socket *, struct msghdr *, size_t );
597 : ssize_t (*ldv_2_callback_sendpage)(struct socket *, struct page *, int, size_t , int);
598 0 : int (*ldv_2_callback_setsockopt)(struct socket *, int, int, char *, unsigned int);
599 : int (*ldv_2_callback_shutdown)(struct socket *, int);
600 0 : int (*ldv_2_callback_socketpair)(struct socket *, struct socket *);
601 0 : struct socket *ldv_2_container_socket;
602 0 : struct file *ldv_2_container_struct_file_ptr;
603 0 : struct inode *ldv_2_container_struct_inode_ptr;
604 0 : struct kiocb *ldv_2_container_struct_kiocb_ptr;
605 0 : struct msghdr *ldv_2_container_struct_msghdr_ptr;
606 0 : struct net *ldv_2_container_struct_net_ptr;
607 0 : struct page *ldv_2_container_struct_page_ptr;
608 0 : struct poll_table_struct *ldv_2_container_struct_poll_table_struct_ptr;
609 0 : struct sockaddr *ldv_2_container_struct_sockaddr_ptr;
610 0 : struct vm_area_struct *ldv_2_container_struct_vm_area_struct_ptr;
611 0 : int ldv_2_ldv_param_12_2_default;
612 0 : int ldv_2_ldv_param_12_3_default;
613 0 : int *ldv_2_ldv_param_15_2_default;
614 0 : int ldv_2_ldv_param_15_3_default;
615 0 : int ldv_2_ldv_param_18_1_default;
616 0 : int ldv_2_ldv_param_18_2_default;
617 0 : char *ldv_2_ldv_param_18_3_default;
618 0 : int *ldv_2_ldv_param_18_4_default;
619 0 : unsigned int ldv_2_ldv_param_21_1_default;
620 0 : long unsigned int ldv_2_ldv_param_21_2_default;
621 0 : int ldv_2_ldv_param_24_1_default;
622 0 : long long int ldv_2_ldv_param_27_1_default;
623 0 : int ldv_2_ldv_param_27_2_default;
624 0 : int ldv_2_ldv_param_33_2_default;
625 0 : char *ldv_2_ldv_param_36_1_default;
626 0 : long unsigned int ldv_2_ldv_param_36_2_default;
627 0 : long long int *ldv_2_ldv_param_36_3_default;
628 0 : long unsigned int ldv_2_ldv_param_39_3_default;
629 0 : int ldv_2_ldv_param_39_4_default;
630 0 : long unsigned int ldv_2_ldv_param_43_3_default;
631 0 : int ldv_2_ldv_param_46_2_default;
632 0 : long unsigned int ldv_2_ldv_param_46_3_default;
633 0 : int ldv_2_ldv_param_46_4_default;
634 0 : int ldv_2_ldv_param_49_1_default;
635 0 : int ldv_2_ldv_param_49_2_default;
636 0 : char *ldv_2_ldv_param_49_3_default;
637 0 : unsigned int ldv_2_ldv_param_49_4_default;
638 0 : struct socket *ldv_2_ldv_param_4_1_default;
639 0 : int ldv_2_ldv_param_4_2_default;
640 0 : int ldv_2_ldv_param_52_1_default;
641 0 : struct socket *ldv_2_ldv_param_55_1_default;
642 0 : int ldv_2_ldv_param_9_2_default;
643 0 : int ldv_2_ldv_param_9_3_default;
644 0 : /* Received labels */
645 0 : struct ldv_struct_random_proto_scenario_2 *data = (struct ldv_struct_random_proto_scenario_2*) arg0;
646 0 :
647 0 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
648 0 : /* LDV {"action": "REGISTER", "type": "RECEIVE_BEGIN", "comment": "Begin PROTO callbacks invocations scenario."} */
649 0 : /* Assign recieved labels */
650 0 : if (data) {
651 0 : ldv_2_container_struct_net_ptr = data->arg0;
652 0 : ldv_free(data);
653 0 : }
654 0 : /* LDV {"action": "REGISTER", "type": "RECEIVE_END"} */
655 0 :
656 0 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
657 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
658 :
659 : /* Jump to a subprocess 'call' initial state */
660 0 : goto ldv_call_2;
661 : /* End of the process */
662 : return;
663 0 :
664 : /* Sbprocess call */
665 : ldv_call_2:
666 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
667 :
668 0 : if (ldv_undef_int()) {
669 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
670 0 : ldv_2_ldv_param_4_1_default = ldv_xmalloc_unknown_size(0);
671 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
672 :
673 0 : switch (ldv_undef_int()) {
674 0 : case 1: {
675 : /* LDV {"action": "PRE_CALL_55", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
676 0 : ldv_2_ldv_param_55_1_default = ldv_xmalloc_unknown_size(0);
677 : /* LDV {"action": "PRE_CALL_55", "type": "CONDITION_END"} */
678 :
679 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback socketpair from proto_ops."} */
680 : /* LDV {"type": "CALLBACK", "call": "((& unix_socketpair))(ldv_2_container_socket, ldv_2_ldv_param_55_1_default);", "comment": "callback"} */
681 0 : ldv_random_proto_scenario_callback_2_55(ldv_2_callback_socketpair, ldv_2_container_socket, ldv_2_ldv_param_55_1_default);
682 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
683 :
684 : /* LDV {"action": "POST_CALL_55", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
685 0 : ldv_free(ldv_2_ldv_param_55_1_default);
686 : /* LDV {"action": "POST_CALL_55", "type": "CONDITION_END"} */
687 :
688 0 : break;
689 0 : }
690 0 : case 2: {
691 : /* LDV {"action": "PRE_CALL_52", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
692 : /* LDV {"action": "PRE_CALL_52", "type": "CONDITION_END"} */
693 :
694 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback shutdown from proto_ops."} */
695 : /* LDV {"type": "CALLBACK", "call": "((& unix_shutdown))(ldv_2_container_socket, ldv_2_ldv_param_52_1_default);", "comment": "callback"} */
696 0 : ldv_random_proto_scenario_callback_2_52(ldv_2_callback_shutdown, ldv_2_container_socket, ldv_2_ldv_param_52_1_default);
697 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
698 :
699 : /* LDV {"action": "POST_CALL_52", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
700 : /* LDV {"action": "POST_CALL_52", "type": "CONDITION_END"} */
701 :
702 0 : break;
703 0 : }
704 0 : case 3: {
705 : /* LDV {"action": "PRE_CALL_49", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
706 0 : ldv_2_ldv_param_49_3_default = ldv_xmalloc_unknown_size(0);
707 : /* LDV {"action": "PRE_CALL_49", "type": "CONDITION_END"} */
708 :
709 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback setsockopt from proto_ops."} */
710 : /* LDV {"type": "CALLBACK", "call": "((& sock_no_setsockopt))(ldv_2_container_socket, ldv_2_ldv_param_49_1_default, ldv_2_ldv_param_49_2_default, ldv_2_ldv_param_49_3_default, ldv_2_ldv_param_49_4_default);", "comment": "callback"} */
711 0 : ldv_random_proto_scenario_callback_2_49(ldv_2_callback_setsockopt, ldv_2_container_socket, ldv_2_ldv_param_49_1_default, ldv_2_ldv_param_49_2_default, ldv_2_ldv_param_49_3_default, ldv_2_ldv_param_49_4_default);
712 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
713 :
714 : /* LDV {"action": "POST_CALL_49", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
715 0 : ldv_free(ldv_2_ldv_param_49_3_default);
716 : /* LDV {"action": "POST_CALL_49", "type": "CONDITION_END"} */
717 :
718 0 : break;
719 0 : }
720 0 : case 4: {
721 : /* LDV {"action": "PRE_CALL_46", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
722 : /* LDV {"action": "PRE_CALL_46", "type": "CONDITION_END"} */
723 :
724 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback sendpage from proto_ops."} */
725 : /* LDV {"type": "CALLBACK", "call": "((& sock_no_sendpage))(ldv_2_container_socket, ldv_2_container_struct_page_ptr, ldv_2_ldv_param_46_2_default, ldv_2_ldv_param_46_3_default, ldv_2_ldv_param_46_4_default);", "comment": "callback"} */
726 0 : ldv_random_proto_scenario_callback_2_46(ldv_2_callback_sendpage, ldv_2_container_socket, ldv_2_container_struct_page_ptr, ldv_2_ldv_param_46_2_default, ldv_2_ldv_param_46_3_default, ldv_2_ldv_param_46_4_default);
727 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
728 :
729 : /* LDV {"action": "POST_CALL_46", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
730 : /* LDV {"action": "POST_CALL_46", "type": "CONDITION_END"} */
731 :
732 0 : break;
733 0 : }
734 0 : case 5: {
735 : /* LDV {"action": "PRE_CALL_43", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
736 : /* LDV {"action": "PRE_CALL_43", "type": "CONDITION_END"} */
737 :
738 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback sendmsg from proto_ops."} */
739 : /* LDV {"type": "CALLBACK", "call": "((& unix_seqpacket_sendmsg))(ldv_2_container_struct_kiocb_ptr, ldv_2_container_socket, ldv_2_container_struct_msghdr_ptr, ldv_2_ldv_param_43_3_default);", "comment": "callback"} */
740 0 : ldv_random_proto_scenario_callback_2_43(ldv_2_callback_sendmsg, ldv_2_container_struct_kiocb_ptr, ldv_2_container_socket, ldv_2_container_struct_msghdr_ptr, ldv_2_ldv_param_43_3_default);
741 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
742 :
743 : /* LDV {"action": "POST_CALL_43", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
744 : /* LDV {"action": "POST_CALL_43", "type": "CONDITION_END"} */
745 :
746 0 : break;
747 0 : }
748 0 : case 6: {
749 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback release from proto_ops."} */
750 : /* LDV {"type": "CALLBACK", "call": "((& unix_release))(ldv_2_container_socket);", "comment": "callback"} */
751 0 : ldv_random_proto_scenario_callback_2_42(ldv_2_callback_release, ldv_2_container_socket);
752 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
753 :
754 0 : break;
755 0 : }
756 0 : case 7: {
757 : /* LDV {"action": "PRE_CALL_39", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
758 : /* LDV {"action": "PRE_CALL_39", "type": "CONDITION_END"} */
759 :
760 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback recvmsg from proto_ops."} */
761 : /* LDV {"type": "CALLBACK", "call": "((& unix_seqpacket_recvmsg))(ldv_2_container_struct_kiocb_ptr, ldv_2_container_socket, ldv_2_container_struct_msghdr_ptr, ldv_2_ldv_param_39_3_default, ldv_2_ldv_param_39_4_default);", "comment": "callback"} */
762 0 : ldv_random_proto_scenario_callback_2_39(ldv_2_callback_recvmsg, ldv_2_container_struct_kiocb_ptr, ldv_2_container_socket, ldv_2_container_struct_msghdr_ptr, ldv_2_ldv_param_39_3_default, ldv_2_ldv_param_39_4_default);
763 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
764 :
765 : /* LDV {"action": "POST_CALL_39", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
766 : /* LDV {"action": "POST_CALL_39", "type": "CONDITION_END"} */
767 :
768 0 : break;
769 0 : }
770 0 : case 8: {
771 : /* LDV {"action": "PRE_CALL_36", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
772 0 : ldv_2_ldv_param_36_1_default = ldv_xmalloc_unknown_size(0);
773 0 : ldv_2_ldv_param_36_3_default = ldv_xmalloc_unknown_size(0);
774 : /* LDV {"action": "PRE_CALL_36", "type": "CONDITION_END"} */
775 :
776 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback read from file_operations."} */
777 : /* LDV {"type": "CALLBACK", "call": "((& seq_read))(ldv_2_container_struct_file_ptr, ldv_2_ldv_param_36_1_default, ldv_2_ldv_param_36_2_default, ldv_2_ldv_param_36_3_default);", "comment": "callback"} */
778 0 : ldv_random_proto_scenario_callback_2_36(ldv_2_callback_read, ldv_2_container_struct_file_ptr, ldv_2_ldv_param_36_1_default, ldv_2_ldv_param_36_2_default, ldv_2_ldv_param_36_3_default);
779 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
780 :
781 : /* LDV {"action": "POST_CALL_36", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
782 0 : ldv_free(ldv_2_ldv_param_36_1_default);
783 0 : ldv_free(ldv_2_ldv_param_36_3_default);
784 : /* LDV {"action": "POST_CALL_36", "type": "CONDITION_END"} */
785 :
786 0 : break;
787 0 : }
788 0 : case 9: {
789 : /* LDV {"action": "PRE_CALL_33", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
790 : /* LDV {"action": "PRE_CALL_33", "type": "CONDITION_END"} */
791 :
792 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback bind from proto_ops."} */
793 : /* LDV {"type": "CALLBACK", "call": "((& unix_bind))(ldv_2_container_socket, ldv_2_container_struct_sockaddr_ptr, ldv_2_ldv_param_33_2_default);", "comment": "callback"} */
794 0 : ldv_random_proto_scenario_callback_2_33(ldv_2_callback_probe, ldv_2_container_socket, ldv_2_container_struct_sockaddr_ptr, ldv_2_ldv_param_33_2_default);
795 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
796 :
797 : /* LDV {"action": "POST_CALL_33", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
798 : /* LDV {"action": "POST_CALL_33", "type": "CONDITION_END"} */
799 :
800 0 : break;
801 0 : }
802 0 : case 10: {
803 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback poll from proto_ops."} */
804 : /* LDV {"type": "CALLBACK", "call": "(( & unix_poll))(ldv_2_container_struct_file_ptr, ldv_2_container_socket, ldv_2_container_struct_poll_table_struct_ptr);", "comment": "callback"} */
805 0 : ldv_random_proto_scenario_callback_2_32(ldv_2_callback_poll, ldv_2_container_struct_file_ptr, ldv_2_container_socket, ldv_2_container_struct_poll_table_struct_ptr);
806 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
807 :
808 0 : break;
809 0 : }
810 0 : case 11: {
811 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback open from file_operations."} */
812 : /* LDV {"type": "CALLBACK", "call": "((& unix_seq_open))(ldv_2_container_struct_inode_ptr, ldv_2_container_struct_file_ptr);", "comment": "callback"} */
813 0 : ldv_random_proto_scenario_callback_2_31(ldv_2_callback_open, ldv_2_container_struct_inode_ptr, ldv_2_container_struct_file_ptr);
814 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
815 :
816 0 : break;
817 0 : }
818 0 : case 12: {
819 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback mmap from proto_ops."} */
820 : /* 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"} */
821 0 : ldv_random_proto_scenario_callback_2_30(ldv_2_callback_mmap, ldv_2_container_struct_file_ptr, ldv_2_container_socket, ldv_2_container_struct_vm_area_struct_ptr);
822 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
823 :
824 0 : break;
825 0 : }
826 0 : case 13: {
827 : /* LDV {"action": "PRE_CALL_27", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
828 : /* LDV {"action": "PRE_CALL_27", "type": "CONDITION_END"} */
829 :
830 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback llseek from file_operations."} */
831 : /* LDV {"type": "CALLBACK", "call": "((& seq_lseek))(ldv_2_container_struct_file_ptr, ldv_2_ldv_param_27_1_default, ldv_2_ldv_param_27_2_default);", "comment": "callback"} */
832 0 : ldv_random_proto_scenario_callback_2_27(ldv_2_callback_llseek, ldv_2_container_struct_file_ptr, ldv_2_ldv_param_27_1_default, ldv_2_ldv_param_27_2_default);
833 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
834 :
835 : /* LDV {"action": "POST_CALL_27", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
836 : /* LDV {"action": "POST_CALL_27", "type": "CONDITION_END"} */
837 :
838 0 : break;
839 0 : }
840 0 : case 14: {
841 : /* LDV {"action": "PRE_CALL_24", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
842 : /* LDV {"action": "PRE_CALL_24", "type": "CONDITION_END"} */
843 :
844 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback listen from proto_ops."} */
845 : /* LDV {"type": "CALLBACK", "call": "((& sock_no_listen))(ldv_2_container_socket, ldv_2_ldv_param_24_1_default);", "comment": "callback"} */
846 0 : ldv_random_proto_scenario_callback_2_24(ldv_2_callback_listen, ldv_2_container_socket, ldv_2_ldv_param_24_1_default);
847 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
848 :
849 : /* LDV {"action": "POST_CALL_24", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
850 : /* LDV {"action": "POST_CALL_24", "type": "CONDITION_END"} */
851 :
852 0 : break;
853 0 : }
854 0 : case 15: {
855 : /* LDV {"action": "PRE_CALL_21", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
856 : /* LDV {"action": "PRE_CALL_21", "type": "CONDITION_END"} */
857 :
858 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback ioctl from proto_ops."} */
859 : /* LDV {"type": "CALLBACK", "call": "((& unix_ioctl))(ldv_2_container_socket, ldv_2_ldv_param_21_1_default, ldv_2_ldv_param_21_2_default);", "comment": "callback"} */
860 0 : ldv_random_proto_scenario_callback_2_21(ldv_2_callback_ioctl, ldv_2_container_socket, ldv_2_ldv_param_21_1_default, ldv_2_ldv_param_21_2_default);
861 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
862 :
863 : /* LDV {"action": "POST_CALL_21", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
864 : /* LDV {"action": "POST_CALL_21", "type": "CONDITION_END"} */
865 :
866 0 : break;
867 0 : }
868 0 : case 16: {
869 : /* LDV {"action": "PRE_CALL_18", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
870 0 : ldv_2_ldv_param_18_3_default = ldv_xmalloc_unknown_size(0);
871 0 : ldv_2_ldv_param_18_4_default = ldv_xmalloc_unknown_size(0);
872 : /* LDV {"action": "PRE_CALL_18", "type": "CONDITION_END"} */
873 :
874 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback getsockopt from proto_ops."} */
875 : /* LDV {"type": "CALLBACK", "call": "((& sock_no_getsockopt))(ldv_2_container_socket, ldv_2_ldv_param_18_1_default, ldv_2_ldv_param_18_2_default, ldv_2_ldv_param_18_3_default, ldv_2_ldv_param_18_4_default);", "comment": "callback"} */
876 0 : ldv_random_proto_scenario_callback_2_18(ldv_2_callback_getsockopt, ldv_2_container_socket, ldv_2_ldv_param_18_1_default, ldv_2_ldv_param_18_2_default, ldv_2_ldv_param_18_3_default, ldv_2_ldv_param_18_4_default);
877 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
878 :
879 : /* LDV {"action": "POST_CALL_18", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
880 0 : ldv_free(ldv_2_ldv_param_18_3_default);
881 0 : ldv_free(ldv_2_ldv_param_18_4_default);
882 : /* LDV {"action": "POST_CALL_18", "type": "CONDITION_END"} */
883 :
884 0 : break;
885 0 : }
886 0 : case 17: {
887 : /* LDV {"action": "PRE_CALL_15", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
888 0 : ldv_2_ldv_param_15_2_default = ldv_xmalloc_unknown_size(0);
889 : /* LDV {"action": "PRE_CALL_15", "type": "CONDITION_END"} */
890 :
891 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback getname from proto_ops."} */
892 : /* LDV {"type": "CALLBACK", "call": "((& unix_getname))(ldv_2_container_socket, ldv_2_container_struct_sockaddr_ptr, ldv_2_ldv_param_15_2_default, ldv_2_ldv_param_15_3_default);", "comment": "callback"} */
893 0 : ldv_random_proto_scenario_callback_2_15(ldv_2_callback_getname, ldv_2_container_socket, ldv_2_container_struct_sockaddr_ptr, ldv_2_ldv_param_15_2_default, ldv_2_ldv_param_15_3_default);
894 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
895 :
896 : /* LDV {"action": "POST_CALL_15", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
897 0 : ldv_free(ldv_2_ldv_param_15_2_default);
898 : /* LDV {"action": "POST_CALL_15", "type": "CONDITION_END"} */
899 :
900 0 : break;
901 0 : }
902 0 : case 18: {
903 : /* LDV {"action": "PRE_CALL_12", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
904 : /* LDV {"action": "PRE_CALL_12", "type": "CONDITION_END"} */
905 :
906 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback create from net_proto_family."} */
907 : /* LDV {"type": "CALLBACK", "call": "((& unix_create))(ldv_2_container_struct_net_ptr, ldv_2_container_socket, ldv_2_ldv_param_12_2_default, ldv_2_ldv_param_12_3_default);", "comment": "callback"} */
908 0 : ldv_random_proto_scenario_callback_2_12(ldv_2_callback_create, ldv_2_container_struct_net_ptr, ldv_2_container_socket, ldv_2_ldv_param_12_2_default, ldv_2_ldv_param_12_3_default);
909 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
910 :
911 : /* LDV {"action": "POST_CALL_12", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
912 : /* LDV {"action": "POST_CALL_12", "type": "CONDITION_END"} */
913 :
914 0 : break;
915 0 : }
916 0 : case 19: {
917 : /* LDV {"action": "PRE_CALL_9", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
918 : /* LDV {"action": "PRE_CALL_9", "type": "CONDITION_END"} */
919 :
920 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback connect from proto_ops."} */
921 : /* LDV {"type": "CALLBACK", "call": "((& unix_dgram_connect))(ldv_2_container_socket, ldv_2_container_struct_sockaddr_ptr, ldv_2_ldv_param_9_2_default, ldv_2_ldv_param_9_3_default);", "comment": "callback"} */
922 0 : ldv_random_proto_scenario_callback_2_9(ldv_2_callback_connect, ldv_2_container_socket, ldv_2_container_struct_sockaddr_ptr, ldv_2_ldv_param_9_2_default, ldv_2_ldv_param_9_3_default);
923 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
924 :
925 : /* LDV {"action": "POST_CALL_9", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
926 : /* LDV {"action": "POST_CALL_9", "type": "CONDITION_END"} */
927 :
928 0 : break;
929 0 : }
930 0 : case 20: {
931 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback accept from proto_ops."} */
932 : /* 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"} */
933 0 : 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);
934 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
935 :
936 0 : break;
937 0 : }
938 0 : default: ldv_stop();
939 0 : }
940 0 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
941 0 : ldv_free(ldv_2_ldv_param_4_1_default);
942 0 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
943 :
944 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
945 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
946 :
947 : /* Jump to a subprocess 'call' initial state */
948 0 : goto ldv_call_2;
949 : }
950 : else {
951 : /* LDV {"action": "DEFAULT_FREE_2", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
952 0 : ldv_free(ldv_2_container_socket);
953 0 : ldv_free(ldv_2_container_struct_file_ptr);
954 0 : ldv_free(ldv_2_container_struct_inode_ptr);
955 0 : ldv_free(ldv_2_container_struct_kiocb_ptr);
956 0 : ldv_free(ldv_2_container_struct_msghdr_ptr);
957 0 : ldv_free(ldv_2_container_struct_net_ptr);
958 0 : ldv_free(ldv_2_container_struct_page_ptr);
959 0 : ldv_free(ldv_2_container_struct_poll_table_struct_ptr);
960 0 : ldv_free(ldv_2_container_struct_sockaddr_ptr);
961 0 : ldv_free(ldv_2_container_struct_vm_area_struct_ptr);
962 : /* LDV {"action": "DEFAULT_FREE_2", "type": "CONDITION_END"} */
963 :
964 : /* LDV {"action": "DEFAULT_DEREGISTER_2", "type": "RECEIVE_BEGIN", "comment": "Finish PROTO callbacks invocations scenario."} */
965 : /* Skip a non-replicative signal receiving */
966 : /* LDV {"action": "DEFAULT_DEREGISTER_2", "type": "RECEIVE_END"} */
967 :
968 : /* Exit function at a terminal state */
969 0 : return;
970 : }
971 : /* End of the subprocess 'call' */
972 : return;
973 : /* LDV {"comment": "End of control function based on process 'random_proto_scenario(proto)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_proto_scenario_2"} */
974 : }
975 :
976 : /* AUX_FUNC ldv_random_proto_scenario_3 */
977 : void ldv_random_proto_scenario_3(void *arg0) {
978 : /* LDV {"thread": 3, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_proto_scenario(proto)'", "function": "ldv_random_proto_scenario_3"} */
979 0 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
980 0 : int (*ldv_3_callback_accept)(struct socket *, struct socket *, int);
981 0 : int (*ldv_3_callback_connect)(struct socket *, struct sockaddr *, int, int);
982 0 : int (*ldv_3_callback_create)(struct net *, struct socket *, int, int);
983 0 : int (*ldv_3_callback_getname)(struct socket *, struct sockaddr *, pid_t *, int);
984 0 : int (*ldv_3_callback_getsockopt)(struct socket *, int, int, char *, pid_t *);
985 0 : int (*ldv_3_callback_ioctl)(struct socket *, unsigned int, long unsigned int);
986 0 : int (*ldv_3_callback_listen)(struct socket *, int);
987 0 : loff_t (*ldv_3_callback_llseek)(struct file *, loff_t , int);
988 0 : int (*ldv_3_callback_mmap)(struct file *, struct socket *, struct vm_area_struct *);
989 0 : int (*ldv_3_callback_open)(struct inode *, struct file *);
990 0 : unsigned int (*ldv_3_callback_poll)(struct file *, struct socket *, poll_table *);
991 0 : int (*ldv_3_callback_probe)(struct socket *, struct sockaddr *, int);
992 0 : ssize_t (*ldv_3_callback_read)(struct file *, char *, size_t , loff_t *);
993 : int (*ldv_3_callback_recvmsg)(struct kiocb *, struct socket *, struct msghdr *, size_t , int);
994 0 : int (*ldv_3_callback_release)(struct socket *);
995 0 : int (*ldv_3_callback_sendmsg)(struct kiocb *, struct socket *, struct msghdr *, size_t );
996 : ssize_t (*ldv_3_callback_sendpage)(struct socket *, struct page *, int, size_t , int);
997 0 : int (*ldv_3_callback_setsockopt)(struct socket *, int, int, char *, unsigned int);
998 : int (*ldv_3_callback_shutdown)(struct socket *, int);
999 0 : int (*ldv_3_callback_socketpair)(struct socket *, struct socket *);
1000 0 : struct socket *ldv_3_container_socket;
1001 0 : struct file *ldv_3_container_struct_file_ptr;
1002 0 : struct inode *ldv_3_container_struct_inode_ptr;
1003 0 : struct kiocb *ldv_3_container_struct_kiocb_ptr;
1004 0 : struct msghdr *ldv_3_container_struct_msghdr_ptr;
1005 0 : struct net *ldv_3_container_struct_net_ptr;
1006 0 : struct page *ldv_3_container_struct_page_ptr;
1007 0 : struct poll_table_struct *ldv_3_container_struct_poll_table_struct_ptr;
1008 0 : struct sockaddr *ldv_3_container_struct_sockaddr_ptr;
1009 0 : struct vm_area_struct *ldv_3_container_struct_vm_area_struct_ptr;
1010 0 : int ldv_3_ldv_param_12_2_default;
1011 0 : int ldv_3_ldv_param_12_3_default;
1012 0 : int *ldv_3_ldv_param_15_2_default;
1013 0 : int ldv_3_ldv_param_15_3_default;
1014 0 : int ldv_3_ldv_param_18_1_default;
1015 0 : int ldv_3_ldv_param_18_2_default;
1016 0 : char *ldv_3_ldv_param_18_3_default;
1017 0 : int *ldv_3_ldv_param_18_4_default;
1018 0 : unsigned int ldv_3_ldv_param_21_1_default;
1019 0 : long unsigned int ldv_3_ldv_param_21_2_default;
1020 0 : int ldv_3_ldv_param_24_1_default;
1021 0 : long long int ldv_3_ldv_param_27_1_default;
1022 0 : int ldv_3_ldv_param_27_2_default;
1023 0 : int ldv_3_ldv_param_33_2_default;
1024 0 : char *ldv_3_ldv_param_36_1_default;
1025 0 : long unsigned int ldv_3_ldv_param_36_2_default;
1026 0 : long long int *ldv_3_ldv_param_36_3_default;
1027 0 : long unsigned int ldv_3_ldv_param_39_3_default;
1028 0 : int ldv_3_ldv_param_39_4_default;
1029 0 : long unsigned int ldv_3_ldv_param_43_3_default;
1030 0 : int ldv_3_ldv_param_46_2_default;
1031 0 : long unsigned int ldv_3_ldv_param_46_3_default;
1032 0 : int ldv_3_ldv_param_46_4_default;
1033 0 : int ldv_3_ldv_param_49_1_default;
1034 0 : int ldv_3_ldv_param_49_2_default;
1035 0 : char *ldv_3_ldv_param_49_3_default;
1036 0 : unsigned int ldv_3_ldv_param_49_4_default;
1037 0 : struct socket *ldv_3_ldv_param_4_1_default;
1038 0 : int ldv_3_ldv_param_4_2_default;
1039 0 : int ldv_3_ldv_param_52_1_default;
1040 0 : struct socket *ldv_3_ldv_param_55_1_default;
1041 0 : int ldv_3_ldv_param_9_2_default;
1042 0 : int ldv_3_ldv_param_9_3_default;
1043 0 : /* Received labels */
1044 0 : struct ldv_struct_random_proto_scenario_2 *data = (struct ldv_struct_random_proto_scenario_2*) arg0;
1045 0 :
1046 0 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1047 0 : /* LDV {"action": "REGISTER", "type": "RECEIVE_BEGIN", "comment": "Begin PROTO callbacks invocations scenario."} */
1048 0 : /* Assign recieved labels */
1049 0 : if (data) {
1050 0 : ldv_3_container_struct_net_ptr = data->arg0;
1051 0 : ldv_free(data);
1052 0 : }
1053 0 : /* LDV {"action": "REGISTER", "type": "RECEIVE_END"} */
1054 0 :
1055 0 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1056 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1057 :
1058 : /* Jump to a subprocess 'call' initial state */
1059 0 : goto ldv_call_3;
1060 : /* End of the process */
1061 : return;
1062 0 :
1063 : /* Sbprocess call */
1064 : ldv_call_3:
1065 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1066 :
1067 0 : if (ldv_undef_int()) {
1068 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1069 0 : ldv_3_ldv_param_4_1_default = ldv_xmalloc_unknown_size(0);
1070 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
1071 :
1072 0 : switch (ldv_undef_int()) {
1073 0 : case 1: {
1074 : /* LDV {"action": "PRE_CALL_55", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1075 0 : ldv_3_ldv_param_55_1_default = ldv_xmalloc_unknown_size(0);
1076 : /* LDV {"action": "PRE_CALL_55", "type": "CONDITION_END"} */
1077 :
1078 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback socketpair from proto_ops."} */
1079 : /* LDV {"type": "CALLBACK", "call": "((& unix_socketpair))(ldv_3_container_socket, ldv_3_ldv_param_55_1_default);", "comment": "callback"} */
1080 0 : ldv_random_proto_scenario_callback_3_55(ldv_3_callback_socketpair, ldv_3_container_socket, ldv_3_ldv_param_55_1_default);
1081 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1082 :
1083 : /* LDV {"action": "POST_CALL_55", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1084 0 : ldv_free(ldv_3_ldv_param_55_1_default);
1085 : /* LDV {"action": "POST_CALL_55", "type": "CONDITION_END"} */
1086 :
1087 0 : break;
1088 0 : }
1089 0 : case 2: {
1090 : /* LDV {"action": "PRE_CALL_52", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1091 : /* LDV {"action": "PRE_CALL_52", "type": "CONDITION_END"} */
1092 :
1093 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback shutdown from proto_ops."} */
1094 : /* LDV {"type": "CALLBACK", "call": "((& unix_shutdown))(ldv_3_container_socket, ldv_3_ldv_param_52_1_default);", "comment": "callback"} */
1095 0 : ldv_random_proto_scenario_callback_3_52(ldv_3_callback_shutdown, ldv_3_container_socket, ldv_3_ldv_param_52_1_default);
1096 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1097 :
1098 : /* LDV {"action": "POST_CALL_52", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1099 : /* LDV {"action": "POST_CALL_52", "type": "CONDITION_END"} */
1100 :
1101 0 : break;
1102 0 : }
1103 0 : case 3: {
1104 : /* LDV {"action": "PRE_CALL_49", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1105 0 : ldv_3_ldv_param_49_3_default = ldv_xmalloc_unknown_size(0);
1106 : /* LDV {"action": "PRE_CALL_49", "type": "CONDITION_END"} */
1107 :
1108 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback setsockopt from proto_ops."} */
1109 : /* LDV {"type": "CALLBACK", "call": "((& sock_no_setsockopt))(ldv_3_container_socket, ldv_3_ldv_param_49_1_default, ldv_3_ldv_param_49_2_default, ldv_3_ldv_param_49_3_default, ldv_3_ldv_param_49_4_default);", "comment": "callback"} */
1110 0 : ldv_random_proto_scenario_callback_3_49(ldv_3_callback_setsockopt, ldv_3_container_socket, ldv_3_ldv_param_49_1_default, ldv_3_ldv_param_49_2_default, ldv_3_ldv_param_49_3_default, ldv_3_ldv_param_49_4_default);
1111 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1112 :
1113 : /* LDV {"action": "POST_CALL_49", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1114 0 : ldv_free(ldv_3_ldv_param_49_3_default);
1115 : /* LDV {"action": "POST_CALL_49", "type": "CONDITION_END"} */
1116 :
1117 0 : break;
1118 0 : }
1119 0 : case 4: {
1120 : /* LDV {"action": "PRE_CALL_46", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1121 : /* LDV {"action": "PRE_CALL_46", "type": "CONDITION_END"} */
1122 :
1123 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback sendpage from proto_ops."} */
1124 : /* LDV {"type": "CALLBACK", "call": "((& sock_no_sendpage))(ldv_3_container_socket, ldv_3_container_struct_page_ptr, ldv_3_ldv_param_46_2_default, ldv_3_ldv_param_46_3_default, ldv_3_ldv_param_46_4_default);", "comment": "callback"} */
1125 0 : ldv_random_proto_scenario_callback_3_46(ldv_3_callback_sendpage, ldv_3_container_socket, ldv_3_container_struct_page_ptr, ldv_3_ldv_param_46_2_default, ldv_3_ldv_param_46_3_default, ldv_3_ldv_param_46_4_default);
1126 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1127 :
1128 : /* LDV {"action": "POST_CALL_46", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1129 : /* LDV {"action": "POST_CALL_46", "type": "CONDITION_END"} */
1130 :
1131 0 : break;
1132 0 : }
1133 0 : case 5: {
1134 : /* LDV {"action": "PRE_CALL_43", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1135 : /* LDV {"action": "PRE_CALL_43", "type": "CONDITION_END"} */
1136 :
1137 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback sendmsg from proto_ops."} */
1138 : /* LDV {"type": "CALLBACK", "call": "((& unix_stream_sendmsg))(ldv_3_container_struct_kiocb_ptr, ldv_3_container_socket, ldv_3_container_struct_msghdr_ptr, ldv_3_ldv_param_43_3_default);", "comment": "callback"} */
1139 0 : ldv_random_proto_scenario_callback_3_43(ldv_3_callback_sendmsg, ldv_3_container_struct_kiocb_ptr, ldv_3_container_socket, ldv_3_container_struct_msghdr_ptr, ldv_3_ldv_param_43_3_default);
1140 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1141 :
1142 : /* LDV {"action": "POST_CALL_43", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1143 : /* LDV {"action": "POST_CALL_43", "type": "CONDITION_END"} */
1144 :
1145 0 : break;
1146 0 : }
1147 0 : case 6: {
1148 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback release from proto_ops."} */
1149 : /* LDV {"type": "CALLBACK", "call": "((& unix_release))(ldv_3_container_socket);", "comment": "callback"} */
1150 0 : ldv_random_proto_scenario_callback_3_42(ldv_3_callback_release, ldv_3_container_socket);
1151 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1152 :
1153 0 : break;
1154 0 : }
1155 0 : case 7: {
1156 : /* LDV {"action": "PRE_CALL_39", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1157 : /* LDV {"action": "PRE_CALL_39", "type": "CONDITION_END"} */
1158 :
1159 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback recvmsg from proto_ops."} */
1160 : /* LDV {"type": "CALLBACK", "call": "((& unix_stream_recvmsg))(ldv_3_container_struct_kiocb_ptr, ldv_3_container_socket, ldv_3_container_struct_msghdr_ptr, ldv_3_ldv_param_39_3_default, ldv_3_ldv_param_39_4_default);", "comment": "callback"} */
1161 0 : ldv_random_proto_scenario_callback_3_39(ldv_3_callback_recvmsg, ldv_3_container_struct_kiocb_ptr, ldv_3_container_socket, ldv_3_container_struct_msghdr_ptr, ldv_3_ldv_param_39_3_default, ldv_3_ldv_param_39_4_default);
1162 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1163 :
1164 : /* LDV {"action": "POST_CALL_39", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1165 : /* LDV {"action": "POST_CALL_39", "type": "CONDITION_END"} */
1166 :
1167 0 : break;
1168 0 : }
1169 0 : case 8: {
1170 : /* LDV {"action": "PRE_CALL_36", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1171 0 : ldv_3_ldv_param_36_1_default = ldv_xmalloc_unknown_size(0);
1172 0 : ldv_3_ldv_param_36_3_default = ldv_xmalloc_unknown_size(0);
1173 : /* LDV {"action": "PRE_CALL_36", "type": "CONDITION_END"} */
1174 :
1175 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback read from file_operations."} */
1176 : /* LDV {"type": "CALLBACK", "call": "((& seq_read))(ldv_3_container_struct_file_ptr, ldv_3_ldv_param_36_1_default, ldv_3_ldv_param_36_2_default, ldv_3_ldv_param_36_3_default);", "comment": "callback"} */
1177 0 : ldv_random_proto_scenario_callback_3_36(ldv_3_callback_read, ldv_3_container_struct_file_ptr, ldv_3_ldv_param_36_1_default, ldv_3_ldv_param_36_2_default, ldv_3_ldv_param_36_3_default);
1178 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1179 :
1180 : /* LDV {"action": "POST_CALL_36", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1181 0 : ldv_free(ldv_3_ldv_param_36_1_default);
1182 0 : ldv_free(ldv_3_ldv_param_36_3_default);
1183 : /* LDV {"action": "POST_CALL_36", "type": "CONDITION_END"} */
1184 :
1185 0 : break;
1186 0 : }
1187 0 : case 9: {
1188 : /* LDV {"action": "PRE_CALL_33", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1189 : /* LDV {"action": "PRE_CALL_33", "type": "CONDITION_END"} */
1190 :
1191 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback bind from proto_ops."} */
1192 : /* LDV {"type": "CALLBACK", "call": "((& unix_bind))(ldv_3_container_socket, ldv_3_container_struct_sockaddr_ptr, ldv_3_ldv_param_33_2_default);", "comment": "callback"} */
1193 0 : ldv_random_proto_scenario_callback_3_33(ldv_3_callback_probe, ldv_3_container_socket, ldv_3_container_struct_sockaddr_ptr, ldv_3_ldv_param_33_2_default);
1194 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1195 :
1196 : /* LDV {"action": "POST_CALL_33", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1197 : /* LDV {"action": "POST_CALL_33", "type": "CONDITION_END"} */
1198 :
1199 0 : break;
1200 0 : }
1201 0 : case 10: {
1202 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback poll from proto_ops."} */
1203 : /* LDV {"type": "CALLBACK", "call": "(( & unix_poll))(ldv_3_container_struct_file_ptr, ldv_3_container_socket, ldv_3_container_struct_poll_table_struct_ptr);", "comment": "callback"} */
1204 0 : ldv_random_proto_scenario_callback_3_32(ldv_3_callback_poll, ldv_3_container_struct_file_ptr, ldv_3_container_socket, ldv_3_container_struct_poll_table_struct_ptr);
1205 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1206 :
1207 0 : break;
1208 0 : }
1209 0 : case 11: {
1210 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback open from file_operations."} */
1211 : /* LDV {"type": "CALLBACK", "call": "((& unix_seq_open))(ldv_3_container_struct_inode_ptr, ldv_3_container_struct_file_ptr);", "comment": "callback"} */
1212 0 : ldv_random_proto_scenario_callback_3_31(ldv_3_callback_open, ldv_3_container_struct_inode_ptr, ldv_3_container_struct_file_ptr);
1213 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1214 :
1215 0 : break;
1216 0 : }
1217 0 : case 12: {
1218 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback mmap from proto_ops."} */
1219 : /* LDV {"type": "CALLBACK", "call": "((& sock_no_mmap))(ldv_3_container_struct_file_ptr, ldv_3_container_socket, ldv_3_container_struct_vm_area_struct_ptr);", "comment": "callback"} */
1220 0 : ldv_random_proto_scenario_callback_3_30(ldv_3_callback_mmap, ldv_3_container_struct_file_ptr, ldv_3_container_socket, ldv_3_container_struct_vm_area_struct_ptr);
1221 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1222 :
1223 0 : break;
1224 0 : }
1225 0 : case 13: {
1226 : /* LDV {"action": "PRE_CALL_27", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1227 : /* LDV {"action": "PRE_CALL_27", "type": "CONDITION_END"} */
1228 :
1229 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback llseek from file_operations."} */
1230 : /* LDV {"type": "CALLBACK", "call": "((& seq_lseek))(ldv_3_container_struct_file_ptr, ldv_3_ldv_param_27_1_default, ldv_3_ldv_param_27_2_default);", "comment": "callback"} */
1231 0 : ldv_random_proto_scenario_callback_3_27(ldv_3_callback_llseek, ldv_3_container_struct_file_ptr, ldv_3_ldv_param_27_1_default, ldv_3_ldv_param_27_2_default);
1232 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1233 :
1234 : /* LDV {"action": "POST_CALL_27", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1235 : /* LDV {"action": "POST_CALL_27", "type": "CONDITION_END"} */
1236 :
1237 0 : break;
1238 0 : }
1239 0 : case 14: {
1240 : /* LDV {"action": "PRE_CALL_24", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1241 : /* LDV {"action": "PRE_CALL_24", "type": "CONDITION_END"} */
1242 :
1243 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback listen from proto_ops."} */
1244 : /* LDV {"type": "CALLBACK", "call": "((& unix_listen))(ldv_3_container_socket, ldv_3_ldv_param_24_1_default);", "comment": "callback"} */
1245 0 : ldv_random_proto_scenario_callback_3_24(ldv_3_callback_listen, ldv_3_container_socket, ldv_3_ldv_param_24_1_default);
1246 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1247 :
1248 : /* LDV {"action": "POST_CALL_24", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1249 : /* LDV {"action": "POST_CALL_24", "type": "CONDITION_END"} */
1250 :
1251 0 : break;
1252 0 : }
1253 0 : case 15: {
1254 : /* LDV {"action": "PRE_CALL_21", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1255 : /* LDV {"action": "PRE_CALL_21", "type": "CONDITION_END"} */
1256 :
1257 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback ioctl from proto_ops."} */
1258 : /* LDV {"type": "CALLBACK", "call": "((& unix_ioctl))(ldv_3_container_socket, ldv_3_ldv_param_21_1_default, ldv_3_ldv_param_21_2_default);", "comment": "callback"} */
1259 0 : ldv_random_proto_scenario_callback_3_21(ldv_3_callback_ioctl, ldv_3_container_socket, ldv_3_ldv_param_21_1_default, ldv_3_ldv_param_21_2_default);
1260 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1261 :
1262 : /* LDV {"action": "POST_CALL_21", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1263 : /* LDV {"action": "POST_CALL_21", "type": "CONDITION_END"} */
1264 :
1265 0 : break;
1266 0 : }
1267 0 : case 16: {
1268 : /* LDV {"action": "PRE_CALL_18", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1269 0 : ldv_3_ldv_param_18_3_default = ldv_xmalloc_unknown_size(0);
1270 0 : ldv_3_ldv_param_18_4_default = ldv_xmalloc_unknown_size(0);
1271 : /* LDV {"action": "PRE_CALL_18", "type": "CONDITION_END"} */
1272 :
1273 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback getsockopt from proto_ops."} */
1274 : /* LDV {"type": "CALLBACK", "call": "((& sock_no_getsockopt))(ldv_3_container_socket, ldv_3_ldv_param_18_1_default, ldv_3_ldv_param_18_2_default, ldv_3_ldv_param_18_3_default, ldv_3_ldv_param_18_4_default);", "comment": "callback"} */
1275 0 : ldv_random_proto_scenario_callback_3_18(ldv_3_callback_getsockopt, ldv_3_container_socket, ldv_3_ldv_param_18_1_default, ldv_3_ldv_param_18_2_default, ldv_3_ldv_param_18_3_default, ldv_3_ldv_param_18_4_default);
1276 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1277 :
1278 : /* LDV {"action": "POST_CALL_18", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1279 0 : ldv_free(ldv_3_ldv_param_18_3_default);
1280 0 : ldv_free(ldv_3_ldv_param_18_4_default);
1281 : /* LDV {"action": "POST_CALL_18", "type": "CONDITION_END"} */
1282 :
1283 0 : break;
1284 0 : }
1285 0 : case 17: {
1286 : /* LDV {"action": "PRE_CALL_15", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1287 0 : ldv_3_ldv_param_15_2_default = ldv_xmalloc_unknown_size(0);
1288 : /* LDV {"action": "PRE_CALL_15", "type": "CONDITION_END"} */
1289 :
1290 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback getname from proto_ops."} */
1291 : /* LDV {"type": "CALLBACK", "call": "((& unix_getname))(ldv_3_container_socket, ldv_3_container_struct_sockaddr_ptr, ldv_3_ldv_param_15_2_default, ldv_3_ldv_param_15_3_default);", "comment": "callback"} */
1292 0 : ldv_random_proto_scenario_callback_3_15(ldv_3_callback_getname, ldv_3_container_socket, ldv_3_container_struct_sockaddr_ptr, ldv_3_ldv_param_15_2_default, ldv_3_ldv_param_15_3_default);
1293 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1294 :
1295 : /* LDV {"action": "POST_CALL_15", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1296 0 : ldv_free(ldv_3_ldv_param_15_2_default);
1297 : /* LDV {"action": "POST_CALL_15", "type": "CONDITION_END"} */
1298 :
1299 0 : break;
1300 0 : }
1301 0 : case 18: {
1302 : /* LDV {"action": "PRE_CALL_12", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1303 : /* LDV {"action": "PRE_CALL_12", "type": "CONDITION_END"} */
1304 :
1305 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback create from net_proto_family."} */
1306 : /* LDV {"type": "CALLBACK", "call": "((& unix_create))(ldv_3_container_struct_net_ptr, ldv_3_container_socket, ldv_3_ldv_param_12_2_default, ldv_3_ldv_param_12_3_default);", "comment": "callback"} */
1307 0 : ldv_random_proto_scenario_callback_3_12(ldv_3_callback_create, ldv_3_container_struct_net_ptr, ldv_3_container_socket, ldv_3_ldv_param_12_2_default, ldv_3_ldv_param_12_3_default);
1308 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1309 :
1310 : /* LDV {"action": "POST_CALL_12", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1311 : /* LDV {"action": "POST_CALL_12", "type": "CONDITION_END"} */
1312 :
1313 0 : break;
1314 0 : }
1315 0 : case 19: {
1316 : /* LDV {"action": "PRE_CALL_9", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1317 : /* LDV {"action": "PRE_CALL_9", "type": "CONDITION_END"} */
1318 :
1319 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback connect from proto_ops."} */
1320 : /* LDV {"type": "CALLBACK", "call": "((& unix_stream_connect))(ldv_3_container_socket, ldv_3_container_struct_sockaddr_ptr, ldv_3_ldv_param_9_2_default, ldv_3_ldv_param_9_3_default);", "comment": "callback"} */
1321 0 : ldv_random_proto_scenario_callback_3_9(ldv_3_callback_connect, ldv_3_container_socket, ldv_3_container_struct_sockaddr_ptr, ldv_3_ldv_param_9_2_default, ldv_3_ldv_param_9_3_default);
1322 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1323 :
1324 : /* LDV {"action": "POST_CALL_9", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1325 : /* LDV {"action": "POST_CALL_9", "type": "CONDITION_END"} */
1326 :
1327 0 : break;
1328 0 : }
1329 0 : case 20: {
1330 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback accept from proto_ops."} */
1331 : /* LDV {"type": "CALLBACK", "call": "((& unix_accept))(ldv_3_container_socket, ldv_3_ldv_param_4_1_default, ldv_3_ldv_param_4_2_default);", "comment": "callback"} */
1332 0 : ldv_random_proto_scenario_callback_3_4(ldv_3_callback_accept, ldv_3_container_socket, ldv_3_ldv_param_4_1_default, ldv_3_ldv_param_4_2_default);
1333 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1334 :
1335 0 : break;
1336 0 : }
1337 0 : default: ldv_stop();
1338 0 : }
1339 0 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1340 0 : ldv_free(ldv_3_ldv_param_4_1_default);
1341 0 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
1342 :
1343 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1344 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1345 :
1346 : /* Jump to a subprocess 'call' initial state */
1347 0 : goto ldv_call_3;
1348 : }
1349 : else {
1350 : /* LDV {"action": "DEFAULT_FREE_2", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
1351 0 : ldv_free(ldv_3_container_socket);
1352 0 : ldv_free(ldv_3_container_struct_file_ptr);
1353 0 : ldv_free(ldv_3_container_struct_inode_ptr);
1354 0 : ldv_free(ldv_3_container_struct_kiocb_ptr);
1355 0 : ldv_free(ldv_3_container_struct_msghdr_ptr);
1356 0 : ldv_free(ldv_3_container_struct_net_ptr);
1357 0 : ldv_free(ldv_3_container_struct_page_ptr);
1358 0 : ldv_free(ldv_3_container_struct_poll_table_struct_ptr);
1359 0 : ldv_free(ldv_3_container_struct_sockaddr_ptr);
1360 0 : ldv_free(ldv_3_container_struct_vm_area_struct_ptr);
1361 : /* LDV {"action": "DEFAULT_FREE_2", "type": "CONDITION_END"} */
1362 :
1363 : /* LDV {"action": "DEFAULT_DEREGISTER_2", "type": "RECEIVE_BEGIN", "comment": "Finish PROTO callbacks invocations scenario."} */
1364 : /* Skip a non-replicative signal receiving */
1365 : /* LDV {"action": "DEFAULT_DEREGISTER_2", "type": "RECEIVE_END"} */
1366 :
1367 : /* Exit function at a terminal state */
1368 0 : return;
1369 : }
1370 : /* End of the subprocess 'call' */
1371 : return;
1372 : /* LDV {"comment": "End of control function based on process 'random_proto_scenario(proto)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_proto_scenario_3"} */
1373 : }
1374 :
1375 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_12 */
1376 : void ldv_random_proto_scenario_callback_2_12(int (*arg0)(struct net *, struct socket *, int, int), struct net *arg1, struct socket *arg2, int arg3, int arg4) {
1377 0 : ((& unix_create))(arg1, arg2, arg3, arg4);
1378 0 : }
1379 :
1380 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_15 */
1381 : void ldv_random_proto_scenario_callback_2_15(int (*arg0)(struct socket *, struct sockaddr *, pid_t *, int), struct socket *arg1, struct sockaddr *arg2, int *arg3, int arg4) {
1382 0 : ((& unix_getname))(arg1, arg2, arg3, arg4);
1383 0 : }
1384 :
1385 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_18 */
1386 : void ldv_random_proto_scenario_callback_2_18(int (*arg0)(struct socket *, int, int, char *, pid_t *), struct socket *arg1, int arg2, int arg3, char *arg4, int *arg5) {
1387 0 : ((& sock_no_getsockopt))(arg1, arg2, arg3, arg4, arg5);
1388 0 : }
1389 :
1390 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_21 */
1391 : void ldv_random_proto_scenario_callback_2_21(int (*arg0)(struct socket *, unsigned int, long unsigned int), struct socket *arg1, unsigned int arg2, long unsigned int arg3) {
1392 0 : ((& unix_ioctl))(arg1, arg2, arg3);
1393 0 : }
1394 :
1395 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_24 */
1396 : void ldv_random_proto_scenario_callback_2_24(int (*arg0)(struct socket *, int), struct socket *arg1, int arg2) {
1397 0 : ((& sock_no_listen))(arg1, arg2);
1398 0 : }
1399 :
1400 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_27 */
1401 : void ldv_random_proto_scenario_callback_2_27(loff_t (*arg0)(struct file *, loff_t , int), struct file *arg1, long long int arg2, int arg3) {
1402 0 : ((& seq_lseek))(arg1, arg2, arg3);
1403 0 : }
1404 :
1405 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_30 */
1406 : void ldv_random_proto_scenario_callback_2_30(int (*arg0)(struct file *, struct socket *, struct vm_area_struct *), struct file *arg1, struct socket *arg2, struct vm_area_struct *arg3) {
1407 0 : ((& sock_no_mmap))(arg1, arg2, arg3);
1408 0 : }
1409 :
1410 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_31 */
1411 : void ldv_random_proto_scenario_callback_2_31(int (*arg0)(struct inode *, struct file *), struct inode *arg1, struct file *arg2) {
1412 0 : ((& unix_seq_open))(arg1, arg2);
1413 0 : }
1414 :
1415 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_32 */
1416 : void ldv_random_proto_scenario_callback_2_32(unsigned int (*arg0)(struct file *, struct socket *, poll_table *), struct file *arg1, struct socket *arg2, struct poll_table_struct *arg3) {
1417 0 : (( & unix_poll))(arg1, arg2, arg3);
1418 0 : }
1419 :
1420 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_33 */
1421 : void ldv_random_proto_scenario_callback_2_33(int (*arg0)(struct socket *, struct sockaddr *, int), struct socket *arg1, struct sockaddr *arg2, int arg3) {
1422 0 : ((& unix_bind))(arg1, arg2, arg3);
1423 0 : }
1424 :
1425 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_36 */
1426 : void ldv_random_proto_scenario_callback_2_36(ssize_t (*arg0)(struct file *, char *, size_t , loff_t *), struct file *arg1, char *arg2, long unsigned int arg3, long long int *arg4) {
1427 0 : ((& seq_read))(arg1, arg2, arg3, arg4);
1428 0 : }
1429 :
1430 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_39 */
1431 : void ldv_random_proto_scenario_callback_2_39(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) {
1432 0 : ((& unix_seqpacket_recvmsg))(arg1, arg2, arg3, arg4, arg5);
1433 0 : }
1434 :
1435 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_4 */
1436 : void ldv_random_proto_scenario_callback_2_4(int (*arg0)(struct socket *, struct socket *, int), struct socket *arg1, struct socket *arg2, int arg3) {
1437 0 : ((& sock_no_accept))(arg1, arg2, arg3);
1438 0 : }
1439 :
1440 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_42 */
1441 : void ldv_random_proto_scenario_callback_2_42(int (*arg0)(struct socket *), struct socket *arg1) {
1442 0 : ((& unix_release))(arg1);
1443 0 : }
1444 :
1445 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_43 */
1446 : void ldv_random_proto_scenario_callback_2_43(int (*arg0)(struct kiocb *, struct socket *, struct msghdr *, size_t ), struct kiocb *arg1, struct socket *arg2, struct msghdr *arg3, long unsigned int arg4) {
1447 0 : ((& unix_seqpacket_sendmsg))(arg1, arg2, arg3, arg4);
1448 0 : }
1449 :
1450 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_46 */
1451 : void ldv_random_proto_scenario_callback_2_46(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) {
1452 0 : ((& sock_no_sendpage))(arg1, arg2, arg3, arg4, arg5);
1453 0 : }
1454 :
1455 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_49 */
1456 : void ldv_random_proto_scenario_callback_2_49(int (*arg0)(struct socket *, int, int, char *, unsigned int), struct socket *arg1, int arg2, int arg3, char *arg4, unsigned int arg5) {
1457 0 : ((& sock_no_setsockopt))(arg1, arg2, arg3, arg4, arg5);
1458 0 : }
1459 :
1460 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_52 */
1461 : void ldv_random_proto_scenario_callback_2_52(int (*arg0)(struct socket *, int), struct socket *arg1, int arg2) {
1462 0 : ((& unix_shutdown))(arg1, arg2);
1463 0 : }
1464 :
1465 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_55 */
1466 : void ldv_random_proto_scenario_callback_2_55(int (*arg0)(struct socket *, struct socket *), struct socket *arg1, struct socket *arg2) {
1467 0 : ((& unix_socketpair))(arg1, arg2);
1468 0 : }
1469 :
1470 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_2_9 */
1471 : void ldv_random_proto_scenario_callback_2_9(int (*arg0)(struct socket *, struct sockaddr *, int, int), struct socket *arg1, struct sockaddr *arg2, int arg3, int arg4) {
1472 0 : ((& unix_dgram_connect))(arg1, arg2, arg3, arg4);
1473 0 : }
1474 :
1475 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_3_12 */
1476 : void ldv_random_proto_scenario_callback_3_12(int (*arg0)(struct net *, struct socket *, int, int), struct net *arg1, struct socket *arg2, int arg3, int arg4) {
1477 0 : ((& unix_create))(arg1, arg2, arg3, arg4);
1478 0 : }
1479 :
1480 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_3_15 */
1481 : void ldv_random_proto_scenario_callback_3_15(int (*arg0)(struct socket *, struct sockaddr *, pid_t *, int), struct socket *arg1, struct sockaddr *arg2, int *arg3, int arg4) {
1482 0 : ((& unix_getname))(arg1, arg2, arg3, arg4);
1483 0 : }
1484 :
1485 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_3_18 */
1486 : void ldv_random_proto_scenario_callback_3_18(int (*arg0)(struct socket *, int, int, char *, pid_t *), struct socket *arg1, int arg2, int arg3, char *arg4, int *arg5) {
1487 0 : ((& sock_no_getsockopt))(arg1, arg2, arg3, arg4, arg5);
1488 0 : }
1489 :
1490 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_3_21 */
1491 : void ldv_random_proto_scenario_callback_3_21(int (*arg0)(struct socket *, unsigned int, long unsigned int), struct socket *arg1, unsigned int arg2, long unsigned int arg3) {
1492 0 : ((& unix_ioctl))(arg1, arg2, arg3);
1493 0 : }
1494 :
1495 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_3_24 */
1496 : void ldv_random_proto_scenario_callback_3_24(int (*arg0)(struct socket *, int), struct socket *arg1, int arg2) {
1497 0 : ((& unix_listen))(arg1, arg2);
1498 0 : }
1499 :
1500 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_3_27 */
1501 : void ldv_random_proto_scenario_callback_3_27(loff_t (*arg0)(struct file *, loff_t , int), struct file *arg1, long long int arg2, int arg3) {
1502 0 : ((& seq_lseek))(arg1, arg2, arg3);
1503 0 : }
1504 :
1505 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_3_30 */
1506 : void ldv_random_proto_scenario_callback_3_30(int (*arg0)(struct file *, struct socket *, struct vm_area_struct *), struct file *arg1, struct socket *arg2, struct vm_area_struct *arg3) {
1507 0 : ((& sock_no_mmap))(arg1, arg2, arg3);
1508 0 : }
1509 :
1510 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_3_31 */
1511 : void ldv_random_proto_scenario_callback_3_31(int (*arg0)(struct inode *, struct file *), struct inode *arg1, struct file *arg2) {
1512 0 : ((& unix_seq_open))(arg1, arg2);
1513 0 : }
1514 :
1515 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_3_32 */
1516 : void ldv_random_proto_scenario_callback_3_32(unsigned int (*arg0)(struct file *, struct socket *, poll_table *), struct file *arg1, struct socket *arg2, struct poll_table_struct *arg3) {
1517 0 : (( & unix_poll))(arg1, arg2, arg3);
1518 0 : }
1519 :
1520 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_3_33 */
1521 : void ldv_random_proto_scenario_callback_3_33(int (*arg0)(struct socket *, struct sockaddr *, int), struct socket *arg1, struct sockaddr *arg2, int arg3) {
1522 0 : ((& unix_bind))(arg1, arg2, arg3);
1523 0 : }
1524 :
1525 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_3_36 */
1526 : void ldv_random_proto_scenario_callback_3_36(ssize_t (*arg0)(struct file *, char *, size_t , loff_t *), struct file *arg1, char *arg2, long unsigned int arg3, long long int *arg4) {
1527 0 : ((& seq_read))(arg1, arg2, arg3, arg4);
1528 0 : }
1529 :
1530 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_3_39 */
1531 : void ldv_random_proto_scenario_callback_3_39(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) {
1532 0 : ((& unix_stream_recvmsg))(arg1, arg2, arg3, arg4, arg5);
1533 0 : }
1534 :
1535 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_3_4 */
1536 : void ldv_random_proto_scenario_callback_3_4(int (*arg0)(struct socket *, struct socket *, int), struct socket *arg1, struct socket *arg2, int arg3) {
1537 0 : ((& unix_accept))(arg1, arg2, arg3);
1538 0 : }
1539 :
1540 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_3_42 */
1541 : void ldv_random_proto_scenario_callback_3_42(int (*arg0)(struct socket *), struct socket *arg1) {
1542 0 : ((& unix_release))(arg1);
1543 0 : }
1544 :
1545 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_3_43 */
1546 : void ldv_random_proto_scenario_callback_3_43(int (*arg0)(struct kiocb *, struct socket *, struct msghdr *, size_t ), struct kiocb *arg1, struct socket *arg2, struct msghdr *arg3, long unsigned int arg4) {
1547 0 : ((& unix_stream_sendmsg))(arg1, arg2, arg3, arg4);
1548 0 : }
1549 :
1550 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_3_46 */
1551 : void ldv_random_proto_scenario_callback_3_46(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) {
1552 0 : ((& sock_no_sendpage))(arg1, arg2, arg3, arg4, arg5);
1553 0 : }
1554 :
1555 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_3_49 */
1556 : void ldv_random_proto_scenario_callback_3_49(int (*arg0)(struct socket *, int, int, char *, unsigned int), struct socket *arg1, int arg2, int arg3, char *arg4, unsigned int arg5) {
1557 0 : ((& sock_no_setsockopt))(arg1, arg2, arg3, arg4, arg5);
1558 0 : }
1559 :
1560 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_3_52 */
1561 : void ldv_random_proto_scenario_callback_3_52(int (*arg0)(struct socket *, int), struct socket *arg1, int arg2) {
1562 0 : ((& unix_shutdown))(arg1, arg2);
1563 0 : }
1564 :
1565 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_3_55 */
1566 : void ldv_random_proto_scenario_callback_3_55(int (*arg0)(struct socket *, struct socket *), struct socket *arg1, struct socket *arg2) {
1567 0 : ((& unix_socketpair))(arg1, arg2);
1568 0 : }
1569 :
1570 : /* AUX_FUNC_CALLBACK ldv_random_proto_scenario_callback_3_9 */
1571 : void ldv_random_proto_scenario_callback_3_9(int (*arg0)(struct socket *, struct sockaddr *, int, int), struct socket *arg1, struct sockaddr *arg2, int arg3, int arg4) {
1572 0 : ((& unix_stream_connect))(arg1, arg2, arg3, arg4);
1573 0 : }
1574 :
1575 : /* AUX_FUNC ldv_traverse_kernel_items_scenario_4 */
1576 : void ldv_traverse_kernel_items_scenario_4(void *arg0) {
1577 : /* LDV {"thread": 4, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'traverse_kernel_items_scenario(seq_operations)'", "function": "ldv_traverse_kernel_items_scenario_4"} */
1578 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1579 1 : long long int *ldv_4_ldv_param_13_1_default;
1580 1 : void *ldv_4_ldv_param_2_1_default;
1581 1 : void *ldv_4_ldv_param_6_1_default;
1582 1 : void *ldv_4_ldv_param_7_1_default;
1583 1 : long long int *ldv_4_ldv_param_7_2_default;
1584 1 : struct seq_operations *ldv_4_ops_seq_operations;
1585 1 : void *ldv_4_ret_default;
1586 1 : struct seq_file *ldv_4_seq_file_seq_file;
1587 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1588 1 : /* LDV {"action": "DEFAULT_REGISTER_4", "type": "RECEIVE_BEGIN", "comment": "Begin SEQ_OPERATIONS callbacks invocations scenario."} */
1589 3 : ldv_free(arg0);
1590 1 : /* LDV {"action": "DEFAULT_REGISTER_4", "type": "RECEIVE_END"} */
1591 1 :
1592 : /* LDV {"action": "DEFAULT_ALLOC_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
1593 3 : ldv_4_seq_file_seq_file = ldv_xmalloc_unknown_size(0);
1594 3 : ldv_4_ops_seq_operations = ldv_xmalloc_unknown_size(0);
1595 : /* LDV {"action": "DEFAULT_ALLOC_4", "type": "CONDITION_END"} */
1596 :
1597 : /* LDV {"action": "START_STEP", "type": "SUBPROCESS_BEGIN", "comment": "Start sequence or do nothing."} */
1598 : /* LDV {"action": "START_STEP", "type": "SUBPROCESS_END"} */
1599 :
1600 : /* Jump to a subprocess 'start_step' initial state */
1601 1 : goto ldv_start_step_4;
1602 : /* End of the process */
1603 : return;
1604 1 :
1605 : /* Sbprocess start_step */
1606 : ldv_start_step_4:
1607 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1608 :
1609 : /* LDV {"action": "PRE_CALL_13", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1610 3 : ldv_4_ldv_param_13_1_default = ldv_xmalloc_unknown_size(0);
1611 : /* LDV {"action": "PRE_CALL_13", "type": "CONDITION_END"} */
1612 :
1613 : /* 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."} */
1614 : /* LDV {"type": "CALLBACK", "call": "ldv_4_ret_default = ((& unix_seq_start))(ldv_4_seq_file_seq_file, ldv_4_ldv_param_13_1_default);", "comment": "start"} */
1615 2 : ldv_4_ret_default = ldv_traverse_kernel_items_scenario_start_4_13(ldv_4_ops_seq_operations->start, ldv_4_seq_file_seq_file, ldv_4_ldv_param_13_1_default);
1616 : /* LDV {"action": "START", "type": "CALL_END"} */
1617 :
1618 : /* LDV {"action": "POST_CALL_13", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1619 2 : ldv_free(ldv_4_ldv_param_13_1_default);
1620 : /* LDV {"action": "POST_CALL_13", "type": "CONDITION_END"} */
1621 :
1622 4 : if (ldv_undef_int()) {
1623 : /* LDV {"action": "START_SUCCESS", "type": "CONDITION_BEGIN", "comment": "A new sequence is initialized successfully."} */
1624 2 : ldv_assume(ldv_4_ret_default != 0);
1625 : /* LDV {"action": "START_SUCCESS", "type": "CONDITION_END"} */
1626 :
1627 : /* LDV {"action": "NEXT_STEP", "type": "SUBPROCESS_BEGIN", "comment": "Continue iteration over kernel items."} */
1628 : /* LDV {"action": "NEXT_STEP", "type": "SUBPROCESS_END"} */
1629 :
1630 : /* Jump to a subprocess 'next_step' initial state */
1631 1 : goto ldv_next_step_4;
1632 : }
1633 : else {
1634 : /* LDV {"action": "START_FAILED", "type": "CONDITION_BEGIN", "comment": "Failed to initialize a new sequence."} */
1635 2 : ldv_assume(ldv_4_ret_default == 0);
1636 : /* LDV {"action": "START_FAILED", "type": "CONDITION_END"} */
1637 :
1638 : /* LDV {"action": "DEFAULT_FREE_4", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
1639 2 : ldv_free(ldv_4_seq_file_seq_file);
1640 : /* LDV {"action": "DEFAULT_FREE_4", "type": "CONDITION_END"} */
1641 :
1642 : /* LDV {"action": "DEFAULT_DEREGISTER_4", "type": "RECEIVE_BEGIN", "comment": "Finish SEQ_OPERATIONS callbacks invocations scenario."} */
1643 : /* Skip a non-replicative signal receiving */
1644 : /* LDV {"action": "DEFAULT_DEREGISTER_4", "type": "RECEIVE_END"} */
1645 :
1646 : /* Exit function at a terminal state */
1647 1 : return;
1648 : }
1649 : /* End of the subprocess 'start_step' */
1650 : return;
1651 1 :
1652 : /* Sbprocess next_step */
1653 : ldv_next_step_4:
1654 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1655 :
1656 : /* LDV {"action": "PRE_CALL_7", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1657 2 : ldv_4_ldv_param_7_1_default = ldv_xmalloc_unknown_size(0);
1658 3 : ldv_4_ldv_param_7_2_default = ldv_xmalloc_unknown_size(0);
1659 : /* LDV {"action": "PRE_CALL_7", "type": "CONDITION_END"} */
1660 :
1661 : /* LDV {"action": "NEXT", "type": "CALL_BEGIN", "callback": true, "comment": "Advance to the new item. Invoke callback next from seq_operations."} */
1662 : /* LDV {"type": "CALLBACK", "call": "ldv_4_ret_default = ((& unix_seq_next))(ldv_4_seq_file_seq_file, ldv_4_ldv_param_7_1_default, ldv_4_ldv_param_7_2_default);", "comment": "next"} */
1663 2 : ldv_4_ret_default = ldv_traverse_kernel_items_scenario_next_4_7(ldv_4_ops_seq_operations->next, ldv_4_seq_file_seq_file, ldv_4_ldv_param_7_1_default, ldv_4_ldv_param_7_2_default);
1664 : /* LDV {"action": "NEXT", "type": "CALL_END"} */
1665 :
1666 : /* LDV {"action": "POST_CALL_7", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1667 2 : ldv_free(ldv_4_ldv_param_7_1_default);
1668 2 : ldv_free(ldv_4_ldv_param_7_2_default);
1669 : /* LDV {"action": "POST_CALL_7", "type": "CONDITION_END"} */
1670 :
1671 : /* LDV {"action": "PRE_CALL_6", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1672 2 : ldv_4_ldv_param_6_1_default = ldv_xmalloc_unknown_size(0);
1673 : /* LDV {"action": "PRE_CALL_6", "type": "CONDITION_END"} */
1674 :
1675 : /* 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."} */
1676 : /* LDV {"type": "CALLBACK", "call": "((& unix_seq_show))(ldv_4_seq_file_seq_file, ldv_4_ldv_param_6_1_default);", "comment": "show"} */
1677 2 : ldv_traverse_kernel_items_scenario_show_4_6(ldv_4_ops_seq_operations->show, ldv_4_seq_file_seq_file, ldv_4_ldv_param_6_1_default);
1678 : /* LDV {"action": "SHOW", "type": "CALL_END"} */
1679 :
1680 : /* LDV {"action": "POST_CALL_6", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1681 2 : ldv_free(ldv_4_ldv_param_6_1_default);
1682 : /* LDV {"action": "POST_CALL_6", "type": "CONDITION_END"} */
1683 :
1684 4 : if (ldv_undef_int()) {
1685 : /* LDV {"action": "NEXT_SUCCESS", "type": "CONDITION_BEGIN", "comment": "More items to show are left."} */
1686 2 : ldv_assume(ldv_4_ret_default != 0);
1687 : /* LDV {"action": "NEXT_SUCCESS", "type": "CONDITION_END"} */
1688 :
1689 : /* LDV {"action": "NEXT_STEP", "type": "SUBPROCESS_BEGIN", "comment": "Continue iteration over kernel items."} */
1690 : /* LDV {"action": "NEXT_STEP", "type": "SUBPROCESS_END"} */
1691 :
1692 : /* Jump to a subprocess 'next_step' initial state */
1693 1 : goto ldv_next_step_4;
1694 : }
1695 : else {
1696 : /* LDV {"action": "NEXT_FAIL", "type": "CONDITION_BEGIN", "comment": "The last kernel item is reached."} */
1697 2 : ldv_assume(ldv_4_ret_default == 0);
1698 : /* LDV {"action": "NEXT_FAIL", "type": "CONDITION_END"} */
1699 :
1700 : /* LDV {"action": "PRE_CALL_2", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1701 2 : ldv_4_ldv_param_2_1_default = ldv_xmalloc_unknown_size(0);
1702 : /* LDV {"action": "PRE_CALL_2", "type": "CONDITION_END"} */
1703 :
1704 : /* LDV {"action": "STOP", "type": "CALL_BEGIN", "callback": true, "comment": "End of the sequence is reached, do necessary cleanup. Invoke callback stop from seq_operations."} */
1705 : /* LDV {"type": "CALLBACK", "call": "((& unix_seq_stop))(ldv_4_seq_file_seq_file, ldv_4_ldv_param_2_1_default);", "comment": "stop"} */
1706 2 : ldv_traverse_kernel_items_scenario_stop_4_2(ldv_4_ops_seq_operations->stop, ldv_4_seq_file_seq_file, ldv_4_ldv_param_2_1_default);
1707 : /* LDV {"action": "STOP", "type": "CALL_END"} */
1708 :
1709 : /* LDV {"action": "POST_CALL_2", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1710 2 : ldv_free(ldv_4_ldv_param_2_1_default);
1711 : /* LDV {"action": "POST_CALL_2", "type": "CONDITION_END"} */
1712 :
1713 : /* LDV {"action": "START_STEP", "type": "SUBPROCESS_BEGIN", "comment": "Start sequence or do nothing."} */
1714 : /* LDV {"action": "START_STEP", "type": "SUBPROCESS_END"} */
1715 :
1716 : /* Jump to a subprocess 'start_step' initial state */
1717 1 : goto ldv_start_step_4;
1718 : }
1719 : /* End of the subprocess 'next_step' */
1720 : return;
1721 : /* 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_4"} */
1722 : }
1723 :
1724 : /* AUX_FUNC_CALLBACK ldv_traverse_kernel_items_scenario_next_4_7 */
1725 : void * ldv_traverse_kernel_items_scenario_next_4_7(void *(*arg0)(struct seq_file *, void *, loff_t *), struct seq_file *arg1, void *arg2, long long int *arg3) {
1726 4 : return ((& unix_seq_next))(arg1, arg2, arg3);
1727 : }
1728 :
1729 : /* AUX_FUNC_CALLBACK ldv_traverse_kernel_items_scenario_show_4_6 */
1730 1 : void ldv_traverse_kernel_items_scenario_show_4_6(int (*arg0)(struct seq_file *, void *), struct seq_file *arg1, void *arg2) {
1731 3 : ((& unix_seq_show))(arg1, arg2);
1732 1 : }
1733 :
1734 : /* AUX_FUNC_CALLBACK ldv_traverse_kernel_items_scenario_start_4_13 */
1735 : void * ldv_traverse_kernel_items_scenario_start_4_13(void *(*arg0)(struct seq_file *, loff_t *), struct seq_file *arg1, long long int *arg2) {
1736 4 : return ((& unix_seq_start))(arg1, arg2);
1737 : }
1738 :
1739 1 : /* AUX_FUNC_CALLBACK ldv_traverse_kernel_items_scenario_stop_4_2 */
1740 : void ldv_traverse_kernel_items_scenario_stop_4_2(void (*arg0)(struct seq_file *, void *), struct seq_file *arg1, void *arg2) {
1741 2 : ((& unix_seq_stop))(arg1, arg2);
1742 1 : }
1743 :
1744 : /* AUX_FUNC main */
1745 : int main() {
1746 1 : ldv_main_8(0);
1747 0 : return 0;
1748 : }
1749 :
1750 :
1751 : /* AUX_FUNC ERR_PTR */
1752 : static inline void *ERR_PTR (long int error)
1753 : {
1754 :
1755 : return ldv_err_ptr(error);
1756 : }
1757 :
1758 : /* AUX_FUNC PTR_ERR */
1759 : static inline long int PTR_ERR (void const *ptr)
1760 : {
1761 0 :
1762 0 : return ldv_ptr_err(ptr);
1763 : }
1764 :
1765 : /* AUX_FUNC IS_ERR */
1766 : static inline long int IS_ERR (void const *ptr)
1767 : {
1768 0 :
1769 0 : return ldv_is_err(ptr);
1770 : }
1771 :
1772 : /* AUX_FUNC IS_ERR_OR_NULL */
1773 : static inline long int IS_ERR_OR_NULL (void const *ptr)
1774 : {
1775 :
1776 : return ldv_is_err_or_null(ptr);
1777 : }
1778 :
1779 : /* AUX_FUNC kzalloc */
1780 : static inline void *kzalloc (size_t size, gfp_t flags)
1781 : {
1782 0 :
1783 0 : return ldv_kzalloc(size, flags);
1784 : }
|