mirror of
https://github.com/dynup/kpatch
synced 2025-04-11 03:31:20 +00:00
The __mcount_loc section contains the addresses of patchable ftrace sites which is used by the ftrace infrastructure in the kernel to create a list of tracable functions and to know where to patch to enable tracing of them. On some kernel configurations, section is called __patchable_function_entries and is generated by the compiler. Either of __mcount_loc or __patchable_function_entries is recognised by the kernel but for these configurations, use __patchable_function_entries as it is what is expected. The x86_64 arch is special (of course). Unlike other arches (ppc64le and aarch64) a x86_64 kernel built with -fpatchable-function-entry will generate nops AND create rela__patchable_function_entries for functions even marked as notrace. For this arch, always create __mount_loc sections and rely on __fentry__ relocations to indicate ftrace call sites. Note: this patch is a refactoring of original code by Pete Swain <swine@google.com> for aarch64. At the same time, this version squashes several follow up commits from him and zimao <zimao@microsoft.com>. The intent is minimize the eventual changeset for aarch64 support now that other arches are making use of __patchable_function_entries sections. Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com> |
||
---|---|---|
.. | ||
gcc-plugins | ||
insn | ||
create-diff-object.c | ||
create-klp-module.c | ||
create-kpatch-module.c | ||
kpatch-build | ||
kpatch-cc | ||
kpatch-elf.c | ||
kpatch-elf.h | ||
kpatch-intermediate.h | ||
kpatch.h | ||
list.h | ||
log.h | ||
lookup.c | ||
lookup.h | ||
Makefile |