livepatch: introduce atomic replace
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 Latest3 patches 15 repliesIn review
- v43 patches 5 repliesSuperseded
- v32 patches 23 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 3 patches | 10 replies | Superseded | |
| v1 | 3 patches | 11 replies | Superseded |
Patches in v5 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | livepatch: use lists to manage patches, objects and functionsinclude/ kernel/ | +23 | 0 replies | |
| 2/3 | livepatch: shuffle core.c function orderkernel/ | +176 | 0 replies | |
| 3/3 | livepatch: add atomic replaceinclude/ kernel/ kernel/ +3 more | +345 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.
Cover letter [PATCH v5 0/3] livepatch: introduce atomic replace
Hi,
While using livepatch, I found that when doing cumulative patches, if a patched function is completed reverted by a subsequent patch (back to its original state) livepatch does not revert the funtion to its original state. Specifically, if patch A introduces a change to function 1, and patch B reverts the change to function 1 and introduces changes to say function 2 and 3 as well, the change that patch A introduced to function 1 is still present. This could be addressed by first completely removing patch A (disable and then rmmod) and then inserting patch B (insmod and enable), but this leaves an unpatched window. In discussing this issue with Josh on the kpatch mailing list, he mentioned that we could get 'atomic replace working properly', and that is the direction of this patchset:
https://www.redhat.com/archives/kpatch/2017-June/msg00005.html
Thanks,
-Jason
v4-v5
-re-base onto remove-immediate branch (removing immediate dependencies) -replaced modules can be re-enabled by doing rmmod and then insmod
v3-v4:
-add static patch, objects, funcs to linked lists to simplify iterator -break-out pure function movement as patch 2/3
v2-v3:
-refactor how the dynamic nops are calculated (Petr Mladek) -move the creation of dynamic nops to enable/disable paths -add klp_replaced_patches list to indicate patches that can be re-enabled -dropped 'replaced' field
-renamed dynamic fields in klp_func, object and patch
-moved iterator implementation to kernel/livepatch/core.c -'inherit' nop immediate flag
-update kobject_put free'ing logic (Petr Mladek)
v1-v2:
-removed the func_iter and obj_iter (Petr Mladek) -initialiing kobject structure for no_op functions using:
klp_init_object() and klp_init_func()
-added a 'replace' field to klp_patch, similar to the immediate field -a 'replace' patch now disables all previous patches -tried to shorten klp_init_patch_no_ops()...
-Simplified logic klp_complete_transition (Petr Mladek)
Jason Baron (3):
livepatch: use lists to manage patches, objects and functions
livepatch: shuffle core.c function order
livepatch: add atomic replace
include/linux/livepatch.h | 25 +- kernel/livepatch/core.c | 626 ++++++++++++++++++++++++++++++------------ kernel/livepatch/core.h | 6 + kernel/livepatch/patch.c | 22 +- kernel/livepatch/patch.h | 4 +- kernel/livepatch/transition.c | 49 +++- 6 files changed, 537 insertions(+), 195 deletions(-)
Signature · 1 line
2.6.1