]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: disable support for relative ksymtab references
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 29 Aug 2018 06:47:53 +0000 (08:47 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 29 Aug 2018 23:12:07 +0000 (16:12 -0700)
commitf287f628161778bcd66a374527bcb7b19ff8a7ed
tree6b90dd75b639e091ae9fa5be146222132b69b50e
parentb50c1352e7afa99b3e741dd205f71f5ca23ea595
powerpc: disable support for relative ksymtab references

The newly added code that emits ksymtab entries as pairs of 32-bit
relative references interacts poorly with the way powerpc lays out its
address space: when a module exports a per-CPU variable, the primary
module region covering the ksymtab entry -and thus the 32-bit relative
reference- is too far away from the actual per-CPU variable's base
address (to which the per-CPU offsets are applied to obtain the
respective address of each CPU's copy), resulting in corruption when the
module loader attempts to resolve symbol references of modules that are
loaded on top and link to the exported per-CPU symbol.

So let's disable this feature on powerpc.  Even though it implements
CONFIG_RELOCATABLE, it does not implement CONFIG_RANDOMIZE_BASE and so
KASLR kernels (which are the main target of the feature) do not exist on
powerpc anyway.

Reported-by: Andreas Schwab <schwab@linux-m68k.org>
Suggested-by: Nicholas Piggin <nicholas.piggin@gmail.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/powerpc/Kconfig