Re: [PATCH v4 1/3] arm64: implement ftrace with regs
From: Jiri Kosina
Date: Wed Oct 31 2018 - 09:19:14 EST
On Wed, 31 Oct 2018, Mark Rutland wrote:
> I guess skipping the original function prologue would simplify the
> implementation of the replacement function (and would mean that the regs
> held the function arguments per the procedure call standard), but AFAICT
> other architectures aren't relying on that, so it doesn't seem to be a
> strict requirement.
> What am I missing?
> How does livepatching handle the pre-mcount function preambles on
> architectures with existing support?
Other architectures do rely on that. That's exactly for example why on x86
we use '-pg -mfentry', to make sure we hook the function *before*