Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring back the "replace" functionality #716

Closed
jpoimboe opened this issue Jun 30, 2017 · 1 comment
Closed

Bring back the "replace" functionality #716

jpoimboe opened this issue Jun 30, 2017 · 1 comment

Comments

@jpoimboe
Copy link
Member

jpoimboe commented Jun 30, 2017

Currently, when applying an upgraded cumulative patch, where v2 reverts a change done by v1, we have to be careful:

  1. compile v1 and note the list of changed functions

  2. compile v2 and note the list of changed functions

  3. for those functions which changed in v1 and did not change in v2, make a trivial change (i.e., asm("nop") such that kpatch-build will detect the functions as changed, but otherwise their behavior will be the same.

We used to have a "replace" feature which solved this problem. It atomically reverted the previous patch when applying the new one. That feature was deprecated with #557. We should bring it back to kpatch.ko, and we should also port something similar to livepatch.

@jpoimboe jpoimboe changed the title automatic KPATCH_REVERT_FUNCTION Bring back the "replace" functionality Jun 30, 2017
@jpoimboe
Copy link
Member Author

Soon kpatch.ko will be deprecated in favor of livepatch, and there are already some livepatch patches for this being discussed upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant