github.com/google/syzkaller@v0.0.0-20251211124644-a066d2bc4b02/tools/syz-declextract/testdata/scopes.c.json (about)

     1  {
     2  	"functions": [
     3  		{
     4  			"name": "__do_sys_scopes0",
     5  			"file": "scopes.c",
     6  			"start_line": 25,
     7  			"end_line": 51,
     8  			"scopes": [
     9  				{
    10  					"arg": -1,
    11  					"calls": [
    12  						"__fget_light"
    13  					],
    14  					"facts": [
    15  						{
    16  							"src": {
    17  								"argument": {
    18  									"func": "__do_sys_scopes0",
    19  									"arg": 2
    20  								}
    21  							},
    22  							"dst": {
    23  								"argument": {
    24  									"func": "__fget_light",
    25  									"arg": 0
    26  								}
    27  							}
    28  						},
    29  						{
    30  							"src": {
    31  								"local": {
    32  									"name": "tmp"
    33  								}
    34  							},
    35  							"dst": {
    36  								"return": {
    37  									"func": "__do_sys_scopes0"
    38  								}
    39  							}
    40  						}
    41  					]
    42  				},
    43  				{
    44  					"arg": 1,
    45  					"values": [
    46  						"FOO_IOCTL1"
    47  					],
    48  					"start_line": 29,
    49  					"end_line": 32,
    50  					"calls": [
    51  						"__fget_light"
    52  					],
    53  					"facts": [
    54  						{
    55  							"src": {
    56  								"argument": {
    57  									"func": "__do_sys_scopes0",
    58  									"arg": 0
    59  								}
    60  							},
    61  							"dst": {
    62  								"argument": {
    63  									"func": "__fget_light",
    64  									"arg": 0
    65  								}
    66  							}
    67  						}
    68  					]
    69  				},
    70  				{
    71  					"arg": 1,
    72  					"values": [
    73  						"FOO_IOCTL2",
    74  						"FOO_IOCTL3"
    75  					],
    76  					"start_line": 32,
    77  					"end_line": 36,
    78  					"calls": [
    79  						"alloc_fd"
    80  					],
    81  					"facts": [
    82  						{
    83  							"src": {
    84  								"return": {
    85  									"func": "alloc_fd"
    86  								}
    87  							},
    88  							"dst": {
    89  								"local": {
    90  									"name": "tmp"
    91  								}
    92  							}
    93  						},
    94  						{
    95  							"src": {
    96  								"local": {
    97  									"name": "tmp"
    98  								}
    99  							},
   100  							"dst": {
   101  								"return": {
   102  									"func": "__do_sys_scopes0"
   103  								}
   104  							}
   105  						}
   106  					]
   107  				},
   108  				{
   109  					"arg": 1,
   110  					"values": [
   111  						"FOO_IOCTL4",
   112  						"1074291461",
   113  						"1074291462"
   114  					],
   115  					"start_line": 36,
   116  					"end_line": 39
   117  				},
   118  				{
   119  					"arg": 1,
   120  					"values": [
   121  						"FOO_IOCTL7",
   122  						"FOO_IOCTL8"
   123  					],
   124  					"start_line": 39,
   125  					"end_line": 43,
   126  					"calls": [
   127  						"scopes_helper"
   128  					],
   129  					"facts": [
   130  						{
   131  							"src": {
   132  								"return": {
   133  									"func": "scopes_helper"
   134  								}
   135  							},
   136  							"dst": {
   137  								"local": {
   138  									"name": "tmp"
   139  								}
   140  							}
   141  						},
   142  						{
   143  							"src": {
   144  								"argument": {
   145  									"func": "__do_sys_scopes0",
   146  									"arg": 1
   147  								}
   148  							},
   149  							"dst": {
   150  								"argument": {
   151  									"func": "scopes_helper",
   152  									"arg": 0
   153  								}
   154  							}
   155  						},
   156  						{
   157  							"src": {
   158  								"argument": {
   159  									"func": "__do_sys_scopes0",
   160  									"arg": 0
   161  								}
   162  							},
   163  							"dst": {
   164  								"argument": {
   165  									"func": "scopes_helper",
   166  									"arg": 1
   167  								}
   168  							}
   169  						}
   170  					]
   171  				},
   172  				{
   173  					"arg": 1,
   174  					"values": [
   175  						"100",
   176  						"101",
   177  						"102"
   178  					],
   179  					"start_line": 43,
   180  					"end_line": 46
   181  				},
   182  				{
   183  					"arg": 1,
   184  					"start_line": 46,
   185  					"end_line": 49,
   186  					"facts": [
   187  						{
   188  							"src": {
   189  								"argument": {
   190  									"func": "__do_sys_scopes0",
   191  									"arg": 1
   192  								}
   193  							},
   194  							"dst": {
   195  								"local": {
   196  									"name": "tmp"
   197  								}
   198  							}
   199  						}
   200  					]
   201  				}
   202  			]
   203  		},
   204  		{
   205  			"name": "__fget_light",
   206  			"file": "include/fs.h",
   207  			"start_line": 18,
   208  			"end_line": 19,
   209  			"is_static": true,
   210  			"scopes": [
   211  				{
   212  					"arg": -1
   213  				}
   214  			]
   215  		},
   216  		{
   217  			"name": "alloc_fd",
   218  			"file": "include/fs.h",
   219  			"start_line": 14,
   220  			"end_line": 16,
   221  			"is_static": true,
   222  			"scopes": [
   223  				{
   224  					"arg": -1
   225  				}
   226  			]
   227  		},
   228  		{
   229  			"name": "from_kuid",
   230  			"file": "include/fs.h",
   231  			"start_line": 21,
   232  			"end_line": 23,
   233  			"is_static": true,
   234  			"scopes": [
   235  				{
   236  					"arg": -1
   237  				}
   238  			]
   239  		},
   240  		{
   241  			"name": "scopes_helper",
   242  			"file": "scopes.c",
   243  			"start_line": 11,
   244  			"end_line": 23,
   245  			"is_static": true,
   246  			"scopes": [
   247  				{
   248  					"arg": -1
   249  				},
   250  				{
   251  					"arg": 0,
   252  					"values": [
   253  						"FOO_IOCTL7"
   254  					],
   255  					"start_line": 13,
   256  					"end_line": 15,
   257  					"calls": [
   258  						"alloc_fd"
   259  					],
   260  					"facts": [
   261  						{
   262  							"src": {
   263  								"return": {
   264  									"func": "alloc_fd"
   265  								}
   266  							},
   267  							"dst": {
   268  								"return": {
   269  									"func": "scopes_helper"
   270  								}
   271  							}
   272  						}
   273  					]
   274  				},
   275  				{
   276  					"arg": 0,
   277  					"values": [
   278  						"FOO_IOCTL8"
   279  					],
   280  					"start_line": 15,
   281  					"end_line": 18,
   282  					"calls": [
   283  						"__fget_light"
   284  					],
   285  					"facts": [
   286  						{
   287  							"src": {
   288  								"argument": {
   289  									"func": "scopes_helper",
   290  									"arg": 1
   291  								}
   292  							},
   293  							"dst": {
   294  								"argument": {
   295  									"func": "__fget_light",
   296  									"arg": 0
   297  								}
   298  							}
   299  						}
   300  					]
   301  				},
   302  				{
   303  					"arg": 0,
   304  					"values": [
   305  						"LARGE_UINT",
   306  						"LARGE_SINT"
   307  					],
   308  					"start_line": 18,
   309  					"end_line": 21
   310  				}
   311  			]
   312  		}
   313  	],
   314  	"consts": [
   315  		{
   316  			"name": "FOO_IOCTL1",
   317  			"filename": "include/uapi/file_operations.h",
   318  			"value": 25345
   319  		},
   320  		{
   321  			"name": "FOO_IOCTL2",
   322  			"filename": "include/uapi/file_operations.h",
   323  			"value": 2147771138
   324  		},
   325  		{
   326  			"name": "FOO_IOCTL3",
   327  			"filename": "include/uapi/file_operations.h",
   328  			"value": 2148033283
   329  		},
   330  		{
   331  			"name": "FOO_IOCTL4",
   332  			"filename": "include/uapi/file_operations.h",
   333  			"value": 1074291460
   334  		},
   335  		{
   336  			"name": "FOO_IOCTL7",
   337  			"filename": "include/uapi/file_operations.h",
   338  			"value": 25351
   339  		},
   340  		{
   341  			"name": "FOO_IOCTL8",
   342  			"filename": "include/uapi/file_operations.h",
   343  			"value": 25352
   344  		},
   345  		{
   346  			"name": "LARGE_SINT",
   347  			"filename": "scopes.c",
   348  			"value": 0
   349  		},
   350  		{
   351  			"name": "LARGE_UINT",
   352  			"filename": "scopes.c",
   353  			"value": -9223372036854775808
   354  		}
   355  	],
   356  	"structs": [
   357  		{
   358  			"name": "foo_ioctl_arg",
   359  			"byte_size": 8,
   360  			"align": 4,
   361  			"fields": [
   362  				{
   363  					"name": "a",
   364  					"counted_by": -1,
   365  					"type": {
   366  						"int": {
   367  							"byte_size": 4,
   368  							"name": "int",
   369  							"base": "int"
   370  						}
   371  					}
   372  				},
   373  				{
   374  					"name": "b",
   375  					"counted_by": -1,
   376  					"type": {
   377  						"int": {
   378  							"byte_size": 4,
   379  							"name": "int",
   380  							"base": "int"
   381  						}
   382  					}
   383  				}
   384  			]
   385  		}
   386  	],
   387  	"syscalls": [
   388  		{
   389  			"func": "__do_sys_scopes0",
   390  			"args": [
   391  				{
   392  					"name": "x",
   393  					"counted_by": -1,
   394  					"type": {
   395  						"int": {
   396  							"byte_size": 4,
   397  							"name": "int",
   398  							"base": "int"
   399  						}
   400  					}
   401  				},
   402  				{
   403  					"name": "cmd",
   404  					"counted_by": -1,
   405  					"type": {
   406  						"int": {
   407  							"byte_size": 8,
   408  							"name": "long",
   409  							"base": "long"
   410  						}
   411  					}
   412  				},
   413  				{
   414  					"name": "aux",
   415  					"counted_by": -1,
   416  					"type": {
   417  						"int": {
   418  							"byte_size": 8,
   419  							"name": "long",
   420  							"base": "long"
   421  						}
   422  					}
   423  				}
   424  			],
   425  			"source_file": "scopes.c"
   426  		}
   427  	],
   428  	"ioctls": [
   429  		{
   430  			"name": "FOO_IOCTL1",
   431  			"type": {
   432  				"int": {
   433  					"byte_size": 1,
   434  					"is_const": true
   435  				}
   436  			}
   437  		},
   438  		{
   439  			"name": "FOO_IOCTL2",
   440  			"type": {
   441  				"ptr": {
   442  					"elem": {
   443  						"int": {
   444  							"byte_size": 4,
   445  							"name": "int",
   446  							"base": "int"
   447  						}
   448  					},
   449  					"is_const": true
   450  				}
   451  			}
   452  		},
   453  		{
   454  			"name": "FOO_IOCTL3",
   455  			"type": {
   456  				"ptr": {
   457  					"elem": {
   458  						"struct": "foo_ioctl_arg"
   459  					},
   460  					"is_const": true
   461  				}
   462  			}
   463  		},
   464  		{
   465  			"name": "FOO_IOCTL4",
   466  			"type": {
   467  				"ptr": {
   468  					"elem": {
   469  						"struct": "foo_ioctl_arg"
   470  					}
   471  				}
   472  			}
   473  		},
   474  		{
   475  			"name": "FOO_IOCTL7",
   476  			"type": {
   477  				"int": {
   478  					"byte_size": 1,
   479  					"is_const": true
   480  				}
   481  			}
   482  		},
   483  		{
   484  			"name": "FOO_IOCTL8",
   485  			"type": {
   486  				"int": {
   487  					"byte_size": 1,
   488  					"is_const": true
   489  				}
   490  			}
   491  		}
   492  	]
   493  }