summaryrefslogtreecommitdiff
path: root/include/linux/livepatch.h
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@redhat.com>2017-02-14 04:42:39 +0300
committerJiri Kosina <jkosina@suse.cz>2017-03-08 11:24:04 +0300
commitf5e547f4ac785c65a39211f0b8e4ffc4fe09112d (patch)
tree8a4826c72030d35bfed306ac748463c25b536cd0 /include/linux/livepatch.h
parent68ae4b2b687c3da59ca1d762646ddece4ea1c438 (diff)
downloadlinux-f5e547f4ac785c65a39211f0b8e4ffc4fe09112d.tar.xz
livepatch: store function sizes
For the consistency model we'll need to know the sizes of the old and new functions to determine if they're on the stacks of any tasks. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Acked-by: Miroslav Benes <mbenes@suse.cz> Reviewed-by: Petr Mladek <pmladek@suse.com> Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'include/linux/livepatch.h')
-rw-r--r--include/linux/livepatch.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/livepatch.h b/include/linux/livepatch.h
index 9787a63b57ac..6602b34bed2b 100644
--- a/include/linux/livepatch.h
+++ b/include/linux/livepatch.h
@@ -37,6 +37,8 @@
* @old_addr: the address of the function being patched
* @kobj: kobject for sysfs resources
* @stack_node: list node for klp_ops func_stack list
+ * @old_size: size of the old function
+ * @new_size: size of the new function
* @patched: the func has been added to the klp_ops list
*/
struct klp_func {
@@ -56,6 +58,7 @@ struct klp_func {
unsigned long old_addr;
struct kobject kobj;
struct list_head stack_node;
+ unsigned long old_size, new_size;
bool patched;
};