[RFC PATCH 0/3] livepatch: arm64: add support for livepatch on arm64

From
Josh Poimboeuf <hidden>
Date
2015-12-14 15:27:18
Reply to
Li Bin, 2015-12-14
On Mon, Dec 14, 2015 at 08:49:35PM +0800, Li Bin wrote:
This patchset depends on the on-going gcc feature "-fprolog-pad=N",
which will generate a pad of N nops at the beginning of each function.

Livepatch on arm64 can using the feature (that always placing one nop
at the beginning of the function). And when enable/disable func patching,
just modify the pad code to nop or branch. And that NOP and B instruction
are both safe instructions on arm64 which called "concurrent modification
and execution of instructions", that can be executed by one thread of
execution as they are being modified by another thread of execution without
requiring explicit synchronization.

And this method will improve performance significantly compared with the
method based on ftrace, especially for the critical function being frequently
called.
I think the arch-specific code in this patch set would be greatly
affected by the consistency model when it finally arrives (but that's
currently gated by getting stacktool merged, which should be soon).

So I think it would be a good idea to wait until then before doing
something like this.

Is it possible to use ftrace instead?  That would be a much better short
term solution.

-- 
Josh
Thread (9 messages) 9 messages, 3 authors, last reply 2015-12-17
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help