]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitb45dc7e961f0a7916332e2d608899983fd3bac22
tree98c58a0587978e5e81fb32baa13f64ce3f386158
parentaf04a2a815804b31d9808c3bff059e40f9720a6f
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