aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/livepatch.h
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2017-11-15 04:49:14 -0500
committerJiri Kosina <jkosina@suse.cz>2017-11-15 04:49:14 -0500
commitcb65dc7b89043a66d4459a6a811645d43185b5f0 (patch)
tree7246fb9b5a97405520008e6f6984db9bdd126629 /include/linux/livepatch.h
parentef8daf8eeb5b8ab6bc356656163d19f20fb827ed (diff)
parent19205da6a0da701787d42ad754edd1ffb514c956 (diff)
Merge branch 'for-4.15/shadow-variables' into for-linus
Shadow variables allow callers to associate new shadow fields to existing data structures. This is intended to be used by livepatch modules seeking to emulate additions to data structure definitions.
Diffstat (limited to 'include/linux/livepatch.h')
-rw-r--r--include/linux/livepatch.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/livepatch.h b/include/linux/livepatch.h
index 194991ef9347..d08eddc00497 100644
--- a/include/linux/livepatch.h
+++ b/include/linux/livepatch.h
@@ -164,6 +164,14 @@ static inline bool klp_have_reliable_stack(void)
164 IS_ENABLED(CONFIG_HAVE_RELIABLE_STACKTRACE); 164 IS_ENABLED(CONFIG_HAVE_RELIABLE_STACKTRACE);
165} 165}
166 166
167void *klp_shadow_get(void *obj, unsigned long id);
168void *klp_shadow_alloc(void *obj, unsigned long id, void *data,
169 size_t size, gfp_t gfp_flags);
170void *klp_shadow_get_or_alloc(void *obj, unsigned long id, void *data,
171 size_t size, gfp_t gfp_flags);
172void klp_shadow_free(void *obj, unsigned long id);
173void klp_shadow_free_all(unsigned long id);
174
167#else /* !CONFIG_LIVEPATCH */ 175#else /* !CONFIG_LIVEPATCH */
168 176
169static inline int klp_module_coming(struct module *mod) { return 0; } 177static inline int klp_module_coming(struct module *mod) { return 0; }