€•\}Œsphinx.addnodes”Œdocument”“”)�”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)�”}”(hhh]”(hŒ pending_xref”“”)�”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…”�”}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ*/translations/zh_CN/livepatch/system-state”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)�”}”(hhh]”hŒChinese (Traditional)”…”�”}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/zh_TW/livepatch/system-state”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒItalian”…”�”}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/it_IT/livepatch/system-state”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒJapanese”…”�”}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/ja_JP/livepatch/system-state”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒKorean”…”�”}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/ko_KR/livepatch/system-state”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒPortuguese (Brazilian)”…”�”}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/pt_BR/livepatch/system-state”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒSpanish”…”�”}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/sp_SP/livepatch/system-state”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)�”}”(hhh]”(hŒtitle”“”)�”}”(hŒSystem State Changes”h]”hŒSystem State Changes”…”�”}”(hh¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhh·h²hh³ŒD/var/lib/git/docbuild/linux/Documentation/livepatch/system-state.rst”h´KubhŒ paragraph”“”)�”}”(hŒ’Some users are really reluctant to reboot a system. This brings the need to provide more livepatches and maintain some compatibility between them.”h]”hŒ’Some users are really reluctant to reboot a system. This brings the need to provide more livepatches and maintain some compatibility between them.”…”�”}”(hhÍh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubhÌ)�”}”(hX!Maintaining more livepatches is much easier with cumulative livepatches. Each new livepatch completely replaces any older one. It can keep, add, and even remove fixes. And it is typically safe to replace any version of the livepatch with any other one thanks to the atomic replace feature.”h]”hX!Maintaining more livepatches is much easier with cumulative livepatches. Each new livepatch completely replaces any older one. It can keep, add, and even remove fixes. And it is typically safe to replace any version of the livepatch with any other one thanks to the atomic replace feature.”…”�”}”(hhÛh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubhÌ)�”}”(hXCThe problems might come with shadow variables and callbacks. They might change the system behavior or state so that it is no longer safe to go back and use an older livepatch or the original kernel code. Also any new livepatch must be able to detect what changes have already been done by the already installed livepatches.”h]”hXCThe problems might come with shadow variables and callbacks. They might change the system behavior or state so that it is no longer safe to go back and use an older livepatch or the original kernel code. Also any new livepatch must be able to detect what changes have already been done by the already installed livepatches.”…”�”}”(hhéh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K hh·h²hubhÌ)�”}”(hŒLThis is where the livepatch system state tracking gets useful. It allows to:”h]”hŒLThis is where the livepatch system state tracking gets useful. It allows to:”…”�”}”(hh÷h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubhŒ block_quote”“”)�”}”(hŒŒ- store data needed to manipulate and restore the system state - define compatibility between livepatches using a change id and version ”h]”hŒ bullet_list”“”)�”}”(hhh]”(hŒ list_item”“”)�”}”(hŒ=store data needed to manipulate and restore the system state ”h]”hÌ)�”}”(hŒhj•ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj’ubah}”(h]”h ]”h"]”h$]”h&]”jHjIuh1j h³hÊh´K>hj€ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjDubeh}”(h]”h ]”h"]”h$]”h&]”jHjIuh1j h³hÊh´K7hj@ubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÊh´K7hjPh²hubeh}”(h]”Œlivepatch-system-state-api”ah ]”h"]”Œ1. livepatch system state api”ah$]”h&]”uh1hµhh·h²hh³hÊh´Kubh¶)�”}”(hhh]”(h»)�”}”(hŒ2. Livepatch compatibility”h]”hŒ2. Livepatch compatibility”…”�”}”(hjÐh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjÍh²hh³hÊh´KBubhÌ)�”}”(hŒ�The system state version is used to prevent loading incompatible livepatches. The check is done when the livepatch is enabled. The rules are:”h]”hŒ�The system state version is used to prevent loading incompatible livepatches. The check is done when the livepatch is enabled. The rules are:”…”�”}”(hjÞh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KDhjÍh²hubj)�”}”(hXk- Any completely new system state modification is allowed. - System state modifications with the same or higher version are allowed for already modified system states. - Cumulative livepatches must handle all system state modifications from already installed livepatches. - Non-cumulative livepatches are allowed to touch already modified system states. ”h]”j )�”}”(hhh]”(j)�”}”(hŒ9Any completely new system state modification is allowed. ”h]”hÌ)�”}”(hŒ8Any completely new system state modification is allowed.”h]”hŒ8Any completely new system state modification is allowed.”…”�”}”(hj÷h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KGhjóubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjðubj)�”}”(hŒkSystem state modifications with the same or higher version are allowed for already modified system states. ”h]”hÌ)�”}”(hŒjSystem state modifications with the same or higher version are allowed for already modified system states.”h]”hŒjSystem state modifications with the same or higher version are allowed for already modified system states.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KIhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjðubj)�”}”(hŒfCumulative livepatches must handle all system state modifications from already installed livepatches. ”h]”hÌ)�”}”(hŒeCumulative livepatches must handle all system state modifications from already installed livepatches.”h]”hŒeCumulative livepatches must handle all system state modifications from already installed livepatches.”…”�”}”(hj'h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KLhj#ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjðubj)�”}”(hŒPNon-cumulative livepatches are allowed to touch already modified system states. ”h]”hÌ)�”}”(hŒONon-cumulative livepatches are allowed to touch already modified system states.”h]”hŒONon-cumulative livepatches are allowed to touch already modified system states.”…”�”}”(hj?h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KOhj;ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjðubeh}”(h]”h ]”h"]”h$]”h&]”jHjIuh1j h³hÊh´KGhjìubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÊh´KGhjÍh²hubeh}”(h]”Œlivepatch-compatibility”ah ]”h"]”Œ2. livepatch compatibility”ah$]”h&]”uh1hµhh·h²hh³hÊh´KBubh¶)�”}”(hhh]”(h»)�”}”(hŒ3. Supported scenarios”h]”hŒ3. Supported scenarios”…”�”}”(hjjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjgh²hh³hÊh´KSubhÌ)�”}”(hŒ—Livepatches have their life-cycle and the same is true for the system state changes. Every compatible livepatch has to support the following scenarios:”h]”hŒ—Livepatches have their life-cycle and the same is true for the system state changes. Every compatible livepatch has to support the following scenarios:”…”�”}”(hjxh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KUhjgh²hubj)�”}”(hX\- Modify the system state when the livepatch gets enabled and the state has not been already modified by a livepatches that are being replaced. - Take over or update the system state modification when is has already been done by a livepatch that is being replaced. - Restore the original state when the livepatch is disabled. - Restore the previous state when the transition is reverted. It might be the original system state or the state modification done by livepatches that were being replaced. - Remove any already made changes when error occurs and the livepatch cannot get enabled. ”h]”j )�”}”(hhh]”(j)�”}”(hŒŽModify the system state when the livepatch gets enabled and the state has not been already modified by a livepatches that are being replaced. ”h]”hÌ)�”}”(hŒ�Modify the system state when the livepatch gets enabled and the state has not been already modified by a livepatches that are being replaced.”h]”hŒ�Modify the system state when the livepatch gets enabled and the state has not been already modified by a livepatches that are being replaced.”…”�”}”(hj‘h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KYhj�ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjŠubj)�”}”(hŒwTake over or update the system state modification when is has already been done by a livepatch that is being replaced. ”h]”hÌ)�”}”(hŒvTake over or update the system state modification when is has already been done by a livepatch that is being replaced.”h]”hŒvTake over or update the system state modification when is has already been done by a livepatch that is being replaced.”…”�”}”(hj©h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K]hj¥ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjŠubj)�”}”(hŒ;Restore the original state when the livepatch is disabled. ”h]”hÌ)�”}”(hŒ:Restore the original state when the livepatch is disabled.”h]”hŒ:Restore the original state when the livepatch is disabled.”…”�”}”(hjÁh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K`hj½ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjŠubj)�”}”(hŒªRestore the previous state when the transition is reverted. It might be the original system state or the state modification done by livepatches that were being replaced. ”h]”hÌ)�”}”(hŒ©Restore the previous state when the transition is reverted. It might be the original system state or the state modification done by livepatches that were being replaced.”h]”hŒ©Restore the previous state when the transition is reverted. It might be the original system state or the state modification done by livepatches that were being replaced.”…”�”}”(hjÙh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KbhjÕubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjŠubj)�”}”(hŒXRemove any already made changes when error occurs and the livepatch cannot get enabled. ”h]”hÌ)�”}”(hŒWRemove any already made changes when error occurs and the livepatch cannot get enabled.”h]”hŒWRemove any already made changes when error occurs and the livepatch cannot get enabled.”…”�”}”(hjñh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kfhjíubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjŠubeh}”(h]”h ]”h"]”h$]”h&]”jHjIuh1j h³hÊh´KYhj†ubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÊh´KYhjgh²hubeh}”(h]”Œsupported-scenarios”ah ]”h"]”Œ3. supported scenarios”ah$]”h&]”uh1hµhh·h²hh³hÊh´KSubh¶)�”}”(hhh]”(h»)�”}”(hŒ4. Expected usage”h]”hŒ4. Expected usage”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjh²hh³hÊh´KjubhÌ)�”}”(hŒlSystem states are usually modified by livepatch callbacks. The expected role of each callback is as follows:”h]”hŒlSystem states are usually modified by livepatch callbacks. The expected role of each callback is as follows:”…”�”}”(hj*h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Klhjh²hubhÌ)�”}”(hŒ *pre_patch()*”h]”j©)�”}”(hj:h]”hŒ pre_patch()”…”�”}”(hj<h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¨hj8ubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kohjh²hubj)�”}”(hX‚- Allocate *state->data* when necessary. The allocation might fail and *pre_patch()* is the only callback that could stop loading of the livepatch. The allocation is not needed when the data are already provided by previously installed livepatches. - Do any other preparatory action that is needed by the new code even before the transition gets finished. For example, initialize *state->data*. The system state itself is typically modified in *post_patch()* when the entire system is able to handle it. - Clean up its own mess in case of error. It might be done by a custom code or by calling *post_unpatch()* explicitly. ”h]”j )�”}”(hhh]”(j)�”}”(hŒ÷Allocate *state->data* when necessary. The allocation might fail and *pre_patch()* is the only callback that could stop loading of the livepatch. The allocation is not needed when the data are already provided by previously installed livepatches. ”h]”hÌ)�”}”(hŒöAllocate *state->data* when necessary. The allocation might fail and *pre_patch()* is the only callback that could stop loading of the livepatch. The allocation is not needed when the data are already provided by previously installed livepatches.”h]”(hŒ Allocate ”…”�”}”(hjZh²hh³Nh´Nubj©)�”}”(hŒ *state->data*”h]”hŒ state->data”…”�”}”(hjbh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¨hjZubhŒ/ when necessary. The allocation might fail and ”…”�”}”(hjZh²hh³Nh´Nubj©)�”}”(hŒ *pre_patch()*”h]”hŒ pre_patch()”…”�”}”(hjth²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¨hjZubhŒ¤ is the only callback that could stop loading of the livepatch. The allocation is not needed when the data are already provided by previously installed livepatches.”…”�”}”(hjZh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KqhjVubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjSubj)�”}”(hŒþDo any other preparatory action that is needed by the new code even before the transition gets finished. For example, initialize *state->data*. The system state itself is typically modified in *post_patch()* when the entire system is able to handle it. ”h]”(hÌ)�”}”(hŒ�Do any other preparatory action that is needed by the new code even before the transition gets finished. For example, initialize *state->data*.”h]”(hŒ�Do any other preparatory action that is needed by the new code even before the transition gets finished. For example, initialize ”…”�”}”(hj–h²hh³Nh´Nubj©)�”}”(hŒ *state->data*”h]”hŒ state->data”…”�”}”(hjžh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¨hj–ubhŒ.”…”�”}”(hj–h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kvhj’ubhÌ)�”}”(hŒlThe system state itself is typically modified in *post_patch()* when the entire system is able to handle it.”h]”(hŒ1The system state itself is typically modified in ”…”�”}”(hj¶h²hh³Nh´Nubj©)�”}”(hŒ*post_patch()*”h]”hŒ post_patch()”…”�”}”(hj¾h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¨hj¶ubhŒ- when the entire system is able to handle it.”…”�”}”(hj¶h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kzhj’ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjSubj)�”}”(hŒuClean up its own mess in case of error. It might be done by a custom code or by calling *post_unpatch()* explicitly. ”h]”hÌ)�”}”(hŒtClean up its own mess in case of error. It might be done by a custom code or by calling *post_unpatch()* explicitly.”h]”(hŒXClean up its own mess in case of error. It might be done by a custom code or by calling ”…”�”}”(hjàh²hh³Nh´Nubj©)�”}”(hŒ*post_unpatch()*”h]”hŒpost_unpatch()”…”�”}”(hjèh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¨hjàubhŒ explicitly.”…”�”}”(hjàh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K}hjÜubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjSubeh}”(h]”h ]”h"]”h$]”h&]”jHjIuh1j h³hÊh´KqhjOubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÊh´Kqhjh²hubhÌ)�”}”(hŒ*post_patch()*”h]”j©)�”}”(hjh]”hŒ post_patch()”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¨hjubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K€hjh²hubj)�”}”(hX6- Copy *state->data* from the previous livepatch when they are compatible. - Do the actual system state modification. Eventually allow the new code to use it. - Make sure that *state->data* has all necessary information. - Free *state->data* from replaces livepatches when they are not longer needed. ”h]”j )�”}”(hhh]”(j)�”}”(hŒICopy *state->data* from the previous livepatch when they are compatible. ”h]”hÌ)�”}”(hŒHCopy *state->data* from the previous livepatch when they are compatible.”h]”(hŒCopy ”…”�”}”(hj4h²hh³Nh´Nubj©)�”}”(hŒ *state->data*”h]”hŒ state->data”…”�”}”(hj<h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¨hj4ubhŒ6 from the previous livepatch when they are compatible.”…”�”}”(hj4h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K‚hj0ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj-ubj)�”}”(hŒRDo the actual system state modification. Eventually allow the new code to use it. ”h]”hÌ)�”}”(hŒQDo the actual system state modification. Eventually allow the new code to use it.”h]”hŒQDo the actual system state modification. Eventually allow the new code to use it.”…”�”}”(hj^h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K…hjZubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj-ubj)�”}”(hŒdata* has all necessary information. ”h]”hÌ)�”}”(hŒ;Make sure that *state->data* has all necessary information.”h]”(hŒMake sure that ”…”�”}”(hjvh²hh³Nh´Nubj©)�”}”(hŒ *state->data*”h]”hŒ state->data”…”�”}”(hj~h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¨hjvubhŒ has all necessary information.”…”�”}”(hjvh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kˆhjrubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj-ubj)�”}”(hŒNFree *state->data* from replaces livepatches when they are not longer needed. ”h]”hÌ)�”}”(hŒMFree *state->data* from replaces livepatches when they are not longer needed.”h]”(hŒFree ”…”�”}”(hj h²hh³Nh´Nubj©)�”}”(hŒ *state->data*”h]”hŒ state->data”…”�”}”(hj¨h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¨hj ubhŒ; from replaces livepatches when they are not longer needed.”…”�”}”(hj h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KŠhjœubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj-ubeh}”(h]”h ]”h"]”h$]”h&]”jHjIuh1j h³hÊh´K‚hj)ubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÊh´K‚hjh²hubhÌ)�”}”(hŒ*pre_unpatch()*”h]”j©)�”}”(hjÔh]”hŒ pre_unpatch()”…”�”}”(hjÖh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¨hjÒubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K�hjh²hubj)�”}”(hŒ|- Prevent the code, added by the livepatch, relying on the system state change. - Revert the system state modification.. ”h]”j )�”}”(hhh]”(j)�”}”(hŒNPrevent the code, added by the livepatch, relying on the system state change. ”h]”hÌ)�”}”(hŒMPrevent the code, added by the livepatch, relying on the system state change.”h]”hŒMPrevent the code, added by the livepatch, relying on the system state change.”…”�”}”(hjôh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K�hjðubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjíubj)�”}”(hŒ'Revert the system state modification.. ”h]”hÌ)�”}”(hŒ&Revert the system state modification..”h]”hŒ&Revert the system state modification..”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K’hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjíubeh}”(h]”h ]”h"]”h$]”h&]”jHjIuh1j h³hÊh´K�hjéubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÊh´K�hjh²hubhÌ)�”}”(hŒ*post_unpatch()*”h]”j©)�”}”(hj.h]”hŒpost_unpatch()”…”�”}”(hj0h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¨hj,ubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K”hjh²hubj)�”}”(hŒô- Distinguish transition reverse and livepatch disabling by checking *klp_get_prev_state()*. - In case of transition reverse, restore the previous system state. It might mean doing nothing. - Remove any not longer needed setting or data. ”h]”j )�”}”(hhh]”(j)�”}”(hŒ[Distinguish transition reverse and livepatch disabling by checking *klp_get_prev_state()*. ”h]”hÌ)�”}”(hŒZDistinguish transition reverse and livepatch disabling by checking *klp_get_prev_state()*.”h]”(hŒCDistinguish transition reverse and livepatch disabling by checking ”…”�”}”(hjNh²hh³Nh´Nubj©)�”}”(hŒ*klp_get_prev_state()*”h]”hŒklp_get_prev_state()”…”�”}”(hjVh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¨hjNubhŒ.”…”�”}”(hjNh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K–hjJubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjGubj)�”}”(hŒ_In case of transition reverse, restore the previous system state. It might mean doing nothing. ”h]”hÌ)�”}”(hŒ^In case of transition reverse, restore the previous system state. It might mean doing nothing.”h]”hŒ^In case of transition reverse, restore the previous system state. It might mean doing nothing.”…”�”}”(hjxh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K™hjtubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjGubj)�”}”(hŒ.Remove any not longer needed setting or data. ”h]”hÌ)�”}”(hŒ-Remove any not longer needed setting or data.”h]”hŒ-Remove any not longer needed setting or data.”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KœhjŒubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjGubeh}”(h]”h ]”h"]”h$]”h&]”jHjIuh1j h³hÊh´K–hjCubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÊh´K–hjh²hubhŒnote”“”)�”}”(hX¤*pre_unpatch()* typically does symmetric operations to *post_patch()*. Except that it is called only when the livepatch is being disabled. Therefore it does not need to care about any previously installed livepatch. *post_unpatch()* typically does symmetric operations to *pre_patch()*. It might be called also during the transition reverse. Therefore it has to handle the state of the previously installed livepatches.”h]”(hÌ)�”}”(hŒ×*pre_unpatch()* typically does symmetric operations to *post_patch()*. Except that it is called only when the livepatch is being disabled. Therefore it does not need to care about any previously installed livepatch.”h]”(j©)�”}”(hŒ*pre_unpatch()*”h]”hŒ pre_unpatch()”…”�”}”(hjºh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¨hj¶ubhŒ( typically does symmetric operations to ”…”�”}”(hj¶h²hh³Nh´Nubj©)�”}”(hŒ*post_patch()*”h]”hŒ post_patch()”…”�”}”(hjÌh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¨hj¶ubhŒ’. Except that it is called only when the livepatch is being disabled. Therefore it does not need to care about any previously installed livepatch.”…”�”}”(hj¶h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K hj²ubhÌ)�”}”(hŒË*post_unpatch()* typically does symmetric operations to *pre_patch()*. It might be called also during the transition reverse. Therefore it has to handle the state of the previously installed livepatches.”h]”(j©)�”}”(hŒ*post_unpatch()*”h]”hŒpost_unpatch()”…”�”}”(hjèh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¨hjäubhŒ( typically does symmetric operations to ”…”�”}”(hjäh²hh³Nh´Nubj©)�”}”(hŒ *pre_patch()*”h]”hŒ pre_patch()”…”�”}”(hjúh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¨hjäubhŒ†. It might be called also during the transition reverse. Therefore it has to handle the state of the previously installed livepatches.”…”�”}”(hjäh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K¥hj²ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j°hjh²hh³hÊh´Nubeh}”(h]”Œexpected-usage”ah ]”h"]”Œ4. expected usage”ah$]”h&]”uh1hµhh·h²hh³hÊh´Kjubeh}”(h]”Œsystem-state-changes”ah ]”h"]”Œsystem state changes”ah$]”h&]”uh1hµhhh²hh³hÊh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÊuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)�”}”(hºNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jKŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÊŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(j%j"jÊjÇjdjajjjjuŒ nametypes”}”(j%‰jʉjd‰j‰j‰uh}”(j"h·jÇjPjajÍjjgjjuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.