All of lore.kernel.org
 help / color / mirror / Atom feed
From: jpoimboe@redhat.com (Josh Poimboeuf)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 0/3] livepatch: arm64: add support for livepatch on arm64
Date: Mon, 14 Dec 2015 09:27:18 -0600	[thread overview]
Message-ID: <20151214152718.GA11552@treble.redhat.com> (raw)
In-Reply-To: <1450097378-3780-1-git-send-email-huawei.libin@huawei.com>

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

  parent reply	other threads:[~2015-12-14 15:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Josh Poimboeuf [this message]
2015-12-15 15:43 ` [RFC PATCH 0/3] " Petr Mladek
2015-12-16  6:04   ` Li Bin
2015-12-17 12:36     ` Petr Mladek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151214152718.GA11552@treble.redhat.com \
    --to=jpoimboe@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.