Skip to content

Draft: arm64 livepatch support

Joe Lawrence requested to merge joe.lawrence/centos-stream-9:klp-arm64-v13 into main

Backports for development purposes.

Pre-requisite patchsets:

* [PATCH -tip v11 00/27] kprobes: Fix stacktrace with kretprobes on x86
9a457aadba8d kprobes: Do not use local variable when creating debugfs file
a617c2f78ab5 kprobes: Use helper to parse boolean input from userspace
c07b5369a9f0 kprobe: Simplify prepare_kprobe() by dropping redundant version
eddb5af99f73 csky: ftrace: Drop duplicate implementation of arch_check_ftrace_location()
1f7b453cf672 kprobes: Make arch_check_ftrace_location static
58d50cc940f6 kprobes: treewide: Cleanup the error messages for kprobes
fbfad7f1ca66 kprobes: Fix coding style issues
f3ea29921b59 kprobes: Use IS_ENABLED() instead of kprobes_built_in()
ec0404809b83 kprobes: Add assertions for required lock
2577055e65a6 kprobes: treewide: Use 'kprobe_opcode_t *' for the code address in get_optimized_kprobe()
92769e7604d3 kprobes: Use bool type for functions which returns boolean value
20b67596eccd ia64: kprobes: Fix to pass correct trampoline address to the handler
ee6ca765655b kprobes: treewide: Replace arch_deref_entry_point() with dereference_symbol_descriptor()
74bba69e0a47 kprobes: treewide: Remove trampoline_address from kretprobe_trampoline_handler()
e3bacf96fd37 kprobes: treewide: Make it harder to refer kretprobe_trampoline directly
bab8d5151dc0 kprobes: Add kretprobe_find_ret_addr() for searching return address
7eb763a0bf61 objtool: Add frame-pointer-specific function ignore
40c6baf81a70 objtool: Ignore unwind hints for ignored functions
c10480c22327 x86/kprobes: Add UNWIND_HINT_FUNC on kretprobe_trampoline()
0774d7a3d8b6 ARC: Add instruction_pointer_set() API
48d17f922117 ia64: Add instruction_pointer_set() API
68feb27751a0 arm: kprobes: Make space for instruction pointer on stack
453111fa01a6 kprobes: Enable stacktrace from pt_regs in kretprobe handler
16e5994cf70c x86/kprobes: Push a fake return address at kretprobe_trampoline
a2cdf6e70f1c x86/unwind: Recover kretprobe trampoline entry
9c4bcc571183 tracing: Show kretprobe unknown indicator only for kretprobe_trampoline
7d31ea37d5e8 x86/kprobes: Fixup return address in generic trampoline handler

* [PATCH v3 0/9] kprobes: Make KUnit and add stacktrace on kretprobe tests
e44e81c5b90f kprobes: convert tests to kunit
1f6d3a8f5e39 kprobes: Add a test case for stacktrace from kretprobe handler
811b93ffaa48 x86/unwind: Compile kretprobe fixup code only if CONFIG_KRETPROBES=y
f87174106215 arm64: kprobes: Record frame pointer with kretprobe instance
fc6d647638a8 arm64: kprobes: Make a frame pointer on __kretprobe_trampoline
cd9bc2c92588 arm64: Recover kretprobe modified return address in stacktrace
b3ea5d56f212 ARM: clang: Do not rely on lr register for stacktrace
7e9bf33b8124 ARM: kprobes: Make a frame pointer on __kretprobe_trampoline
fed240d9c974 ARM: Recover kretprobe modified return address in stacktrace

* [PATCH] arm64: ftrace: use HAVE_FUNCTION_GRAPH_RET_ADDR_PTR
c6d3cd32fd00 arm64: ftrace: use HAVE_FUNCTION_GRAPH_RET_ADDR_PTR

* [PATCH v3 1/5] stacktrace: move filter_irq_stacks() to kernel/stacktrace.c
f39f21b3ddc7 stacktrace: move filter_irq_stacks() to kernel/stacktrace.c
	(rest of series skipped)

* [PATCH 0/9] arm64: stacktrace: unify unwind code
1614b2b11fab arch: Make ARCH_STACKWALK independent of STACKTRACE
	arch/s390/kernel/Makefile : diff context (no text_amode31.o)
	arch/powerpc/kernel/Makefile : diff context (no kdebugfs.o)
1e5428b2b7e8 arm64: Add comment for stack_info::kr_cur
86bcbafcb726 arm64: Mark __switch_to() as __sched
ed876d35a1dc arm64: Make perf_callchain_kernel() use arch_stack_walk()
4f62bb7cb165 arm64: Make __get_wchan() use arch_stack_walk()
39ef362d2d45 arm64: Make return_address() use arch_stack_walk()
22ecd975b61d arm64: Make profile_pc() use arch_stack_walk()
2dad6dc17bd0 arm64: Make dump_backtrace() use arch_stack_walk()
d2d1d2645cfd arm64: Make some stacktrace functions private

* [PATCH] arm64: Mark start_backtrace() notrace and NOKPROBE_SYMBOL
1e0924bd0991 arm64: Mark start_backtrace() notrace and NOKPROBE_SYMBOL

* [PATCH v18 00/15] arm64: MMU enabled kexec relocation
	(series skipped)

* [PATCH 1/3] ftrace: simplify the Kconfig dependency of FTRACE
	(series skipped)

Upstream livepatch updates for arm64:

* [PATCH v13 00/11] arm64: Reorganize the unwinder and implement stack trace reliability checks
699c5d5ddf0d arm64: Remove NULL task check from unwind_frame()
325262432712 arm64: Rename unwinder functions
baf2e0e46e6d arm64: Rename stackframe to unwind_state
2a1784815ad5 arm64: Split unwind_init()
ec9eb43548da arm64: Copy the task argument to unwind_state
6014c28f18cb arm64: Use stack_trace_consume_fn and rename args to unwind()
1df750a3e82e arm64: Make the unwind loop in unwind() similar to other architectures
a7081adcc0d3 arm64: Introduce stack trace reliability checks in the unwinder
6017ecbabbbf arm64: Create a list of SYM_CODE functions, check return PC against list
	diff context: 19a046f07ce5 arm64: kexec: use ld script for relocation function
	no __relocate_new_kernel_start
	skip series: [PATCH v18 00/15] arm64: MMU enabled kexec relocation
906f9c5b0c6c arm64: Introduce arch_stack_walk_reliable()
9557b2314d5f arm64: Select HAVE_RELIABLE_STACKTRACE
	diff context: 4aae683f1327 tracing: Refactor TRACE_IRQFLAGS_SUPPORT in Kconfig
	no TRACE_IRQFLAGS_SUPPORT
	skip series: [PATCH 1/3] ftrace: simplify the Kconfig dependency of FTRACE
2e727146d10c FIXME: DEBUG_ONLY remove STACK_VALIDATION dependency
	context: 4aae683f1327 tracing: Refactor TRACE_IRQFLAGS_SUPPORT in Kconfig
	skip series: [PATCH 1/3] ftrace: simplify the Kconfig dependency of FTRACE

* [PATCH] arm64: module: Use aarch64_insn_write when updating relocations later on
c473fa6179cc arm64: module: Use aarch64_insn_write when updating relocations later on

* [RFC PATCH 1/1] arm64: implement live patching
dbd54fa00320 (asavkov/kpatch/aarch64) arm64: implement live patching

Merge request reports