Merge pull request #1151 from volatilityfoundation/feature/linux-replace-intunsignedlong

Linux: Replace uses of specific types with the more generic pointer
This commit is contained in:
ikelos
2024-06-09 23:20:04 +01:00
committed by GitHub
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -159,7 +159,10 @@ class LinuxIntelStacker(interfaces.automagic.StackerLayerInterface):
# This we get for free
aslr_shift = (
init_task.files.cast("long unsigned int")
int.from_bytes(
init_task.files.cast("bytes", length=init_task.files.vol.size),
byteorder=init_task.files.vol.data_format.byteorder,
)
- module.get_symbol("init_files").address
)
kaslr_shift = init_task_address - cls.virtual_to_physical_address(
+1 -1
View File
@@ -66,7 +66,7 @@ class ABCKmsg(ABC):
self._config = config
self.vmlinux = context.modules[self._config["kernel"]]
self.layer_name = self.vmlinux.layer_name # type: ignore
self.long_unsigned_int_size = self.vmlinux.get_type("long unsigned int").size
self.long_unsigned_int_size = self.vmlinux.get_type("pointer").size
@classmethod
def run_all(