Merge pull request #434 from useidel/master

added missing options -v, -t and -d
readme: enable RHEL 7 optional repo

needed for pesign, newt-devel, pciutils-devel, asciidoc
readme: get ccache from EPEL for RHEL 7
Merge pull request #435 from jpoimboe/rhel7-optional-repo

readme: enable RHEL 7 optional repo
test: improve macro-hooks patch

Restore aio_max_nr to its original value when unloading.

Also move the location of the patch hunk to be not at the end of the
file.  Otherwise we hit a weird combinediff bug which results in the
diff's context being removed.
make "descriptor" a special static local variable

The "descriptor" static local variables and their containing __verbose
section are used for dynamic debug printks.  They should be considered
as special static local variable symbols because they have the same
requirements: they should never be correlated and they should only be
included if referenced by an included function.
check that logfile exists before printing message

Don't tell the user to check a log file that doesn't exist

Signed-off-by: Seth Jennings <sjenning@redhat.com>
Merge pull request #437 from spartacus06/cleanup

check that logfile exists before printing message
remove "no changed functions" messages

When patching a shared header file, don't spam the user with hundreds of
lines of "no changed functions" messages.  We expect the user to be
proactive with verifying that the right functions are being patched
anyway, so this message isn't strictly necessary.
Allow user to skip gcc version check

Right now, unless the entire gcc version string, including build date
and package version, matches the distro kernel exactly, kpatch-build
won't proceed.

For some distros, it is very difficult to rollback to a previous
version of gcc and keep that version pinned on the system so that the
package manager doesn't update it.

For these user, add a --skip-gcc-check flag to kpatch-build to allow the
version check to be skipped.  If the user does this, it is assumed they
know what they are doing.  This flag is documented as "not recommended".

Signed-off-by: Seth Jennings <sjenning@redhat.com>
Merge pull request #438 from jpoimboe/no-changed-functions

remove "no changed functions" messages
fix usage formatting
Merge pull request #439 from spartacus06/skip-gcc-check

Allow user to skip gcc version check
allow shadow functions to be called from modules

Fixes an issue where attempting to call the shadow functions from a
module results in modpost failures:

    ERROR: "kpatch_shadow_get" [net/mac80211/mac80211.ko] undefined!
    ERROR: "kpatch_shadow_alloc" [net/mac80211/mac80211.ko] undefined!

LDFLAGS_MODULE is apparently not really needed.
Merge pull request #436 from jpoimboe/descriptor

make "descriptor" a special static local variable
Merge pull request #441 from jpoimboe/module-shadow

allow shadow functions to be called from modules
make __func__ a special static local

The __func__ static local variable should be deemed "special", because
it doesn't need to be correlated and should be included when needed by
an include function.

I don't have a test case for F20, but this fixes the following types of
issues when doing a full-tree recompile on RHEL 7:

    ERROR: cifssmb.o: object size mismatch: __func__.49322
    ERROR: btmrvl_main.o: kpatch_correlate_static_local_variables: 982: static local variable __func__.44657 not used
    ERROR: iwch_qp.o: .rodata.__func__.46024 section header details differ
allow static locals to be used by two functions

Allow static locals to be used by two functions.  This is possible if
the static's containing function is inlined.  We only need to find one
of them to do the correlation.
fix object unlink error handling

Fix the object unlink error handling so that each function cleans up
after itself properly.

Also use find_symbol() instead of __symbol_get() to make cleanup easier.
When patching a module we don't need a reference to each symbol, since
we already have done a try_module_get() on the module.

Fixes #392.
kpatch-gcc: for module patches, copy module to temp dir

For patches involving modules, copy the original module(s) to
TEMPDIR so that create-diff-object can create the correct lookup
tables