linux-stable/kernel/livepatch
Jason Baron 20e5502595 livepatch: Use lists to manage patches, objects and functions
Currently klp_patch contains a pointer to a statically allocated array of
struct klp_object and struct klp_objects contains a pointer to a statically
allocated array of klp_func. In order to allow for the dynamic allocation
of objects and functions, link klp_patch, klp_object, and klp_func together
via linked lists. This allows us to more easily allocate new objects and
functions, while having the iterator be a simple linked list walk.

The static structures are added to the lists early. It allows to add
the dynamically allocated objects before klp_init_object() and
klp_init_func() calls. Therefore it reduces the further changes
to the code.

This patch does not change the existing behavior.

Signed-off-by: Jason Baron <jbaron@akamai.com>
[pmladek@suse.com: Initialize lists before init calls]
Signed-off-by: Petr Mladek <pmladek@suse.com>
Acked-by: Miroslav Benes <mbenes@suse.cz>
Acked-by: Joe Lawrence <joe.lawrence@redhat.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Jiri Kosina <jikos@kernel.org>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2019-01-11 20:51:24 +01:00
..
core.c livepatch: Use lists to manage patches, objects and functions 2019-01-11 20:51:24 +01:00
core.h livepatch: Simplify API by removing registration step 2019-01-11 20:51:24 +01:00
Kconfig livepatch: Make livepatch dependent on !TRIM_UNUSED_KSYMS 2017-05-27 00:27:37 +02:00
Makefile livepatch: introduce shadow variable API 2017-09-14 23:06:12 +02:00
patch.c livepatch: Change unsigned long old_addr -> void *old_func in struct klp_func 2019-01-11 20:51:23 +01:00
patch.h livepatch: Change unsigned long old_addr -> void *old_func in struct klp_func 2019-01-11 20:51:23 +01:00
shadow.c livepatch: Allow to call a custom callback when freeing shadow variables 2018-04-17 13:42:48 +02:00
transition.c livepatch: Simplify API by removing registration step 2019-01-11 20:51:24 +01:00
transition.h livepatch: force transition to finish 2017-12-07 13:21:35 +01:00