1*1f5207b7SJohn Levonfrom collections import defaultdict 2*1f5207b7SJohn Levon 3*1f5207b7SJohn Levon# location of kernel.implicit_dependencies 4*1f5207b7SJohn LevonIMPL_DEP_FILE_STR = "../../smatch_data/kernel.implicit_dependencies" 5*1f5207b7SJohn LevonOUTPUT_FILE_STR = "implicit_dependencies" 6*1f5207b7SJohn Levon 7*1f5207b7SJohn Levon# struct fields to ignore, because they are too common 8*1f5207b7SJohn LevonGLOBAL_BLACKLIST = [ 9*1f5207b7SJohn Levon ('fd', 'file'), 10*1f5207b7SJohn Levon] 11*1f5207b7SJohn Levon 12*1f5207b7SJohn Levon# here we can manually add struct fields that smatch missed 13*1f5207b7SJohn Levonhardcode_syscall_write_fields = {} 14*1f5207b7SJohn Levon 15*1f5207b7SJohn Levon# here we can manually add struct fields that smatch missed 16*1f5207b7SJohn Levonhardcode_syscall_read_fields = { 17*1f5207b7SJohn Levon "msync": [("vm_area_struct", "vm_flags"), ("vm_area_struct", "vm_file")] 18*1f5207b7SJohn Levon} 19*1f5207b7SJohn Levon 20*1f5207b7SJohn LevonSYSCALL_PREFIXES = [ 21*1f5207b7SJohn Levon "SYSC_", 22*1f5207b7SJohn Levon "C_SYSC_", 23*1f5207b7SJohn Levon "sys_", 24*1f5207b7SJohn Levon] 25*1f5207b7SJohn Levon 26*1f5207b7SJohn Levonclass ListType(object): 27*1f5207b7SJohn Levon READ = "read_list" 28*1f5207b7SJohn Levon WRITE = "write_list" 29