Re: [PATCH 2/2] kallsyms: handle special absolute symbols

Rusty Russell
2014-03-07T03:37:00Z

Kees Cook <keescook@chromium.org> writes:
> This forces the entire per_cpu range to be reported as absolute without
> losing their linker symbol types. Without this, the variables are
> incorrectly shown as relocated under kASLR.

I like these patches, thanks!

This one's a bit broken, since the zero-based __per_cpu_start/end thing
is an x86-64-ism. You really do want them relocated on other
platforms, so I think you'll need do make this conditional via
a --per-cpu-absolute flag to kallsyms (which x86-64 would set).

Dumb Q: why don't we actually present these symbols as absolute in
/proc/kallsyms? Seems like it would be clearer...

Thanks,
Rusty.