]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/32s: Use dedicated segment for modules with STRICT_KERNEL_RWX
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Mon, 29 Jun 2020 11:15:26 +0000 (11:15 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 26 Jul 2020 14:01:30 +0000 (00:01 +1000)
commit1e6a1d7fb8376ecd1bd78ef10ab50884a98421e6
tree3de91cb2f36db895cd90d8294ae9b7e451426100
parent7af0a22b25acd5649c9bf5ab66732f3d5bf64e6d
powerpc/32s: Use dedicated segment for modules with STRICT_KERNEL_RWX

When STRICT_KERNEL_RWX is set, we want to set NX bit on vmalloc
segments. But modules require exec.

Use a dedicated segment for modules. There is not much space
above kernel, and we don't waste vmalloc space to do alignment.
Therefore, we take the segment before PAGE_OFFSET for modules.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/eb8faba9148b6cf17c696ba776b4e8ee2f6313bf.1593428200.git.christophe.leroy@csgroup.eu
arch/powerpc/Kconfig
arch/powerpc/include/asm/book3s/32/pgtable.h
arch/powerpc/mm/ptdump/ptdump.c