From 9dde65c25c05fa68de413f8273969c46e01adb9e Mon Sep 17 00:00:00 2001 From: Jean-Pierre Matsumoto Date: Tue, 7 Feb 2023 14:57:15 +0100 Subject: [PATCH] Improve accepted formats in proc_pid_smaps --- jc/parsers/proc_pid_smaps.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/jc/parsers/proc_pid_smaps.py b/jc/parsers/proc_pid_smaps.py index 921b4a2c..e20c3882 100644 --- a/jc/parsers/proc_pid_smaps.py +++ b/jc/parsers/proc_pid_smaps.py @@ -109,7 +109,8 @@ Examples: "mw", "me", "dw", - "sd" + "sd", + "mp" ], "VmFlags_pretty": [ "readable", @@ -211,6 +212,7 @@ def _process(proc_data: List[Dict]) -> List[Dict]: 'mw': 'may write', 'me': 'may execute', 'ms': 'may share', + 'mp': 'MPX-specific VMA', 'gd': 'stack segment growns down', 'pf': 'pure PFN range', 'dw': 'disabled write to the mapped file', @@ -274,10 +276,10 @@ def parse( if jc.utils.has_data(data): map_line = re.compile(r''' - ^(?P[0-9a-f]{12,16})- - (?P[0-9a-f]{12,16})\s + ^(?P[0-9a-f]{8,16})- + (?P[0-9a-f]{8,16})\s (?P[rwxsp\-]{4})\s - (?P[0-9a-f]{8})\s + (?P[0-9a-f]{8,9})\s (?P[0-9a-f]{2}): (?P[0-9a-f]{2})\s (?P\d+)\s+