On 2017/05/17 11:40AM, Balbir Singh wrote: > On Tue, 2017-05-16 at 19:05 +0530, Naveen N. Rao wrote: > > On 2017/05/16 01:49PM, Balbir Singh wrote: > > > arch_arm/disarm_probe use direct assignment for copying > > > instructions, replace them with patch_instruction > > > > Thanks for doing this! > > > > We will also have to convert optprobes and ftrace to use > > patch_instruction, but that can be done once the basic infrastructure is > > in. > > > > I think these patches can go in without even patch 1. I looked quickly at > optprobes and ftrace and thought they were already using patch_instruction > (ftrace_modify_code() and arch_optimize_kprobes()), are there other paths > I missed?
[Sorry for the delay...] Yes, all the patch_*_insns() functions need to be converted since the area they patch comes from .text. There is also a memcpy() where we copy the instruction template in, so perhaps a patch_instructions() helper may be useful too. - Naveen