mirror of https://github.com/dynup/kpatch
6cf50a6fca
CONFIG_PRINTK_INDEX creates a static local struct variable named `_entry` for every call site to printk(). The initializer for that struct assigns the `__LINE__` macro to one of its fields. Similarly to the WARN macro's usage [1] of `__LINE__`, it causes problems because it results in the line number getting directly embedded in the struct. If a line is added or removed higher up in the source file, the `_entry` struct changes accordingly due to a change in the printk() call site line number. `_entry` is similar to other "special" static locals, in that we don't need to correlate the patched version with the original version. We can instead just ignore any changes to it. Any substantial (non-line-number) change to the `_entry` struct would be a second-order (dependent) effect of a first-order code change, which would be detected using other means. In that case the patched version of `_entry` will be included, due to being referenced by the changed function. Fixes: #1206 [1] See kpatch_line_macro_change_only() Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> |
||
---|---|---|
.. | ||
gcc-plugins | ||
insn | ||
Makefile | ||
create-diff-object.c | ||
create-klp-module.c | ||
create-kpatch-module.c | ||
kpatch-build | ||
kpatch-cc | ||
kpatch-elf.c | ||
kpatch-elf.h | ||
kpatch-intermediate.h | ||
kpatch.h | ||
list.h | ||
log.h | ||
lookup.c | ||
lookup.h |