mirror of
https://github.com/torvalds/linux.git
synced 2026-10-24 16:55:02 +02:00
A patch can move a symbol between static and global without renaming it: dropping "static" from a helper so something else can call it, or adding it to one that is no longer shared. Correlation keys off more than the name, so a symbol whose binding moved has to still pair with itself. Failing to is not a build failure. The symbol looks new, and a new data symbol is either rejected or cloned as a second copy -- at which point the patched code updates its own private variable while the rest of the kernel keeps reading the original. The test covers both directions in one fixture, a function going global and a variable going static, and asserts the outcome rather than the absence of a warning: each symbol resolves back to the kernel's copy through a klp symbol, and neither is cloned into the patch. An earlier version asserted only that no "no correlation" or "changed data" message appeared, and passed with correlation deliberately broken. What the messages say and what the patch contains are not the same question. Verified to fail with correlation made to require matching symbol bindings. Assisted-by: Claude:claude-opus-4 Based-on-test-by: Joe Lawrence <joe.lawrence@redhat.com> Assisted-by: Claude:claude-opus-5 Signed-off-by: Song Liu <song@kernel.org> Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://patch.msgid.link/20260916184351.2720310-43-song@kernel.org |
||
|---|---|---|
| .. | ||
| arch | ||
| Documentation | ||
| include/objtool | ||
| tests | ||
| .gitignore | ||
| Build | ||
| builtin-check.c | ||
| builtin-klp.c | ||
| check.c | ||
| disas.c | ||
| elf.c | ||
| klp-checksum.c | ||
| klp-diff.c | ||
| klp-post-link.c | ||
| klp-symid.c | ||
| klp-sympos.c | ||
| Makefile | ||
| noreturns.h | ||
| objtool.c | ||
| orc_dump.c | ||
| orc_gen.c | ||
| signal.c | ||
| special.c | ||
| sync-check.sh | ||
| trace.c | ||
| weak.c | ||