Skip to content
Snippets Groups Projects
Commit 1247c267 authored by Patrick Daly's avatar Patrick Daly
Browse files

lrdpv2: ddrcompare: Adjust virtual address from objdump


With Kaslr enabled:
virtual_address = virtual_address_from_vmlinux + kaslr_offset

This fixes an issue where all the magic values from locks are incorrectly
detected as corrupted.

Change-Id: I235199b8b7d58e3303394e70ee78385bc05117c6
Reported-by: default avatar <soumeng@codeaurora.com>
parent 55b060c7
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,8 @@ class DDRCompare(RamParser) :
bitcheck = virtual & 0x3
if bitcheck:
virtual = virtual - bitcheck
physical = self.ramdump.virt_to_phys(virtual)
physical = self.ramdump.virt_to_phys(
virtual + self.ramdump.kaslr_offset)
magic = hex(self.ramdump.read_u32(physical, False)).rstrip("L").lstrip("0x").zfill(8)
if (m.group(2) != magic):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment