Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 19 additions & 9 deletions jc/parsers/proc_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
string
],
"status": string,
"location": string
"location": string,
"taint_state": string
}
]

Expand All @@ -47,15 +48,17 @@
"used": 1,
"used_by": [],
"status": "Live",
"location": "0xffffffffc0ab4000"
"location": "0xffffffffc0ab4000",
"taint_state": "(E)"
},
{
"module": "vsock_loopback",
"size": 16384,
"used": 0,
"used_by": [],
"status": "Live",
"location": "0xffffffffc0a14000"
"location": "0xffffffffc0a14000",
"taint_state": "(F)"
},
{
"module": "vmw_vsock_virtio_transport_common",
Expand All @@ -65,7 +68,8 @@
"vsock_loopback"
],
"status": "Live",
"location": "0xffffffffc0a03000"
"location": "0xffffffffc0a03000",
"taint_state": "(E)"
},
...
]
Expand All @@ -78,15 +82,17 @@
"used": "1",
"used_by": [],
"status": "Live",
"location": "0xffffffffc0ab4000"
"location": "0xffffffffc0ab4000",
"taint_state": null
},
{
"module": "vsock_loopback",
"size": "16384",
"used": "0",
"used_by": [],
"status": "Live",
"location": "0xffffffffc0a14000"
"location": "0xffffffffc0a14000",
"taint_state": null
},
{
"module": "vmw_vsock_virtio_transport_common",
Expand All @@ -96,7 +102,8 @@
"vsock_loopback"
],
"status": "Live",
"location": "0xffffffffc0a03000"
"location": "0xffffffffc0a03000",
"taint_state": null
},
...
]
Expand Down Expand Up @@ -168,7 +175,9 @@ def parse(

for line in filter(None, data.splitlines()):

module, size, used, used_by, status, location = line.split()
module_info = line.split()
module, size, used, used_by, status, location = module_info[:6]
taint_state = module_info[6] if len(module_info) > 6 else None
used_by_list = used_by.split(',')[:-1]

raw_output.append(
Expand All @@ -178,7 +187,8 @@ def parse(
'used': used,
'used_by': used_by_list,
'status': status,
'location': location
'location': location,
'taint_state': taint_state
}
)

Expand Down
Loading