mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-06 01:37:39 +02:00
linux: task_struct object extension: Add method to get the task address space layer, even if its a kernel thread
This commit is contained in:
@@ -407,6 +407,19 @@ class task_struct(generic.GenericIntelProcess):
|
||||
self._context, dtb, config_prefix, preferred_name
|
||||
)
|
||||
|
||||
def get_address_space_layer(
|
||||
self,
|
||||
) -> Optional[interfaces.layers.TranslationLayerInterface]:
|
||||
"""Returns the task layer for this task's address space."""
|
||||
|
||||
task_layer_name = (
|
||||
self.vol.layer_name if self.is_kernel_thread else self.add_process_layer()
|
||||
)
|
||||
if not task_layer_name:
|
||||
return None
|
||||
|
||||
return self._context.layers[task_layer_name]
|
||||
|
||||
def get_process_memory_sections(
|
||||
self, heap_only: bool = False
|
||||
) -> Generator[Tuple[int, int], None, None]:
|
||||
|
||||
Reference in New Issue
Block a user