mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-11 20:27:38 +02:00
Add in more information to the paged exceptions.
This commit is contained in:
@@ -37,9 +37,11 @@ class PagedInvalidAddressException(InvalidAddressException):
|
||||
layer_name: str,
|
||||
invalid_address: int,
|
||||
invalid_bits: int,
|
||||
entry: int,
|
||||
*args) -> None:
|
||||
super().__init__(layer_name, invalid_address, *args)
|
||||
self.invalid_bits = invalid_bits
|
||||
self.entry = entry
|
||||
|
||||
|
||||
class InvalidDataException(VolatilityException):
|
||||
|
||||
@@ -108,7 +108,7 @@ class Intel(interfaces.layers.TranslationLayerInterface):
|
||||
for (name, size, large_page) in self._structure:
|
||||
# Check we're valid
|
||||
if not self._page_is_valid(entry):
|
||||
raise exceptions.PagedInvalidAddressException(self.name, offset, position + 1,
|
||||
raise exceptions.PagedInvalidAddressException(self.name, offset, position + 1, entry,
|
||||
"Page Fault at entry " + hex(entry) + " in table " + name)
|
||||
# Check if we're a large page
|
||||
if large_page and (entry & (1 << 7)):
|
||||
@@ -130,7 +130,7 @@ class Intel(interfaces.layers.TranslationLayerInterface):
|
||||
|
||||
# Now we're done
|
||||
if not self._page_is_valid(entry):
|
||||
raise exceptions.PagedInvalidAddressException(self.name, offset, position + 1,
|
||||
raise exceptions.PagedInvalidAddressException(self.name, offset, position + 1, entry,
|
||||
"Page Fault at entry {} in page entry".format(hex(entry)))
|
||||
page = self._mask(entry, self._maxphyaddr - 1, position + 1) | self._mask(offset, position, 0)
|
||||
return page, 1 << (position + 1), self._base_layer
|
||||
|
||||
Reference in New Issue
Block a user