4 ms·
This is how many live-update and hot-patching systems work. Some changes are easy and reliable; if you need to add a new condition or a few instructions, you c
by colmmacc 2y ago
This is how many live-update and hot-patching systems work.
Some changes are easy and reliable; if you need to add a new condition or a few instructions, you can build your new basic block of instructions elsewhere and then atomically insert a jump to that basic block (which then jumps back to the correct post-insertion point).
Others are hard; if you need to add a new variable to some state that's being tracked, then you have to find a way to know when it's a safe time during execution to make that change, and you might have had to wrap accesses to that state in RCU gadgets.
It takes expertise, but it's doable and satisfying when you manage it!