[Crash-utility] [PATCH v1] arm64: fix kernel memory map handling for kaslr-enabled

AKASHI Takahiro takahiro.akashi at linaro.org
Fri May 27 04:11:09 UTC 2016


On Wed, May 25, 2016 at 09:29:27AM -0400, Dave Anderson wrote:
> 
> 
> ----- Original Message -----
> > On Tue, May 24, 2016 at 09:35:54AM -0400, Dave Anderson wrote:
> > > 
> > > 
> > > ----- Original Message -----
> > > > > > 
> > > > > > Now that PHYS_OFFSET is defined as "memstart_addr",  we can get the value
> > > > > > if we can access this symbol (on a live system).
> > > > > 
> > > > > When PHYS_OFFSET/memstart_addr is bumped up from the actual base of physical
> > > > > memory, is the physical memory below it no longer used/accessible?
> > > > 
> > > > Yes, it is! That is what Ard has managed to do in his series of
> > > > KASLR-related patches.
> > > 
> > > How is it accessed via a kernel virtual address?  Or is only accessible when
> > > mapped into a vmalloc() or user-space address?
> > 
> > Through a linear(unity) mapping above PAGE_OFFSET.
> 
> I'm still confused...
> 
> Does PAGE_OFFSET+0 still refer to PHYS_OFFSET?

No, it doesn't if CONFIG_RANDOMIZE_RAM.
See a kernel boot message about "Virtual kernel memory layout"
That is why PHYS_OFFSET can now be negative.

Thanks,
Tahahiro AKASHI

> I'm trying to wrap my head around 
> how __virt_to_phys() would work for the memory below the bumped-up PHYS_OFFSET.
> 
> Dave
> 
> 
>  
> 
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility

-- 
Thanks,
-Takahiro AKASHI




More information about the Crash-utility mailing list