Skip to content

Commit 1c6a548

Browse files
committed
Linux: hidden_modules: Simplify symbols type checks
1 parent dfd8a1f commit 1c6a548

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

volatility3/framework/plugins/linux/hidden_modules.py

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -58,21 +58,10 @@ def get_modules_memory_boundaries(
5858
modules_addr_max = vmlinux.object_from_symbol("module_addr_max")
5959

6060
if isinstance(modules_addr_min, objects.Void):
61-
# Crap ISF! Here's my best-effort workaround
62-
vollog.warning(
63-
"Your ISF symbols are missing type information. You may need to update "
64-
"the ISF using the latest version of dwarf2json"
61+
raise exceptions.VolatilityException(
62+
"Your ISF symbols lack type information. You may need to update the"
63+
"ISF using the latest version of dwarf2json"
6564
)
66-
# See issue #1041. In the Linux kernel these are "unsigned long"
67-
for type_name in ("long unsigned int", "unsigned long"):
68-
if vmlinux.has_type(type_name):
69-
modules_addr_min = modules_addr_min.cast(type_name)
70-
modules_addr_max = modules_addr_max.cast(type_name)
71-
break
72-
else:
73-
raise exceptions.VolatilityException(
74-
"Bad ISF! Please update the ISF using the latest version of dwarf2json"
75-
)
7665
else:
7766
raise exceptions.VolatilityException(
7867
"Cannot find the module memory allocation area. Unsupported kernel"

0 commit comments

Comments
 (0)