[PATCH Makedumpfile 0/4] x86_64: Fix page_offset for randomized base enabled
Pratyush Anand
panand at redhat.com
Thu Oct 27 08:59:27 PDT 2016
On Thursday 27 October 2016 08:55 PM, Dave Anderson wrote:
> As it turns out, the problem with the crash utility is that it has to
> calculate phys_base well before it even knows the kernel has been relocated
> by KASLR. So when it sees the __START_KERNEL_map PT_LOAD segment, it mistakes
> it for the kernel modules' virtual address region and skips it.
>
> The kernel has this:
>
> #if defined(CONFIG_RANDOMIZE_BASE)
> #define KERNEL_IMAGE_SIZE (1024 * 1024 * 1024)
> #else
> #define KERNEL_IMAGE_SIZE (512 * 1024 * 1024)
> #endif
>
> and then this:
>
> #define MODULES_VADDR (__START_KERNEL_map + KERNEL_IMAGE_SIZE)
>
> So with KASLR, MODULES_VADDR gets pushed up from the traditional ffffffffa0000000
> up to ffffffffc0000000.
>
> So I'm curious as to what you use in makedumpfile to determine whether
> CONFIG_RANDOMIZE_BASE has been configured?
So far we are trying to avoid to know that in makedumpfile. makedumpfile
needed to know MODULES_VADDR, VMALLOC_START etc only to know that
whether a VA to PA translation can be done using direct mapping or to be
done by reading corresponding page table entry.
Now, we do VA to PA for all VAs using page table entry only.
https://github.com/pratyushanand/makedumpfile/blob/x86_devel/arch/x86_64.c#L186
~Pratyush
More information about the kexec
mailing list