Skip to content

Commit 18e5d7a

Browse files
authored
Merge pull request #1061 from eve-mem/linux_kmsg_issue_1055
Linux: Update kmsg issue 1055
2 parents 4ac261c + 9b85342 commit 18e5d7a

File tree

1 file changed

+13
-10
lines changed
  • volatility3/framework/plugins/linux

1 file changed

+13
-10
lines changed

volatility3/framework/plugins/linux/kmsg.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,8 @@ def __init__(
6464
):
6565
self._context = context
6666
self._config = config
67-
vmlinux = context.modules[self._config["kernel"]]
68-
self.layer_name = vmlinux.layer_name # type: ignore
69-
symbol_table_name = vmlinux.symbol_table_name # type: ignore
70-
self.vmlinux = contexts.Module.create(context, symbol_table_name, self.layer_name, 0) # type: ignore
67+
self.vmlinux = context.modules[self._config["kernel"]]
68+
self.layer_name = self.vmlinux.layer_name # type: ignore
7169
self.long_unsigned_int_size = self.vmlinux.get_type("long unsigned int").size
7270

7371
@classmethod
@@ -358,19 +356,24 @@ def run(self) -> Iterator[Tuple[str, str, str, str, str]]:
358356

359357
desc_ring = ringbuffers.desc_ring
360358
text_data_ring = ringbuffers.text_data_ring
361-
362359
desc_count = 1 << desc_ring.count_bits
363-
desc_arr = self.vmlinux.object(
364-
object_type="array",
360+
361+
array_type = self.vmlinux.symbol_table_name + constants.BANG + "array"
362+
363+
desc_arr = self._context.object(
364+
array_type,
365365
offset=desc_ring.descs,
366366
subtype=self.vmlinux.get_type("prb_desc"),
367367
count=desc_count,
368+
layer_name=self.layer_name,
368369
)
369-
info_arr = self.vmlinux.object(
370-
object_type="array",
370+
371+
info_arr = self._context.object(
372+
array_type,
371373
offset=desc_ring.infos,
372374
subtype=self.vmlinux.get_type("printk_info"),
373375
count=desc_count,
376+
layer_name=self.layer_name,
374377
)
375378

376379
# See kernel/printk/printk_ringbuffer.h
@@ -409,7 +412,7 @@ class Kmsg(plugins.PluginInterface):
409412

410413
_required_framework_version = (2, 0, 0)
411414

412-
_version = (1, 0, 0)
415+
_version = (1, 0, 1)
413416

414417
@classmethod
415418
def get_requirements(cls) -> List[interfaces.configuration.RequirementInterface]:

0 commit comments

Comments
 (0)