patch_instruction is enhanced in this RFC to support patching via a different virtual address (text_poke_area). The mapping of text_poke_area->addr is RW and not RWX. This way the mapping allows write for patching and then we tear down the mapping. The downside is that we introduce a spinlock which serializes our patching to one patch at a time.
In this patchset we also consolidate instruction changes in kprobes to use patch_instruction(). Balbir Singh (2): powerpc/lib/code-patching: Enhance code patching powerpc/kprobes: Move kprobes over to patch_instruction arch/powerpc/kernel/kprobes.c | 4 +- arch/powerpc/lib/code-patching.c | 88 ++++++++++++++++++++++++++++++++++++++-- 2 files changed, 86 insertions(+), 6 deletions(-) -- 2.9.3