kpatch/test
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
..
integration kpatch-test: disable replace flag when the kernel doesn't support it 2021-05-25 15:22:27 -07:00
unit create-diff-object: Support CONFIG_PRINTK_INDEX, part 1 2021-08-11 08:46:32 -07:00
difftree.sh test: Ignore remaining quoting warnings 2020-06-04 20:30:28 +01:00
test-functions.sh test/unit: add a library for common functions 2018-04-20 08:16:20 -05:00