File tree Expand file tree Collapse file tree 1 file changed +11
-12
lines changed
volatility3/framework/symbols/linux/extensions Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -63,19 +63,18 @@ def mod_mem_type(self) -> Dict:
6363 # mod_mem_type and module_memory were added in kernel 6.4 which replaces
6464 # module_layout for storing the information around core_layout etc.
6565 # see commit ac3b43283923440900b4f36ca5f9f0b1ca43b70e for more information
66+ symbol_table_name = self .get_symbol_table_name ()
67+ mod_mem_type_symname = symbol_table_name + constants .BANG + "mod_mem_type"
68+ symbol_space = self ._context .symbol_space
69+ try :
70+ mod_mem_type = symbol_space .get_enumeration (mod_mem_type_symname ).choices
71+ except exceptions .SymbolError :
72+ mod_mem_type = {}
73+ vollog .debug (
74+ "Unable to find mod_mem_type enum. This message can be ignored for kernels < 6.4"
75+ )
6676
67- if self ._mod_mem_type is None :
68- try :
69- self ._mod_mem_type = self ._context .symbol_space .get_enumeration (
70- self .get_symbol_table_name () + constants .BANG + "mod_mem_type"
71- ).choices
72- except exceptions .SymbolError :
73- vollog .debug (
74- "Unable to find mod_mem_type enum. This message can be ignored for kernels < 6.4"
75- )
76- # set to empty dict to show that the enum was not found, and so shouldn't be searched for again
77- self ._mod_mem_type = {}
78- return self ._mod_mem_type
77+ return mod_mem_type
7978
8079 def _get_mem_type (self , mod_mem_type_name ):
8180 module_mem_index = self .mod_mem_type .get (mod_mem_type_name )
You can’t perform that action at this time.
0 commit comments