Re: [BUG] perf: bogus correlation of kernel symbols

From: Ingo Molnar
Date: Thu May 12 2011 - 17:06:30 EST



* David Miller <davem@xxxxxxxxxxxxx> wrote:

> From: Stephane Eranian <eranian@xxxxxxxxxx>
> Date: Thu, 12 May 2011 16:48:46 +0200
>
> > I think there is a serious problem with kernel symbol correlation
> > with the latest perf in 2.6.39-rc7-tip.
>
> The behavior seems to be intentional, so that we don't expose internal
> kernel addresses to userspace.
>
> I hate this too, and I think it's absolutely rediculous.
>
> Also, like you, I lost an entire afternoon trying to figure out why
> this started happening.

I lost about an hour with Arnaldo on IRC to help me until we figured out that
/proc/kallsyms started having zero value entries ... I'm too running perf as an
unprivileged user.

Zero is a valid symbol address so nothing within perf tripped up explicitly,
but perf report and perf top results were nonsensical.

There was another problem with it: perf is caching and storing known kernel
buildid addresses in ~/.debug, under the (previously correct) assumption that
kernel symbols do not change for one given kernel build. But with kptr_restrict
it would cache the zero values - which were cached even after kptr_restrict was
set back to 0.

Thanks,

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/