summaryrefslogtreecommitdiffstats
path: root/include/linux/livepatch.h
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2017-11-15 10:49:14 +0100
committerJiri Kosina <jkosina@suse.cz>2017-11-15 10:49:14 +0100
commitcb65dc7b89043a66d4459a6a811645d43185b5f0 (patch)
tree7246fb9b5a97405520008e6f6984db9bdd126629 /include/linux/livepatch.h
parentef8daf8eeb5b8ab6bc356656163d19f20fb827ed (diff)
parent19205da6a0da701787d42ad754edd1ffb514c956 (diff)
downloadcachepc-linux-cb65dc7b89043a66d4459a6a811645d43185b5f0.tar.gz
cachepc-linux-cb65dc7b89043a66d4459a6a811645d43185b5f0.zip
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)
IS_ENABLED(CONFIG_HAVE_RELIABLE_STACKTRACE);
}
+void *klp_shadow_get(void *obj, unsigned long id);
+void *klp_shadow_alloc(void *obj, unsigned long id, void *data,
+ size_t size, gfp_t gfp_flags);
+void *klp_shadow_get_or_alloc(void *obj, unsigned long id, void *data,
+ size_t size, gfp_t gfp_flags);
+void klp_shadow_free(void *obj, unsigned long id);
+void klp_shadow_free_all(unsigned long id);
+
#else /* !CONFIG_LIVEPATCH */
static inline int klp_module_coming(struct module *mod) { return 0; }