Build and install the kpatch core module with make and make install,
rather than building it every time with kpatch build.
The only downside to this approach is that the user has to make and make
install kpatch every time they get a new kernel. But this is only
temporary, until the kpatch module is delivered in an RPM.
- setup the makefiles to support "make" and "make install", which builds
the kpatch-build tools and installs everything in /usr/local.
- update kpatch-build to support new paths
- add "kpatch build" wrapper around kpatch-build
This changes the way the trampoline code works, thanks to a suggestion
by Steve Rostedt. Before, the trampoline was mucking with the stack
pointer and other registers, and jumping to the new function directly.
With this change, all it does is set regs->ip to the address of the new
function and return back to ftrace. When ftrace returns, it will return
to the beginning of the new function.
- fix real issue with 0's in the middle of a merged section (wrong
alignment)
- show patch util output in case it asks a question so it doesn't
silently fail
- fix issue with relocation of local objects (because they become global
objects)
- allow changes to .rela.initcall*. they should be instead caught by
the relocation comparison code.
- fix issue in compare symbols when the symbol section index has changed
but the sections themselves are the same
- in compare_symbols, when a new STT_SECTION symbol is added, ignore it.
it will be caught instead by the section comparison code
- fix issue in kpatch-gcc script that was causing gcc command lines
containing quotes to fail
The end-to-end patching works. From object analysis to generation to
runtime patching. It's still missing the scripting piece that will only
take a patch and kernel source dir as input.