Comments (2)
Here is simpler reproducer, with base kernel containing kernel/test3.c with content:
#include <linux/init.h>
#include <linux/export.h>
static int dummy;
void test_function30(void)
{
dummy = 1;
}
void test_function31(void)
{
dummy = 2;
}
EXPORT_SYMBOL(test_function30);
EXPORT_SYMBOL(test_function31);
and kpatch patch:
diff --git a/kernel/test3.c b/kernel/test3.c
index 50d3c86..91a43a1 100644
--- a/kernel/test3.c
+++ b/kernel/test3.c
@@ -5,7 +5,9 @@ static int dummy;
void test_function30(void)
{
- dummy = 1;
+ int i;
+ for (i = 0; i < 10; i++)
+ dummy += i;
}
void test_function31(void)
# /usr/local/libexec/kpatch/create-diff-object orig/kernel/test3.o patched/kernel/test3.o /root/vmlinux output/kernel/test3.o
=== section list (22) ===
ndx 01, type: 1, data (nil), size 0, name .text
ndx 02, type: 1, data 0x7fd4e9fff040, size 21, name .text.test_function30
ndx 03, type: 4, data 0x7fd4e9fffb88, size 48, name .rela.text.test_function30
ndx 04, type: 1, data 0x7fd4e9fff060, size 21, name .text.test_function31
ndx 05, type: 4, data 0x7fd4e9fffbb8, size 48, name .rela.text.test_function31
ndx 06, type: 1, data 0x7fd4e9fff080, size 16, name ___ksymtab+test_function31
ndx 07, type: 4, data 0x7fd4e9fffbe8, size 48, name .rela___ksymtab+test_function31
ndx 08, type: 1, data 0x7fd4e9fff090, size 32, name __ksymtab_strings
ndx 09, type: 1, data 0x7fd4e9fff0b0, size 8, name ___kcrctab+test_function31
ndx 10, type: 4, data 0x7fd4e9fffc18, size 24, name .rela___kcrctab+test_function31
ndx 11, type: 1, data 0x7fd4e9fff0c0, size 16, name ___ksymtab+test_function30
ndx 12, type: 4, data 0x7fd4e9fffc30, size 48, name .rela___ksymtab+test_function30
ndx 13, type: 1, data 0x7fd4e9fff0d0, size 8, name ___kcrctab+test_function30
ndx 14, type: 4, data 0x7fd4e9fffc60, size 24, name .rela___kcrctab+test_function30
ndx 15, type: 1, data (nil), size 0, name .data
ndx 16, type: 8, data (nil), size 0, name .bss
ndx 17, type: 8, data (nil), size 4, name .bss.dummy
ndx 18, type: 1, data 0x7fd4e9fff0d8, size 46, name .comment
ndx 19, type: 1, data (nil), size 0, name .note.GNU-stack
ndx 20, type: 3, data 0x7fd4e9fff106, size 280, name .shstrtab
ndx 21, type: 2, data 0x7fd4e9fff7e0, size 672, name .symtab
ndx 22, type: 3, data 0x7fd4e9fffa80, size 258, name .strtab
=== symbol list (28 entries) ===
sym 00, type 0, bind 0, ndx 00, name
sym 01, type 3, bind 0, ndx 08, name __ksymtab_strings -> __ksymtab_strings
sym 02, type 3, bind 0, ndx 17, name .bss.dummy -> .bss.dummy
sym 03, type 4, bind 0, ndx 65521, name test3.c
sym 04, type 1, bind 0, ndx 17, name dummy -> .bss.dummy
sym 05, type 1, bind 0, ndx 06, name __ksymtab_test_function31 -> ___ksymtab+test_function31
sym 06, type 1, bind 0, ndx 08, name __kstrtab_test_function31 -> __ksymtab_strings
sym 07, type 1, bind 0, ndx 09, name __kcrctab_test_function31 -> ___kcrctab+test_function31
sym 08, type 1, bind 0, ndx 11, name __ksymtab_test_function30 -> ___ksymtab+test_function30
sym 09, type 1, bind 0, ndx 08, name __kstrtab_test_function30 -> __ksymtab_strings
sym 10, type 1, bind 0, ndx 13, name __kcrctab_test_function30 -> ___kcrctab+test_function30
sym 11, type 4, bind 0, ndx 65521, name
sym 12, type 3, bind 0, ndx 01, name .text -> .text
sym 13, type 3, bind 0, ndx 02, name .text.test_function30 -> .text.test_function30
sym 14, type 3, bind 0, ndx 04, name .text.test_function31 -> .text.test_function31
sym 15, type 3, bind 0, ndx 06, name ___ksymtab+test_function31 -> ___ksymtab+test_function31
sym 16, type 3, bind 0, ndx 09, name ___kcrctab+test_function31 -> ___kcrctab+test_function31
sym 17, type 3, bind 0, ndx 11, name ___ksymtab+test_function30 -> ___ksymtab+test_function30
sym 18, type 3, bind 0, ndx 13, name ___kcrctab+test_function30 -> ___kcrctab+test_function30
sym 19, type 3, bind 0, ndx 15, name .data -> .data
sym 20, type 3, bind 0, ndx 16, name .bss -> .bss
sym 21, type 3, bind 0, ndx 18, name .comment -> .comment
sym 22, type 3, bind 0, ndx 19, name .note.GNU-stack -> .note.GNU-stack
sym 23, type 2, bind 1, ndx 04, name test_function31 -> .text.test_function31
sym 24, type 0, bind 1, ndx 65521, name __crc_test_function30
sym 25, type 0, bind 1, ndx 00, name __fentry__
sym 26, type 0, bind 1, ndx 65521, name __crc_test_function31
sym 27, type 2, bind 1, ndx 02, name test_function30 -> .text.test_function30
=== rela list for .text.test_function30 (2 entries) ===
offset 1, type 0, __fentry__ - 4
offset 8, type 2, .bss.dummy - 8
=== rela list for .text.test_function31 (2 entries) ===
offset 1, type 0, __fentry__ - 4
offset 8, type 2, .bss.dummy - 8
=== rela list for ___ksymtab+test_function31 (2 entries) ===
offset 0, type 1, test_function31 + 0
offset 8, type 1, __ksymtab_strings + 0
=== rela list for ___kcrctab+test_function31 (1 entries) ===
offset 0, type 1, __crc_test_function31 + 0
=== rela list for ___ksymtab+test_function30 (2 entries) ===
offset 0, type 1, test_function30 + 0
offset 8, type 1, __ksymtab_strings + 16
=== rela list for ___kcrctab+test_function30 (1 entries) ===
offset 0, type 1, __crc_test_function30 + 0
=== section list (22) ===
ndx 01, type: 1, data (nil), size 0, name .text
ndx 02, type: 1, data 0x7fd4e9ffd040, size 42, name .text.test_function30
ndx 03, type: 4, data 0x7fd4e9ffdb98, size 72, name .rela.text.test_function30
ndx 04, type: 1, data 0x7fd4e9ffd070, size 21, name .text.test_function31
ndx 05, type: 4, data 0x7fd4e9ffdbe0, size 48, name .rela.text.test_function31
ndx 06, type: 1, data 0x7fd4e9ffd090, size 16, name ___ksymtab+test_function31
ndx 07, type: 4, data 0x7fd4e9ffdc10, size 48, name .rela___ksymtab+test_function31
ndx 08, type: 1, data 0x7fd4e9ffd0a0, size 32, name __ksymtab_strings
ndx 09, type: 1, data 0x7fd4e9ffd0c0, size 8, name ___kcrctab+test_function31
ndx 10, type: 4, data 0x7fd4e9ffdc40, size 24, name .rela___kcrctab+test_function31
ndx 11, type: 1, data 0x7fd4e9ffd0d0, size 16, name ___ksymtab+test_function30
ndx 12, type: 4, data 0x7fd4e9ffdc58, size 48, name .rela___ksymtab+test_function30
ndx 13, type: 1, data 0x7fd4e9ffd0e0, size 8, name ___kcrctab+test_function30
ndx 14, type: 4, data 0x7fd4e9ffdc88, size 24, name .rela___kcrctab+test_function30
ndx 15, type: 1, data (nil), size 0, name .data
ndx 16, type: 8, data (nil), size 0, name .bss
ndx 17, type: 8, data (nil), size 4, name .bss.dummy
ndx 18, type: 1, data 0x7fd4e9ffd0e8, size 46, name .comment
ndx 19, type: 1, data (nil), size 0, name .note.GNU-stack
ndx 20, type: 3, data 0x7fd4e9ffd116, size 280, name .shstrtab
ndx 21, type: 2, data 0x7fd4e9ffd7f0, size 672, name .symtab
ndx 22, type: 3, data 0x7fd4e9ffda90, size 258, name .strtab
=== symbol list (28 entries) ===
sym 00, type 0, bind 0, ndx 00, name
sym 01, type 3, bind 0, ndx 08, name __ksymtab_strings -> __ksymtab_strings
sym 02, type 3, bind 0, ndx 17, name .bss.dummy -> .bss.dummy
sym 03, type 4, bind 0, ndx 65521, name test3.c
sym 04, type 1, bind 0, ndx 17, name dummy -> .bss.dummy
sym 05, type 1, bind 0, ndx 06, name __ksymtab_test_function31 -> ___ksymtab+test_function31
sym 06, type 1, bind 0, ndx 08, name __kstrtab_test_function31 -> __ksymtab_strings
sym 07, type 1, bind 0, ndx 09, name __kcrctab_test_function31 -> ___kcrctab+test_function31
sym 08, type 1, bind 0, ndx 11, name __ksymtab_test_function30 -> ___ksymtab+test_function30
sym 09, type 1, bind 0, ndx 08, name __kstrtab_test_function30 -> __ksymtab_strings
sym 10, type 1, bind 0, ndx 13, name __kcrctab_test_function30 -> ___kcrctab+test_function30
sym 11, type 4, bind 0, ndx 65521, name
sym 12, type 3, bind 0, ndx 01, name .text -> .text
sym 13, type 3, bind 0, ndx 02, name .text.test_function30 -> .text.test_function30
sym 14, type 3, bind 0, ndx 04, name .text.test_function31 -> .text.test_function31
sym 15, type 3, bind 0, ndx 06, name ___ksymtab+test_function31 -> ___ksymtab+test_function31
sym 16, type 3, bind 0, ndx 09, name ___kcrctab+test_function31 -> ___kcrctab+test_function31
sym 17, type 3, bind 0, ndx 11, name ___ksymtab+test_function30 -> ___ksymtab+test_function30
sym 18, type 3, bind 0, ndx 13, name ___kcrctab+test_function30 -> ___kcrctab+test_function30
sym 19, type 3, bind 0, ndx 15, name .data -> .data
sym 20, type 3, bind 0, ndx 16, name .bss -> .bss
sym 21, type 3, bind 0, ndx 18, name .comment -> .comment
sym 22, type 3, bind 0, ndx 19, name .note.GNU-stack -> .note.GNU-stack
sym 23, type 2, bind 1, ndx 04, name test_function31 -> .text.test_function31
sym 24, type 0, bind 1, ndx 65521, name __crc_test_function30
sym 25, type 0, bind 1, ndx 00, name __fentry__
sym 26, type 0, bind 1, ndx 65521, name __crc_test_function31
sym 27, type 2, bind 1, ndx 02, name test_function30 -> .text.test_function30
=== rela list for .text.test_function30 (3 entries) ===
offset 1, type 0, __fentry__ - 4
offset 7, type 2, .bss.dummy - 4
offset 36, type 2, .bss.dummy - 4
=== rela list for .text.test_function31 (2 entries) ===
offset 1, type 0, __fentry__ - 4
offset 8, type 2, .bss.dummy - 8
=== rela list for ___ksymtab+test_function31 (2 entries) ===
offset 0, type 1, test_function31 + 0
offset 8, type 1, __ksymtab_strings + 0
=== rela list for ___kcrctab+test_function31 (1 entries) ===
offset 0, type 1, __crc_test_function31 + 0
=== rela list for ___ksymtab+test_function30 (2 entries) ===
offset 0, type 1, test_function30 + 0
offset 8, type 1, __ksymtab_strings + 16
=== rela list for ___kcrctab+test_function30 (1 entries) ===
offset 0, type 1, __crc_test_function30 + 0
section .text.test_function30 has changed
section .rela.text.test_function30 has changed
section .symtab has changed
test3.o: symbol info mismatch:
/usr/local/libexec/kpatch/create-diff-object: unreconcilable difference
from kpatch.
I can't recreate the "symbol info mismatch" issue with the latest master 6aee215. I do get the:
signal.o: signal.o: changed section .rela__jump_table not selected for inclusion
signal.o: 1 unsupported section change(s)
which is being track in issue #157. Can you confirm?
from kpatch.
Related Issues (20)
- integration tests: CONFIG_MODVERSIONS and linux-5.18.0/symvers-disagreement-FAIL.patch HOT 8
- After the kpatch install "xxx. ko" on openeuler, the machine was restarted. The kpatch service failed, resulting in the kernel patch restart not taking effect
- What do I need to do to support riscv64? HOT 11
- ERROR: testmod_drv.o: .return_sites section header details differ from .return_sites HOT 20
- Need suggestions for CONFIG_LTO_CLANG support HOT 40
- New error building patch for 6.2-rc2? HOT 12
- kpatch-build errors for kernel v6.1.4 HOT 4
- ubsan for kpatch HOT 2
- find_local_syms for <modified-file>: found_none HOT 2
- 6.3 failure with setlocalversion HOT 5
- Outstanding clang issues for 6.2 HOT 3
- x86 NOP padded functions without __pfx_ symbol HOT 4
- Linux 6.1 LTS: livepatch module fails to load HOT 26
- create-diff-object static local variable correlation and inlining HOT 5
- 1.0 release HOT 2
- Do we need more robust archeticture protection HOT 4
- kpatch-build: verify_patch_files might miss a parameter HOT 2
- ERROR in find_local_syms, couldn't find matching XXX local symbols in vmlinux symbol table HOT 14
- Can you add support for Rocky and Alma? HOT 1
- relocation with type R_X86_64_GOTPCREL is not supported HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kpatch.