arch/x86: kprobes: Remove MODULES dependency
Status from this message: The following commit has been merged into the perf/core branch of tip:
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 Latest posting 2/26 patches 38 repliesApplied
- v5 posting 1/23 of 6 patches 0 repliesSuperseded
- v47 patches 9 repliesSuperseded
Earlier versions · 3
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v3 | 3 patches | 13 replies | Superseded | |
| v2 | 3 patches | 23 replies | Superseded | |
| v1 | 3 patches | 13 replies | Superseded |
v4 from the cover letter
* Squash lock_modules() patches into one.
* Remove fallback versions of text_alloc() and text_free(). Instead, use ARCH_HAS_TEXT_ALLOC at site when required.
* Use lockdep_assert_irqs_enabled() in text_free() instead of WARN_ON(in_interrupt()).
Patches in v5 posting 2/2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | kprobes: Remove dependency to the module_mutexinclude/ kernel/ kernel/ | +22 | 11 replies | |
| 2/6 | vmalloc: Add text_alloc() and text_free()include/ | +17 | 2 replies | |
| 3/6 | arch/x86: Implement text_alloc() and text_free()arch/ arch/ arch/ | +45 | 2 replies | |
| 4/6 | arch/x86: kprobes: Use text_alloc() and text_free()arch/ | +2 | 0 replies | |
| 5/6 | kprobes: Use text_alloc() and text_free()kernel/ | +9 | 21 replies | |
| 6/6 | kprobes: Remove CONFIG_MODULES dependencyarch/ include/ kernel/ +1 more | +52 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.
Cover letter [PATCH v5 0/6] arch/x86: kprobes: Remove MODULES dependency
Remove MODULES dependency by migrating from module_alloc() to the new text_alloc() API. Essentially these changes provide preliminaries for allowing to compile a static kernel with a proper tracing support.
The same API can be used later on in other sites that allocate space for trampolines, and trivially scaled to other arch's. An arch can inform with CONFIG_ARCH_HAS_TEXT_ALLOC that it's providing implementation for text_alloc().
v4:
* Squash lock_modules() patches into one.
* Remove fallback versions of text_alloc() and text_free(). Instead, use ARCH_HAS_TEXT_ALLOC at site when required.
* Use lockdep_assert_irqs_enabled() in text_free() instead of WARN_ON(in_interrupt()).
v3:
* Make text_alloc() API disjoint.
* Remove all the possible extra clutter not absolutely required and split into more logical pieces.
Jarkko Sakkinen (6):
kprobes: Remove dependency to the module_mutex
vmalloc: Add text_alloc() and text_free() arch/x86: Implement text_alloc() and text_free() arch/x86: kprobes: Use text_alloc() and text_free()
kprobes: Use text_alloc() and text_free()
kprobes: Remove CONFIG_MODULES dependency
arch/Kconfig | 2 +- arch/x86/Kconfig | 3 ++ arch/x86/kernel/Makefile | 1 + arch/x86/kernel/kprobes/core.c | 4 +-- arch/x86/kernel/text_alloc.c | 41 +++++++++++++++++++++++ include/linux/module.h | 32 ++++++++++++++---- include/linux/vmalloc.h | 17 ++++++++++ kernel/kprobes.c | 61 +++++++++++++++++++++++----------- kernel/trace/trace_kprobe.c | 20 ++++++++--- 9 files changed, 147 insertions(+), 34 deletions(-) create mode 100644 arch/x86/kernel/text_alloc.c
Signature · 1 line
2.25.1