mirror of https://github.com/dynup/kpatch
906bb8f393
The KPATCH_SYSCALL_DEFINEn macros in kpatch-syscall.h do not provide the same syscall metadata (saved in the __syscalls_metadata and _ftrace_events ELF sections) as the kernel. These same macros also instruct kpatch-build to ignore changes to these sections. This works fine as long as there are other unmodified syscalls present in the object file. However, if not, the kpatch syscall macros may result in either metadata ELF sections not appearing in the patched object file. The create-diff-object program expects to encounter any ELF section that has been marked by KPATCH_IGNORE_SECTION in the patched object file. To avoid this limitation, create dummy __syscalls_metadata and _ftrace_events entries for the kpatch-modified syscall. The specific values shouldn't matter since their sections will still be marked with KPATCH_IGNORE_SECTION and now their presence will be guarenteed for create-diff-object. Closes: #1375 ("kpatch-build error when modifying an object file's only syscall") Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com> |
||
---|---|---|
.. | ||
Makefile | ||
kpatch-macros.h | ||
kpatch-patch-hook.c | ||
kpatch-patch.h | ||
kpatch-syscall.h | ||
kpatch.h | ||
kpatch.lds.S | ||
livepatch-patch-hook.c | ||
patch-hook.c |