kpatch/kmod/patch
Josh Poimboeuf a8a037271d macros: add KPATCH_PRINTK macro
Use this instead of calling printk to avoid unwanted compiler
optimizations which cause kpatch-build errors.

The printk function is annotated with the __cold attribute, which tells
gcc that the function is unlikely to be called.  A side effect of this
is that code paths containing calls to printk might also be marked cold,
leading to other functions called in those code paths getting moved into
.text.unlikely or being uninlined.

This macro places printk in its own code path so as not to make the
surrounding code path cold.

I have a related integration test to add, but right now it's broken
because we don't yet properly support the __verbose special section.
That'll be another PR.

Fixes #296.
2014-07-31 23:11:20 -05:00
..
kpatch-macros.h macros: add KPATCH_PRINTK macro 2014-07-31 23:11:20 -05:00
kpatch-patch-hook.c support forced patching 2014-07-02 14:06:33 -05:00
kpatch-patch.h fixup review comments 2014-07-01 12:22:16 -05:00
kpatch.h build and install core module with make 2014-02-18 07:44:33 -06:00
kpatch.lds support forced patching 2014-07-02 14:06:33 -05:00
Makefile build and install core module with make 2014-02-18 07:44:33 -06:00