Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1317122

Re: [PATCH v4 0/3] kallsyms base relative series

From Guenter Roeck <linux@roeck-us.net>
Newsgroups linux.kernel
Subject Re: [PATCH v4 0/3] kallsyms base relative series
Date 2016-01-25 18:50 +0100
Message-ID <qUTr3-7vm-1@gated-at.bofh.it> (permalink)
References <qUQ9P-5cg-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 01/25/2016 06:19 AM, Ard Biesheuvel wrote:
> This v4 of my kallsyms base relative implementation is now a 3 piece series,
> since it caused some problems due to the way absolute symbols are handled
> by the absolute per cpu code. As it turns out, that code was probably wrong
> in the sense that it caused non-relocated symbol addresses to be emitted
> for values that are in fact relative to the address of the kernel text.
>
> Patch #1 fixes the scripts/kallsyms invocation to only pass the x86_64
> specific --absolute-percpu option if CONFIG_SMP is also set.
>
> Patch #2 reworks the absolute percpu code to only emit those percpu symbols
> as absolute, and not symbols that have been classified as 'A' (absolute) by
> the linker, since that does not mean quite the same thing.
>
> Patch #3 is the original kallsyms base relative patch, with some
> modifications:
> - folded the s/ULLONG_MAX/-1ULL? change made by Andrew
> - ensured that the kallsyms_relative_base value itself is relocated as
>    required.
> - dropped all of the acks and other tags, as they have become outdated with
>    the recent changes to this patch.
>

I tested the series on top of mmotm (after reverting the original patches).
Qemu tests for mips, sparc, and x86 (both smp and nosmp) now pass.

Tested-by: Guenter Roeck <linux@roeck-us.net>

> Ard Biesheuvel (3):
>    x86: kallsyms: disable absolute percpu symbols on !SMP
>    kallsyms: don't overload absolute symbol type for percpu symbols
>    kallsyms: add support for relative offsets in kallsyms address table
>
>   init/Kconfig            |  16 +++
>   kernel/kallsyms.c       |  38 ++++++--
>   scripts/kallsyms.c      | 102 +++++++++++++++++---
>   scripts/link-vmlinux.sh |   6 +-
>   scripts/namespace.pl    |   2 +
>   5 files changed, 142 insertions(+), 22 deletions(-)
>

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 0/3] kallsyms base relative series Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-01-25 15:20 +0100
  [PATCH v4 2/3] kallsyms: don't overload absolute symbol type for percpu symbols Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-01-25 15:30 +0100
  [PATCH v4 1/3] x86: kallsyms: disable absolute percpu symbols on !SMP Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-01-25 15:30 +0100
  [PATCH v4 3/3] kallsyms: add support for relative offsets in kallsyms address table Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-01-25 15:30 +0100
  Re: [PATCH v4 0/3] kallsyms base relative series Guenter Roeck <linux@roeck-us.net> - 2016-01-25 18:50 +0100
  Re: [PATCH v4 0/3] kallsyms base relative series Kees Cook <keescook@chromium.org> - 2016-01-25 20:00 +0100

csiph-web