All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] Allocate module text and data separately
@ 2022-01-27 11:27 ` Christophe Leroy
  0 siblings, 0 replies; 24+ messages in thread
From: Christophe Leroy @ 2022-01-27 11:27 UTC (permalink / raw)
  To: Luis Chamberlain, Jessica Yu
  Cc: Christophe Leroy, linux-kernel, linuxppc-dev, kgdb-bugreport,
	linux-mm, linux-arch

This series allow architectures to request having modules data in
vmalloc area instead of module area.

This is required on powerpc book3s/32 in order to set data non
executable, because it is not possible to set executability on page
basis, this is done per 256 Mbytes segments. The module area has exec
right, vmalloc area has noexec. Without this change module data
remains executable regardless of CONFIG_STRICT_MODULES_RWX.

This can also be useful on other powerpc/32 in order to maximize the
chance of code being close enough to kernel core to avoid branch
trampolines.

Changes in v2:
- Dropped first two patches which are not necessary. They may be added back later as a follow-up series.
- Fixed the printks in GDB

Christophe Leroy (5):
  modules: Always have struct mod_tree_root
  modules: Prepare for handling several RB trees
  modules: Introduce data_layout
  modules: Add CONFIG_ARCH_WANTS_MODULES_DATA_IN_VMALLOC
  powerpc: Select ARCH_WANTS_MODULES_DATA_IN_VMALLOC on book3s/32 and
    8xx

 arch/Kconfig                |   6 ++
 arch/powerpc/Kconfig        |   1 +
 include/linux/module.h      |   8 ++
 kernel/debug/kdb/kdb_main.c |  10 +-
 kernel/module.c             | 193 +++++++++++++++++++++++++-----------
 5 files changed, 156 insertions(+), 62 deletions(-)

-- 
2.33.1

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2022-02-09 15:43 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-27 11:27 [PATCH v2 0/5] Allocate module text and data separately Christophe Leroy
2022-01-27 11:27 ` Christophe Leroy
2022-01-27 11:27 ` [PATCH v2 1/5] modules: Always have struct mod_tree_root Christophe Leroy
2022-01-27 11:27   ` Christophe Leroy
2022-01-27 11:28 ` [PATCH v2 2/5] modules: Prepare for handling several RB trees Christophe Leroy
2022-01-27 11:28   ` Christophe Leroy
2022-01-27 11:28 ` [PATCH v2 3/5] modules: Introduce data_layout Christophe Leroy
2022-01-27 11:28   ` Christophe Leroy
2022-01-27 11:28 ` [PATCH v2 4/5] modules: Add CONFIG_ARCH_WANTS_MODULES_DATA_IN_VMALLOC Christophe Leroy
2022-01-27 11:28   ` Christophe Leroy
2022-01-28 14:09   ` Daniel Thompson
2022-01-28 14:09     ` Daniel Thompson
2022-01-27 11:28 ` [PATCH v2 5/5] powerpc: Select ARCH_WANTS_MODULES_DATA_IN_VMALLOC on book3s/32 and 8xx Christophe Leroy
2022-01-27 11:28   ` Christophe Leroy
2022-02-02 23:36   ` Luis Chamberlain
2022-02-02 23:36     ` Luis Chamberlain
2022-02-03  5:39     ` Michael Ellerman
2022-02-03  5:39       ` Michael Ellerman
2022-02-03  7:07       ` Christophe Leroy
2022-02-03  7:07         ` Christophe Leroy
2022-02-07  1:19         ` Michael Ellerman
2022-02-07  1:19           ` Michael Ellerman
2022-02-09 15:42 ` [PATCH v2 0/5] Allocate module text and data separately Miroslav Benes
2022-02-09 15:42   ` Miroslav Benes

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.