kpatch/kpatch-build
Josh Poimboeuf 6cf50a6fca create-diff-object: Support CONFIG_PRINTK_INDEX, part 1
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>
2021-08-11 08:46:32 -07:00
..
gcc-plugins
insn
Makefile kpatch-build: clang support 2021-02-17 12:59:51 +01:00
create-diff-object.c create-diff-object: Support CONFIG_PRINTK_INDEX, part 1 2021-08-11 08:46:32 -07:00
create-klp-module.c
create-kpatch-module.c
kpatch-build kpatch-build: set EXTRAVERSION and not localversion for RH kernels 2021-07-02 16:34:27 -04:00
kpatch-cc kpatch-build: clang support 2021-02-17 12:59:51 +01:00
kpatch-elf.c
kpatch-elf.h
kpatch-intermediate.h
kpatch.h
list.h
log.h
lookup.c create-diff-object: clang __UNIQUE_ID symbol support 2021-02-17 12:59:54 +01:00
lookup.h