Commit Graph

8 Commits

Author SHA1 Message Date
Seth Jennings
2be6178d6a error on symbol ambiguity in link-vmlinux-syms
Like in add-patches-section, we should continue to
search the vmlinux symbol table to see if there
is a duplicate global symbol.  This normally would
not be possible, however, because create-diff-object
modifies unchanged local functions to be global
as a hack so they can be linked, there is a chance
that these symbols could collide with an existing
global symbol.  We should detect this case and error
out.

Hopefully we can figure out a way to avoid this
situation altogether.  But for now, this is a
protection against improper linking.

Signed-off-by: Seth Jennings <sjenning@redhat.com>
2014-03-19 16:26:43 -05:00
Josh Poimboeuf
bfad3b1880 kmod/core: update API and use hash table
My apologies for the size of this commit.  I combined these two features
(updating API and using a hash table) into a single commit because their
implementations are tightly coupled and I didn't want to have to add
support for the old kpatch_funcs array with the new API just for the
sake of splitting up the commit :-)

- Update the core module API to get a more clear separation between core
  module and patch module.  This is cleaner and will help our case for
  getting the core module merged upstream into the kernel.
- Convert the old kpatch_funcs array into a hash table.  This is so much
  nicer performance-wise and everything-else-wise than that ugly old
  array.
- Do the incremental patching in stop machine.  This ensures that the
  funcs hash is up to date and we don't miss anything.
- Disable preemption in the ftrace handler when accessing the func hash.
  That way we don't get conflicts with the stop_machine handler updating
  the hash.
2014-03-18 13:34:15 -05:00
Seth Jennings
ca55dcc5ad add TODO to de-dup code
Signed-off-by: Seth Jennings <sjenning@redhat.com>
2014-03-18 11:44:17 -05:00
Seth Jennings
e3d2a68db3 remove obsolete comments
Signed-off-by: Seth Jennings <sjenning@redhat.com>
2014-03-18 11:44:08 -05:00
Seth Jennings
e33695be27 remove dead code
refactoring.  A couple of comment touchups too.

Signed-off-by: Seth Jennings <sjenning@redhat.com>
2014-03-05 11:26:02 -06:00
Josh Poimboeuf
693426b5ef enable gcc warnings and fix all warnings 2014-03-05 09:46:10 -06:00
Josh Poimboeuf
330a08dd0d add GPLv2 headers to source files 2014-03-04 21:34:19 -06:00
Josh Poimboeuf
4f27b9ae31 functional reorganization
Organize the files functionally:
- kmod/core: core kmod source
- kmod/patch: patch kmod source
- kpatch: kpatch script
- kpatch-build: kpatch build script and supporting tools
- contrib: distro-related files
2014-02-13 11:00:06 -06:00