]> xenbits.xensource.com Git - xen.git/commit
xen/livepatch: fix norevert test attempt to open-code revert
authorRoger Pau Monné <roger.pau@citrix.com>
Tue, 5 Mar 2024 10:59:43 +0000 (11:59 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 5 Mar 2024 10:59:43 +0000 (11:59 +0100)
commit5564323f643715f9d364df88e0eb9c7d6fd2c22b
treee3d16ec3cfad319bb8d8345660f294175ad82f34
parentc54cf903b06fb1933fad053cc547580c92c856ea
xen/livepatch: fix norevert test attempt to open-code revert

The purpose of the norevert test is to install a dummy handler that replaces
the internal Xen revert code, and then perform the revert in the post-revert
hook.  For that purpose the usage of the previous common_livepatch_revert() is
not enough, as that just reverts specific functions, but not the whole state of
the payload.

Remove both common_livepatch_{apply,revert}() and instead expose
revert_payload{,_tail}() in order to perform the patch revert from the
post-revert hook.

Fixes: 6047104c3ccc ('livepatch: Add per-function applied/reverted state tracking marker')
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>
master commit: cdae267ce10d04d71d1687b5701ff2911a96b6dc
master date: 2024-02-28 16:57:25 +0000
xen/common/livepatch.c
xen/include/xen/livepatch.h
xen/test/livepatch/xen_action_hooks_norevert.c