Re: [PATCH] perf tools: set kernel end address properly

From: Namhyung Kim
Date: Thu Apr 19 2018 - 19:59:25 EST


On Thu, Apr 19, 2018 at 06:20:24PM -0500, Kim Phillips wrote:
> On Thu, 19 Apr 2018 11:37:12 +0900
> Namhyung Kim <namhyung@xxxxxxxxxx> wrote:
> > I think the problem is perf assumes the kernel is the
> > first map in the kmaps. When it calls maps_groups__insert() it uses
> > start address of 0 for the kernel map. It seems always true for x86
> > but not for ARM64.
> >
> > While it changes the start address in machine__set_kernel_mmap() it
> > doesn't change the order in the kmaps.
> >
> > Could you please test below patch (on top) then?
>
> Much better, thank you! Together with the "module_emit_adrp_veneer not
> on kallsyms" mitigation diff, test 1 now passes on arm64 systems both
> with modules loaded, and without, and with and without RANDOMIZE_BASE.
>
> I would send a patch (From: you), but I think you'd do a better job on
> writing the commit text, so would you care to, please?

Sure, what about this?

Thanks,
Namhyung