convert from arrays to linked-lists

Signed-off-by: Seth Jennings <sjenning@redhat.com>
add null symbol to inventory files

Add the null symbol to in inventory files.  Before the linked-link
change, the null symbol wasn't included in the inventory.  However,
it is required to be a valid ELF file and should be inventoried and
check for in the test.

Signed-off-by: Seth Jennings <sjenning@redhat.com>
remove temporary debug message

Signed-off-by: Seth Jennings <sjenning@redhat.com>
kpatch: try to modprobe core module

Try to modprobe the core module, for systems that have the core module
properly installed with depmod.
Merge pull request #179 from jpoimboe/modprobe-core-module

kpatch: try to modprobe core module
fixup review comments

Signed-off-by: Seth Jennings <sjenning@redhat.com>
cleanup logic in rela comparison

Per review comments.

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

convert core data structures from arrays to linked-lists
refactor core <-> patch interface

Make kpatch_funs truly internal by:
Defining it in core.c
Adding a struct kpatch_internal, declared in kpatch.h and defined in
 core.c, that contains per patch module internal data.
Adding an "internal" field to struct kpatch_modules.
Allocating internal and funcs data in core.c, not in the patch module,
 since the patch module has no knowledge of kpatch_func anymore.
Adding a "patch" field to kpatch_func that points directly to the
 kpatch_patch provided by the module (rather than a field-by-field copy)

Signed-off-by: Seth Jennings <sjenning@redhat.com>
fix incompatible pointer type warning

Fixes the following warning:

kpatch-patch-hook.c:71:2: warning: initialization from incompatible pointer type [enabled by default]
  __ATTR(enabled, 0644, patch_enabled_show, patch_enabled_store);
  ^

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

fix incompatible pointer type warning
Merge pull request #181 from spartacus06/interface-refactor

refactor core <-> patch interface
kmod/patch: export patched functions information via sysfs

This is the V1 for this feature.
In V2, exported functions will be seperated to each file in sysfs.

Signed-off-by: Jincheng Miao <jincheng.miao@gmail.com>
kmod/patch: export patched functions V2

Seperate patched functions information to each sysfs file.
The patched function files in sysfs are generated dynamically.

Signed-off-by: Jincheng Miao <jincheng.miao@gmail.com>
kmod/patch: fix bug on __exit of patch module.

Signed-off-by: Jincheng Miao <jincheng.miao@gmail.com>
kmod/patch: make each changed function been kobject.

Change the kpatch_attribute struct to kpatch_func_obj.
The attribute of changed function kobject (like old_addr, new_addr)
is implemented as kobj_attribute in kpatch_func_obj.

Bebase the code to commit 5ea376a (pr-181:refactor core <-> patch interface)

Signed-off-by: Jincheng Miao <jincheng.miao@gmail.com>