From 276e695237e0a93cdb4755bcc8c063acda7f3a85 Mon Sep 17 00:00:00 2001 From: Eve Date: Fri, 1 Dec 2023 13:46:00 +0000 Subject: [PATCH] Linux: update maple tree extension comment around the seen set. --- .../framework/symbols/linux/extensions/__init__.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/volatility3/framework/symbols/linux/extensions/__init__.py b/volatility3/framework/symbols/linux/extensions/__init__.py index 92c544c30..dc31a7628 100644 --- a/volatility3/framework/symbols/linux/extensions/__init__.py +++ b/volatility3/framework/symbols/linux/extensions/__init__.py @@ -314,8 +314,13 @@ class maple_tree(objects.StructType): ): """Recursively parse Maple Tree Nodes and yield all non empty slots""" - # create seen set if it does not exist, e.g. on the first call into - # this recursive function. + # Create seen set if it does not exist, e.g. on the first call into this recursive function. This + # must be None or an existing set of addresses for MTEs that have already been processed or that + # should otherwise be ignored. If parsing from the root node for example this should be None on the + # first call. If you needed to parse all nodes downwards from part of the tree this should still be + # None. If however you wanted to parse from a node, but ignore some parts of the tree below it then + # this could be populated with the addresses of the nodes you wish to ignore. + if seen == None: seen = set()