livepatch: Allow architectures to specify an alternate ftrace location
authorMichael Ellerman <mpe@ellerman.id.au>
Thu, 24 Mar 2016 11:04:02 +0000 (22:04 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 14 Apr 2016 05:47:05 +0000 (15:47 +1000)
commit28e7cbd3e0f5fefec892842d1391ebd508fdb5ce
tree98c58a0587978e5e81fb32baa13f64ce3f386158
parent04cf31a759ef575f750a63777cee95500e410994
livepatch: Allow architectures to specify an alternate ftrace location

When livepatch tries to patch a function it takes the function address
and asks ftrace to install the livepatch handler at that location.
ftrace will look for an mcount call site at that exact address.

On powerpc the mcount location is not the first instruction of the
function, and in fact it's not at a constant offset from the start of
the function. To accommodate this add a hook which arch code can
override to customise the behaviour.

Signed-off-by: Torsten Duwe <duwe@suse.de>
Signed-off-by: Balbir Singh <bsingharora@gmail.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
kernel/livepatch/core.c