[PATCH] recordmcount: arm: Implement make_nop
Rabin Vincent
rabin at rab.in
Tue Feb 2 09:31:41 PST 2016
On Mon, Feb 01, 2016 at 11:44:32AM -0800, Stephen Boyd wrote:
> On 01/30, Rabin Vincent wrote:
> > For __gnu_mcount_nc, wouldn't it be better to replace both the push {lr}
> > and the bl with nop instructions, instead of keeping a (useless) push +
> > pop sequence?
>
> Agreed. I was trying to do a 1-to-1 copy of the ftrace code on
> ARM. I was wondering the same thing in that code path while
> doing this though. Can't we replace both instructions instead of
> one instruction when we're patching in nops at runtime?
As Steven pointed out the last time this came up, we can't do it safely
at runtime:
https://marc.info/?l=linux-arm-kernel&m=132517584531389&w=2
More information about the linux-arm-kernel
mailing list