All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] livepatch: arm64: add support for livepatch on arm64
@ 2015-12-14 12:49 Li Bin
  2015-12-14 12:49 ` [RFC PATCH 1/3] livepatch: allow arch specific implementation Li Bin
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Li Bin @ 2015-12-14 12:49 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Li Bin (3):
  livepatch: allow arch specific implementation
  livepatch: module: arm64: extract the relocation code for reuse
  livepatch: arm64: add support for livepatch on arm64

 Makefile                           |    7 +-
 arch/arm64/Kconfig                 |    4 +
 arch/arm64/include/asm/livepatch.h |   45 +++++
 arch/arm64/include/asm/module.h    |    3 +
 arch/arm64/kernel/Makefile         |    1 +
 arch/arm64/kernel/livepatch.c      |  123 ++++++++++++
 arch/arm64/kernel/module.c         |  360 ++++++++++++++++++------------------
 kernel/livepatch/Kconfig           |   10 +-
 kernel/livepatch/core.c            |   45 +++--
 9 files changed, 403 insertions(+), 195 deletions(-)
 create mode 100644 arch/arm64/include/asm/livepatch.h
 create mode 100644 arch/arm64/kernel/livepatch.c

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-12-17 12:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-14 12:49 [RFC PATCH 0/3] livepatch: arm64: add support for livepatch on arm64 Li Bin
2015-12-14 12:49 ` [RFC PATCH 1/3] livepatch: allow arch specific implementation Li Bin
2015-12-14 12:49 ` [RFC PATCH 2/3] livepatch: module: arm64: extract the relocation code for reuse Li Bin
2015-12-14 15:29   ` Josh Poimboeuf
2015-12-14 12:49 ` [RFC PATCH 3/3] livepatch: arm64: add support for livepatch on arm64 Li Bin
2015-12-14 15:27 ` [RFC PATCH 0/3] " Josh Poimboeuf
2015-12-15 15:43 ` Petr Mladek
2015-12-16  6:04   ` Li Bin
2015-12-17 12:36     ` Petr Mladek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.