RFC livepatch: arm64: add support for livepatch on arm64
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest1 of 3 patches 0 repliesNew
1 of 3 patches is in this archive. The cover letter announces 3.
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 2/3 | livepatch: module: arm64: extract the relocation code for reuse | +0 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/3] livepatch: arm64: add support for livepatch on arm64
Quoted 11 lines · Li Bin
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.
Quoted 3 lines
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.
Signature · 1 line
Josh