1
0
mirror of https://github.com/dynup/kpatch synced 2025-04-09 18:51:19 +00:00
kpatch/kpatch-build
Suraj Jitindar Singh fcae79f54b kpatch-build: Add sym->has_func_profiling support for aarch64
The "has_function_profiling" support field in the symbol struct is used to show
that a function symbol is able to be patched. This is necessary to check that
functions which need to be patched are able to be.

On arm64 this means the presence of 2 NOP instructions at function entry
which are patched by ftrace to call the ftrace handling code. These 2 NOPs
are inserted by the compiler and the location of them is recorded in a
section called "__patchable_function_entries". Check whether a symbol has a
corresponding entry in the "__patchable_function_entries" section and if so
mark it as "has_func_profiling".

Signed-off-by: Suraj Jitindar Singh <surajjs@amazon.com>

---

V1->V2:
 - Make error message standard across architectures when no patchable entry
 - Don't store __patchable_function_entries section in
   kpatch_find_func_profiling_calls(), instead find it each time
2024-09-05 11:32:17 +00:00
..
gcc-plugins gcc-plugin: update gcc-common.h for gcc-13 2023-03-16 22:05:43 -07:00
insn insn: get it to compile in create-diff-object 2014-05-30 15:19:57 -05:00
create-diff-object.c kpatch-build: Add sym->has_func_profiling support for aarch64 2024-09-05 11:32:17 +00:00
create-klp-module.c create-diff-object: rename "dynrela" -> "klp_reloc" 2022-12-01 14:00:09 -08:00
create-kpatch-module.c avoid reloc-type collisions on elf.h constants 2024-09-05 11:32:17 +00:00
kpatch-build kpatch-build: fail CONFIG_X86_KERNEL_IBT as not supported 2024-08-26 14:22:28 -04:00
kpatch-cc kpatch-build: ignore init/version-timestamp.o 2023-01-16 09:33:55 -05:00
kpatch-elf.c kpatch-build: Add sym->has_func_profiling support for aarch64 2024-09-05 11:32:17 +00:00
kpatch-elf.h kpatch-build: Add sym->has_func_profiling support for aarch64 2024-09-05 11:32:17 +00:00
kpatch-intermediate.h lookup: rename 'pos' to 'sympos' 2020-04-06 15:18:58 -05:00
kpatch.h kpatch-build: add exit status enum 2018-06-15 07:11:48 -04:00
list.h Fix undefined behavior problem when using list_foreach_entry 2023-08-10 00:22:53 +00:00
log.h create-diff-object: use errx() instead of err() 2022-11-30 12:58:31 -08:00
lookup.c lookup: skip duplicate local symbol table check for files without locals 2023-06-05 09:49:30 -07:00
lookup.h Switch to per-file lookup table pointers. 2021-08-17 09:37:44 +02:00
Makefile kpatch/s390: Enable kpatch build support 2022-05-20 15:50:29 +02:00