mirror of
https://github.com/dynup/kpatch
synced 2025-02-07 12:41:34 +00:00
create-diff-object: support __LINE__ detection for btrfs macros
These btrfs macros use the `__LINE__` macro. Add proper support for them in kpatch_line_macro_change_only(). 5: ba 34 09 00 00 mov $0x934,%edx a: 48 c7 c6 00 00 00 00 mov $0x0,%rsi d: R_X86_64_32S .rodata.__func__.5 11: 4c 89 ef mov %r13,%rdi 14: e8 00 00 00 00 callq 19 <push_node_left.cold+0x19> 15: R_X86_64_PLT32 __btrfs_abort_transaction-0x4 Fixes #1253. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
This commit is contained in:
parent
af672577b3
commit
1152e58244
@ -733,7 +733,8 @@ static bool kpatch_line_macro_change_only(struct kpatch_elf *kelf,
|
||||
continue;
|
||||
|
||||
if (!strncmp(rela->sym->name, "__warned.", 9) ||
|
||||
!strncmp(rela->sym->name, "__already_done.", 15))
|
||||
!strncmp(rela->sym->name, "__already_done.", 15) ||
|
||||
!strncmp(rela->sym->name, "__func__.", 9))
|
||||
continue;
|
||||
|
||||
if (!strncmp(rela->sym->name, "warn_slowpath_", 14) ||
|
||||
@ -742,7 +743,10 @@ static bool kpatch_line_macro_change_only(struct kpatch_elf *kelf,
|
||||
!strcmp(rela->sym->name, "___might_sleep") ||
|
||||
!strcmp(rela->sym->name, "__might_fault") ||
|
||||
!strcmp(rela->sym->name, "printk") ||
|
||||
!strcmp(rela->sym->name, "lockdep_rcu_suspicious")) {
|
||||
!strcmp(rela->sym->name, "lockdep_rcu_suspicious") ||
|
||||
!strcmp(rela->sym->name, "__btrfs_abort_transaction") ||
|
||||
!strcmp(rela->sym->name, "__btrfs_handle_fs_error") ||
|
||||
!strcmp(rela->sym->name, "__btrfs_panic")) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user