by psadri · 2y ago · 0 comments
The next time something tries to use whatever memory or function it overroad, it would pick up your version instead.
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!