Skip to content

Commit

Permalink
livepatch: create temporary klp_update_patch_state() stub
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Petr Mladek <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
  • Loading branch information
jpoimboe authored and Jiri Kosina committed Mar 8, 2017
1 parent 3a40484 commit 46c5a01
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/linux/livepatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,13 @@ void arch_klp_init_object_loaded(struct klp_patch *patch,
int klp_module_coming(struct module *mod);
void klp_module_going(struct module *mod);

void klp_update_patch_state(struct task_struct *task);

#else /* !CONFIG_LIVEPATCH */

static inline int klp_module_coming(struct module *mod) { return 0; }
static inline void klp_module_going(struct module *mod) { }
static inline void klp_module_going(struct module *mod) {}
static inline void klp_update_patch_state(struct task_struct *task) {}

#endif /* CONFIG_LIVEPATCH */

Expand Down
3 changes: 3 additions & 0 deletions kernel/livepatch/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ static LIST_HEAD(klp_ops);

static struct kobject *klp_root_kobj;

/* TODO: temporary stub */
void klp_update_patch_state(struct task_struct *task) {}

static struct klp_ops *klp_find_ops(unsigned long old_addr)
{
struct klp_ops *ops;
Expand Down

0 comments on commit 46c5a01

Please sign in to comment.