All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/13] Fix LKDTM for PPC64/IA64/PARISC
@ 2021-10-14  5:49 ` Christophe Leroy
  0 siblings, 0 replies; 106+ messages in thread
From: Christophe Leroy @ 2021-10-14  5:49 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Andrew Morton, James E.J. Bottomley, Helge Deller, Arnd Bergmann,
	Kees Cook, Greg Kroah-Hartman
  Cc: Christophe Leroy, linux-kernel, linuxppc-dev, linux-ia64,
	linux-parisc, linux-arch, linux-mm

PPC64/IA64/PARISC have function descriptors. LKDTM doesn't work
on those three architectures because LKDTM messes up function
descriptors with functions.

This series does some cleanup in the three architectures and
refactors function descriptors so that it can then easily use it
in a generic way in LKDTM.

Patch 8 is not absolutely necessary but it is a good trivial cleanup.

Changes in v2:
- Addressed received comments
- Moved dereference_[kernel]_function_descriptor() out of line
- Added patches to remove func_descr_t and func_desc_t in powerpc
- Using func_desc_t instead of funct_descr_t
- Renamed HAVE_DEREFERENCE_FUNCTION_DESCRIPTOR to HAVE_FUNCTION_DESCRIPTORS
- Added a new lkdtm test to check protection of function descriptors

Christophe Leroy (13):
  powerpc: Move 'struct ppc64_opd_entry' back into asm/elf.h
  powerpc: Rename 'funcaddr' to 'addr' in 'struct ppc64_opd_entry'
  powerpc: Remove func_descr_t
  powerpc: Prepare func_desc_t for refactorisation
  ia64: Rename 'ip' to 'addr' in 'struct fdesc'
  asm-generic: Use HAVE_FUNCTION_DESCRIPTORS to define associated stubs
  asm-generic: Define 'func_desc_t' to commonly describe function
    descriptors
  asm-generic: Refactor dereference_[kernel]_function_descriptor()
  lkdtm: Force do_nothing() out of line
  lkdtm: Really write into kernel text in WRITE_KERN
  lkdtm: Fix lkdtm_EXEC_RODATA()
  lkdtm: Fix execute_[user]_location()
  lkdtm: Add a test for function descriptors protection

 arch/ia64/include/asm/elf.h              |  2 +-
 arch/ia64/include/asm/sections.h         | 25 ++-------
 arch/ia64/kernel/module.c                |  6 +--
 arch/parisc/include/asm/sections.h       | 17 +++---
 arch/parisc/kernel/process.c             | 21 --------
 arch/powerpc/include/asm/code-patching.h |  2 +-
 arch/powerpc/include/asm/elf.h           |  6 +++
 arch/powerpc/include/asm/sections.h      | 30 ++---------
 arch/powerpc/include/asm/types.h         |  6 ---
 arch/powerpc/include/uapi/asm/elf.h      |  8 ---
 arch/powerpc/kernel/module_64.c          | 38 +++++--------
 arch/powerpc/kernel/signal_64.c          |  8 +--
 drivers/misc/lkdtm/core.c                |  1 +
 drivers/misc/lkdtm/lkdtm.h               |  1 +
 drivers/misc/lkdtm/perms.c               | 68 ++++++++++++++++++++----
 include/asm-generic/sections.h           | 13 ++++-
 include/linux/kallsyms.h                 |  2 +-
 kernel/extable.c                         | 23 +++++++-
 18 files changed, 138 insertions(+), 139 deletions(-)

-- 
2.31.1


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

end of thread, other threads:[~2021-11-16 15:08 UTC | newest]

Thread overview: 106+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-14  5:49 [PATCH v2 00/13] Fix LKDTM for PPC64/IA64/PARISC Christophe Leroy
2021-10-14  5:49 ` Christophe Leroy
2021-10-14  5:49 ` Christophe Leroy
2021-10-14  5:49 ` [PATCH v2 01/13] powerpc: Move 'struct ppc64_opd_entry' back into asm/elf.h Christophe Leroy
2021-10-14  5:49   ` Christophe Leroy
2021-10-14  5:49   ` Christophe Leroy
2021-10-14 21:26   ` Daniel Axtens
2021-10-14 21:26     ` Daniel Axtens
2021-10-14 21:26     ` Daniel Axtens
2021-10-15  5:57   ` Nicholas Piggin
2021-10-15  5:57     ` Nicholas Piggin
2021-10-15  5:57     ` Nicholas Piggin
2021-10-14  5:49 ` [PATCH v2 02/13] powerpc: Rename 'funcaddr' to 'addr' in 'struct ppc64_opd_entry' Christophe Leroy
2021-10-14  5:49   ` Christophe Leroy
2021-10-14  5:49   ` Christophe Leroy
2021-10-14 21:45   ` Daniel Axtens
2021-10-14 21:45     ` Daniel Axtens
2021-10-15  4:59     ` Christophe Leroy
2021-10-15  4:59       ` Christophe Leroy
2021-10-15  6:01   ` Nicholas Piggin
2021-10-15  6:01     ` Nicholas Piggin
2021-10-15  6:01     ` Nicholas Piggin
2021-10-14  5:49 ` [PATCH v2 03/13] powerpc: Remove func_descr_t Christophe Leroy
2021-10-14  5:49   ` Christophe Leroy
2021-10-14  5:49   ` Christophe Leroy
2021-10-14 22:17   ` Daniel Axtens
2021-10-14 22:17     ` Daniel Axtens
2021-10-15  5:19     ` Christophe Leroy
2021-10-15  5:19       ` Christophe Leroy
2021-10-15  6:11       ` Nicholas Piggin
2021-10-15  6:11         ` Nicholas Piggin
2021-10-15  6:11         ` Nicholas Piggin
2021-10-14  5:49 ` [PATCH v2 04/13] powerpc: Prepare func_desc_t for refactorisation Christophe Leroy
2021-10-14  5:49   ` Christophe Leroy
2021-10-14  5:49   ` Christophe Leroy
2021-10-14  5:49 ` [PATCH v2 05/13] ia64: Rename 'ip' to 'addr' in 'struct fdesc' Christophe Leroy
2021-10-14  5:49   ` Christophe Leroy
2021-10-14  5:49   ` Christophe Leroy
2021-10-14  5:49 ` [PATCH v2 06/13] asm-generic: Use HAVE_FUNCTION_DESCRIPTORS to define associated stubs Christophe Leroy
2021-10-14  5:49   ` Christophe Leroy
2021-10-14  5:49   ` Christophe Leroy
2021-10-15  6:16   ` Nicholas Piggin
2021-10-15  6:16     ` Nicholas Piggin
2021-10-15  6:16     ` Nicholas Piggin
2021-10-15  6:24     ` Christophe Leroy
2021-10-15  6:24       ` Christophe Leroy
2021-10-15  6:24       ` Christophe Leroy
2021-10-15  8:02       ` Nicholas Piggin
2021-10-15  8:02         ` Nicholas Piggin
2021-10-15  8:02         ` Nicholas Piggin
2021-10-15 11:52         ` Nicholas Piggin
2021-10-15 11:52           ` Nicholas Piggin
2021-10-15 11:52           ` Nicholas Piggin
2021-10-14  5:49 ` [PATCH v2 07/13] asm-generic: Define 'func_desc_t' to commonly describe function descriptors Christophe Leroy
2021-10-14  5:49   ` Christophe Leroy
2021-10-14  5:49   ` Christophe Leroy
2021-10-14  6:52   ` Arnd Bergmann
2021-10-14  6:52     ` Arnd Bergmann
2021-10-14  6:52     ` Arnd Bergmann
2021-10-14  5:49 ` [PATCH v2 08/13] asm-generic: Refactor dereference_[kernel]_function_descriptor() Christophe Leroy
2021-10-14  5:49   ` Christophe Leroy
2021-10-14  5:49   ` Christophe Leroy
2021-10-15  6:59   ` Nicholas Piggin
2021-10-15  7:00     ` Nicholas Piggin
2021-10-15  7:00     ` Nicholas Piggin
2021-10-14  5:49 ` [PATCH v2 09/13] lkdtm: Force do_nothing() out of line Christophe Leroy
2021-10-14  5:49   ` Christophe Leroy
2021-10-14  5:49   ` Christophe Leroy
2021-10-14  5:49 ` [PATCH v2 10/13] lkdtm: Really write into kernel text in WRITE_KERN Christophe Leroy
2021-10-14  5:49   ` Christophe Leroy
2021-10-14  5:49   ` Christophe Leroy
2021-10-14  5:50 ` [PATCH v2 11/13] lkdtm: Fix lkdtm_EXEC_RODATA() Christophe Leroy
2021-10-14  5:50   ` Christophe Leroy
2021-10-14  5:50   ` Christophe Leroy
2021-10-15 21:32   ` Kees Cook
2021-10-15 21:32     ` Kees Cook
2021-10-15 21:32     ` Kees Cook
2021-10-16  6:41     ` Christophe Leroy
2021-10-16  6:41       ` Christophe Leroy
2021-10-16  6:41       ` Christophe Leroy
2021-10-17  7:50       ` Christophe Leroy
2021-10-17  7:50         ` Christophe Leroy
2021-10-17  7:50         ` Christophe Leroy
2021-10-14  5:50 ` [PATCH v2 12/13] lkdtm: Fix execute_[user]_location() Christophe Leroy
2021-10-14  5:50   ` Christophe Leroy
2021-10-14  5:50   ` Christophe Leroy
2021-10-15 21:31   ` Kees Cook
2021-10-15 21:31     ` Kees Cook
2021-10-15 21:31     ` Kees Cook
2021-10-16  6:42     ` Christophe Leroy
2021-10-16  6:42       ` Christophe Leroy
2021-10-16  6:42       ` Christophe Leroy
2021-11-16 15:07       ` Christophe Leroy
2021-11-16 15:07         ` Christophe Leroy
2021-11-16 15:07         ` Christophe Leroy
2021-10-14  5:50 ` [PATCH v2 13/13] lkdtm: Add a test for function descriptors protection Christophe Leroy
2021-10-14  5:50   ` Christophe Leroy
2021-10-14  5:50   ` Christophe Leroy
2021-10-15 21:35   ` Kees Cook
2021-10-15 21:35     ` Kees Cook
2021-10-15 21:35     ` Kees Cook
2021-10-16  6:28     ` Christophe Leroy
2021-10-16  6:28       ` Christophe Leroy
2021-10-16  6:28       ` Christophe Leroy
2021-10-14 21:35 ` [PATCH v2 00/13] Fix LKDTM for PPC64/IA64/PARISC Daniel Axtens
2021-10-14 21:35   ` Daniel Axtens

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.