diff options
| author | Olof Johansson <olof@lixom.net> | 2019-12-05 13:16:58 -0800 |
|---|---|---|
| committer | Olof Johansson <olof@lixom.net> | 2019-12-05 13:18:54 -0800 |
| commit | 942e6f8a8314e5550e254519dfba4ccd5170421d (patch) | |
| tree | 75ec655b440fbc1c454247af38b5596dd8c78de9 /include/linux/livepatch.h | |
| parent | 336bab731be76a90291697e51d2aed0ad67d7cb5 (diff) | |
| parent | b08baef02b26cf7c2123e4a24a2fa1fb7a593ffb (diff) | |
| download | cachepc-linux-942e6f8a8314e5550e254519dfba4ccd5170421d.tar.gz cachepc-linux-942e6f8a8314e5550e254519dfba4ccd5170421d.zip | |
Merge mainline/master into arm/fixes
This brings in the mainline tree right after armsoc contents was merged
this release cycle, so that we can re-run savedefconfig, etc.
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'include/linux/livepatch.h')
| -rw-r--r-- | include/linux/livepatch.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/livepatch.h b/include/linux/livepatch.h index 273400814020..e894e74905f3 100644 --- a/include/linux/livepatch.h +++ b/include/linux/livepatch.h @@ -131,9 +131,22 @@ struct klp_object { }; /** + * struct klp_state - state of the system modified by the livepatch + * @id: system state identifier (non-zero) + * @version: version of the change + * @data: custom data + */ +struct klp_state { + unsigned long id; + unsigned int version; + void *data; +}; + +/** * struct klp_patch - patch structure for live patching * @mod: reference to the live patch module * @objs: object entries for kernel objects to be patched + * @states: system states that can get modified * @replace: replace all actively used patches * @list: list node for global list of actively used patches * @kobj: kobject for sysfs resources @@ -147,6 +160,7 @@ struct klp_patch { /* external */ struct module *mod; struct klp_object *objs; + struct klp_state *states; bool replace; /* internal */ @@ -217,6 +231,9 @@ void *klp_shadow_get_or_alloc(void *obj, unsigned long id, void klp_shadow_free(void *obj, unsigned long id, klp_shadow_dtor_t dtor); void klp_shadow_free_all(unsigned long id, klp_shadow_dtor_t dtor); +struct klp_state *klp_get_state(struct klp_patch *patch, unsigned long id); +struct klp_state *klp_get_prev_state(unsigned long id); + #else /* !CONFIG_LIVEPATCH */ static inline int klp_module_coming(struct module *mod) { return 0; } |
