consolidate new section pair creation

Signed-off-by: Seth Jennings <sjenning@redhat.com>
Merge pull request #288 from spartacus06/section-create-refactor

consolidate new section pair creation
kpatch-build: use getconf to get the processors number
kpatch-build: fix gcc version check on ubuntu
Merge pull request #290 from goldyfruit/master

kpatch-build: use getconf to get the processors number
Merge pull request #291 from jpoimboe/gcc-ubuntu

kpatch-build: fix gcc version check on ubuntu
support forced patching

Some functions in the kernel are always on the stack of some thread
in the system.  Attempts to patch these function will currently always
fail the activeness safety check.

However, through human inspection, it can be determined that, for a
particular function, consistency is maintained even if the old and new
versions of the function run concurrently.

This commit introduces a KPATCH_FORCE_UNSAFE() macro to define patched
functions that such be exempted from the activeness safety check.

Signed-off-by: Seth Jennings <sjenning@redhat.com>
Merge pull request #293 from spartacus06/support-forced-patching

support forced patching
kpatch-build: support custom ~/.rpmmacros file

Be able to deal with a custom ~/.rpmmacros file, for which the SPECS and
BUILD directories are configurable.
Merge pull request #294 from jpoimboe/custom-rpmbuild-dir

kpatch-build: support custom ~/.rpmmacros file
create-diff-object: don't create __fentry__ dynrelas

This fixes the following issue for a patch which changes a module:

  kpatch_create_mcount_sections: 1968: bad first rela in .rela.text.e_show

The first rela is "bad" because the real first rela was converted to a
dynrela and then removed from the rela list.

This is a temporary fix.  The more permanent fix should be to allow
lookups in vmlinux for patched modules so we don't create any
unnecessary dynrelas.
Rebase of SPEC file to current version
kpatch-build: extract GCC version from .comment section

Extract the GCC version from the .comment section of vmlinux.  This
hopefully makes the version check more robust across various distros.

Fixes #297.
Merge pull request #300 from jpoimboe/gcc-version-readelf

kpatch-build: extract GCC version from .comment section
Merge pull request #298 from jpoimboe/no-fentry-dynrela

create-diff-object: don't create __fentry__ dynrelas
Merge pull request #299 from useidel/master

Rebase of SPEC file to current version
create-diff-object: fix for unincluded sec->secsym

When running kpatch-build with -d, I was getting a seg fault.  It was
faulting in kpatch_dump_kelf() when trying to print sec->secsym->name
for the .smp_locks section.  It turns out that the section was included
but its section symbol wasn't included, so sec->secsym pointed to freed
memory.
README.md: add debian support
README.md: add build-essential package
add KPATCH_WARN_*_LINE macros

WARN macros are problematic because they embed the line number in an
instruction.  As a result, when a function is changed higher in a file,
the line numbers for any WARN calls below that function in the file can
result in unnecessarily changed functions.

These macros allow a patch author to hard code the line numbers in WARN
macros to prevent functions from otherwise changing and getting pulled
into a patch module unnecessarily.