linux: intel VMCoreInfo: Revert changes associated with adding vmcoreinfo dict to the layer metadata

This commit is contained in:
Gustavo Moreira
2024-11-20 11:47:37 +11:00
parent 9f6d194980
commit 41d2e924d1
+1 -8
View File
@@ -4,7 +4,6 @@
import os
import logging
import collections
from typing import Optional, Tuple, Type
from volatility3.framework import constants, interfaces
@@ -108,13 +107,11 @@ class LinuxIntelStacker(interfaces.automagic.StackerLayerInterface):
join(config_path, LinuxSymbolFinder.banner_config_key)
] = str(banner, "latin-1")
# Set an empty vmcoreinfo entry to prevent using the wrong one in the layer stack.
layer_metadata = dict(os="Linux", vmcoreinfo={})
layer = layer_class(
context,
config_path=config_path,
name=new_layer_name,
metadata=layer_metadata,
metadata={os: "Linux"},
)
layer.config["kernel_virtual_offset"] = aslr_shift
@@ -379,10 +376,6 @@ class LinuxIntelVMCOREINFOStacker(interfaces.automagic.StackerLayerInterface):
aslr_shift,
dtb,
)
# Add the vmcoreinfo dict to the layer class metadata
layer.__class__._direct_metadata = collections.ChainMap(
{"vmcoreinfo": vmcoreinfo}, layer._direct_metadata
)
return layer