Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion kpatch-build/create-diff-object.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ static void kpatch_bundle_symbols(struct kpatch_elf *kelf)
{
struct symbol *sym;
unsigned int expected_offset;
unsigned int directcall_offset = 16;

list_for_each_entry(sym, &kelf->symbols, list) {
if (is_bundleable(sym)) {
Expand All @@ -247,7 +248,8 @@ static void kpatch_bundle_symbols(struct kpatch_elf *kelf)
else
expected_offset = 0;

if (sym->sym.st_value != expected_offset) {
if (sym->sym.st_value != expected_offset &&
!(getenv("CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS") && sym->sym.st_value == directcall_offset)) {
ERROR("symbol %s at offset %lu within section %s, expected %u",
sym->name, sym->sym.st_value,
sym->sec->name, expected_offset);
Expand Down
2 changes: 2 additions & 0 deletions kpatch-build/kpatch-build
Original file line number Diff line number Diff line change
Expand Up @@ -1186,6 +1186,8 @@ else
KBUILD_EXTRA_SYMBOLS="$SYMVERSFILE"
fi

grep -q "CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS=y" "$CONFIGFILE" && export CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS=1

# unsupported kernel option checking
[[ -n "$CONFIG_DEBUG_INFO_SPLIT" ]] && die "kernel option 'CONFIG_DEBUG_INFO_SPLIT' not supported"
[[ -n "$CONFIG_GCC_PLUGIN_LATENT_ENTROPY" ]] && die "kernel option 'CONFIG_GCC_PLUGIN_LATENT_ENTROPY' not supported"
Expand Down