aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@redhat.com>2017-02-13 20:42:30 -0500
committerJiri Kosina <jkosina@suse.cz>2017-03-08 03:19:16 -0500
commit46c5a0113f843be5c55b1c40dd486538891156d4 (patch)
tree60e5d6b2d22344c4646e056097133a93e9cb377b
parent3a404842547c92e71127870a613319a29cdebe49 (diff)
livepatch: create temporary klp_update_patch_state() stub
Create temporary stubs for klp_update_patch_state() so we can add TIF_PATCH_PENDING to different architectures in separate patches without breaking build bisectability. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Reviewed-by: Petr Mladek <pmladek@suse.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r--include/linux/livepatch.h5
-rw-r--r--kernel/livepatch/core.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/livepatch.h b/include/linux/livepatch.h
index 9072f04db616..5cc20e588a22 100644
--- a/include/linux/livepatch.h
+++ b/include/linux/livepatch.h
@@ -123,10 +123,13 @@ void arch_klp_init_object_loaded(struct klp_patch *patch,
123int klp_module_coming(struct module *mod); 123int klp_module_coming(struct module *mod);
124void klp_module_going(struct module *mod); 124void klp_module_going(struct module *mod);
125 125
126void klp_update_patch_state(struct task_struct *task);
127
126#else /* !CONFIG_LIVEPATCH */ 128#else /* !CONFIG_LIVEPATCH */
127 129
128static inline int klp_module_coming(struct module *mod) { return 0; } 130static inline int klp_module_coming(struct module *mod) { return 0; }
129static inline void klp_module_going(struct module *mod) { } 131static inline void klp_module_going(struct module *mod) {}
132static inline void klp_update_patch_state(struct task_struct *task) {}
130 133
131#endif /* CONFIG_LIVEPATCH */ 134#endif /* CONFIG_LIVEPATCH */
132 135
diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c
index af4643873e71..217b39d71176 100644
--- a/kernel/livepatch/core.c
+++ b/kernel/livepatch/core.c
@@ -64,6 +64,9 @@ static LIST_HEAD(klp_ops);
64 64
65static struct kobject *klp_root_kobj; 65static struct kobject *klp_root_kobj;
66 66
67/* TODO: temporary stub */
68void klp_update_patch_state(struct task_struct *task) {}
69
67static struct klp_ops *klp_find_ops(unsigned long old_addr) 70static struct klp_ops *klp_find_ops(unsigned long old_addr)
68{ 71{
69 struct klp_ops *ops; 72 struct klp_ops *ops;