diff options
author | Jiri Kosina <jkosina@suse.cz> | 2017-11-15 04:49:14 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2017-11-15 04:49:14 -0500 |
commit | cb65dc7b89043a66d4459a6a811645d43185b5f0 (patch) | |
tree | 7246fb9b5a97405520008e6f6984db9bdd126629 /include/linux/livepatch.h | |
parent | ef8daf8eeb5b8ab6bc356656163d19f20fb827ed (diff) | |
parent | 19205da6a0da701787d42ad754edd1ffb514c956 (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.h | 8 |
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 | ||
167 | void *klp_shadow_get(void *obj, unsigned long id); | ||
168 | void *klp_shadow_alloc(void *obj, unsigned long id, void *data, | ||
169 | size_t size, gfp_t gfp_flags); | ||
170 | void *klp_shadow_get_or_alloc(void *obj, unsigned long id, void *data, | ||
171 | size_t size, gfp_t gfp_flags); | ||
172 | void klp_shadow_free(void *obj, unsigned long id); | ||
173 | void klp_shadow_free_all(unsigned long id); | ||
174 | |||
167 | #else /* !CONFIG_LIVEPATCH */ | 175 | #else /* !CONFIG_LIVEPATCH */ |
168 | 176 | ||
169 | static inline int klp_module_coming(struct module *mod) { return 0; } | 177 | static inline int klp_module_coming(struct module *mod) { return 0; } |