live-patching.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 00/11] livepatch,module: Remove .klp.arch and module_disable_ro()
@ 2020-04-29 15:24 Josh Poimboeuf
  2020-04-29 15:24 ` [PATCH v4 01/11] livepatch: Disallow vmlinux.ko Josh Poimboeuf
                   ` (13 more replies)
  0 siblings, 14 replies; 26+ messages in thread
From: Josh Poimboeuf @ 2020-04-29 15:24 UTC (permalink / raw)
  To: live-patching
  Cc: linux-kernel, Peter Zijlstra, Jessica Yu, Joe Lawrence, Miroslav Benes

v4:
- Fixed rebase bisection regression [Miroslav]
- Made module_enable_ro() static [Jessica]
- Added Acked-by's

v3:
- klp: split klp_write_relocations() into object/section specific
  functions [joe]
- s390: fix plt/got writes [joe]
- s390: remove text_mutex usage [mbenes]
- x86: do text_poke_sync() before releasing text_mutex [peterz]
- split x86 text_mutex changes into separate patch [mbenes]

v2:
- add vmlinux.ko check [peterz]
- remove 'klp_object' forward declaration [mbenes]
- use text_mutex [jeyu]
- fix documentation TOC [jeyu]
- fix s390 issues [mbenes]
- upstream kpatch-build now supports this
  (though it's only enabled for Linux >= 5.8)

These patches add simplifications and improvements for some issues Peter
found six months ago, as part of his non-writable text code (W^X)
cleanups.

Highlights:

- Remove the livepatch arch-specific .klp.arch sections, which were used
  to do paravirt patching and alternatives patching for livepatch
  replacement code.

- Add support for jump labels in patched code (only for static keys
  which live in vmlinux).

- Remove the last module_disable_ro() usage.

For more background, see this thread:

  https://lkml.kernel.org/r/20191021135312.jbbxsuipxldocdjk@treble

This has been tested with kpatch-build integration tests and klp-convert
selftests.


Josh Poimboeuf (8):
  livepatch: Disallow vmlinux.ko
  livepatch: Apply vmlinux-specific KLP relocations early
  livepatch: Prevent module-specific KLP rela sections from referencing
    vmlinux symbols
  s390: Change s390_kernel_write() return type to match memcpy()
  livepatch: Remove module_disable_ro() usage
  module: Remove module_disable_ro()
  x86/module: Use text_mutex in apply_relocate_add()
  module: Make module_enable_ro() static again

Peter Zijlstra (3):
  livepatch: Remove .klp.arch
  s390/module: Use s390_kernel_write() for late relocations
  x86/module: Use text_poke() for late relocations

 Documentation/livepatch/module-elf-format.rst |  15 +-
 arch/s390/include/asm/uaccess.h               |   2 +-
 arch/s390/kernel/module.c                     | 147 +++++++++------
 arch/s390/mm/maccess.c                        |   9 +-
 arch/um/kernel/um_arch.c                      |  16 ++
 arch/x86/kernel/Makefile                      |   1 -
 arch/x86/kernel/livepatch.c                   |  53 ------
 arch/x86/kernel/module.c                      |  43 ++++-
 include/linux/livepatch.h                     |  17 +-
 include/linux/module.h                        |   8 -
 kernel/livepatch/core.c                       | 177 +++++++++++-------
 kernel/module.c                               |  27 +--
 12 files changed, 279 insertions(+), 236 deletions(-)
 delete mode 100644 arch/x86/kernel/livepatch.c

-- 
2.21.1


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

end of thread, other threads:[~2020-06-05 14:39 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-29 15:24 [PATCH v4 00/11] livepatch,module: Remove .klp.arch and module_disable_ro() Josh Poimboeuf
2020-04-29 15:24 ` [PATCH v4 01/11] livepatch: Disallow vmlinux.ko Josh Poimboeuf
2020-04-29 15:24 ` [PATCH v4 02/11] livepatch: Apply vmlinux-specific KLP relocations early Josh Poimboeuf
2020-04-29 15:24 ` [PATCH v4 03/11] livepatch: Remove .klp.arch Josh Poimboeuf
2020-04-29 15:24 ` [PATCH v4 04/11] livepatch: Prevent module-specific KLP rela sections from referencing vmlinux symbols Josh Poimboeuf
2020-04-29 15:24 ` [PATCH v4 05/11] s390: Change s390_kernel_write() return type to match memcpy() Josh Poimboeuf
2020-05-07 13:36   ` Jiri Kosina
2020-05-07 16:01     ` Gerald Schaefer
2020-04-29 15:24 ` [PATCH v4 06/11] s390/module: Use s390_kernel_write() for late relocations Josh Poimboeuf
2020-05-07 10:00   ` Jiri Kosina
2020-05-07 12:27     ` Gerald Schaefer
2020-04-29 15:24 ` [PATCH v4 07/11] x86/module: Use text_poke() " Josh Poimboeuf
2020-04-29 15:24 ` [PATCH v4 08/11] livepatch: Remove module_disable_ro() usage Josh Poimboeuf
2020-04-29 15:24 ` [PATCH v4 09/11] module: Remove module_disable_ro() Josh Poimboeuf
2020-04-29 15:24 ` [PATCH v4 10/11] x86/module: Use text_mutex in apply_relocate_add() Josh Poimboeuf
2020-04-29 15:24 ` [PATCH v4 11/11] module: Make module_enable_ro() static again Josh Poimboeuf
2020-04-30 11:10   ` Jessica Yu
2020-04-30 11:35     ` Miroslav Benes
2020-04-30 11:40       ` Jessica Yu
2020-04-30 12:23         ` Jessica Yu
2020-06-05 13:24   ` Guenter Roeck
2020-06-05 14:20     ` Jessica Yu
2020-06-05 14:39       ` Josh Poimboeuf
2020-04-30 11:33 ` [PATCH v4 00/11] livepatch,module: Remove .klp.arch and module_disable_ro() Jessica Yu
2020-05-04 22:20 ` Jiri Kosina
2020-05-07 22:17 ` Jiri Kosina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).