live-patching.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jinyang He <hejinyang@loongson.cn>
To: Miroslav Benes <mbenes@suse.cz>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Tiezhu Yang <yangtiezhu@loongson.cn>,
	Xuefeng Li <lixuefeng@loongson.cn>,
	linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
	live-patching@vger.kernel.org
Subject: Re: [PATCH RFC] MIPS: livepatch: Add LIVEPATCH basic code
Date: Wed, 10 Mar 2021 16:56:27 +0800	[thread overview]
Message-ID: <07945438-05b9-b62a-28eb-b91729ebf637@loongson.cn> (raw)
In-Reply-To: <alpine.LSU.2.21.2103100912590.13355@pobox.suse.cz>

On 03/10/2021 04:18 PM, Miroslav Benes wrote:

> Hi,
>
> I cannot really comment on mips arch specifics but few words from the live
> patching perspective.
Thanks for your reply. :-)

>
> On Mon, 1 Mar 2021, Jinyang He wrote:
>
>> Add the basic code of livepatch. livepatch is temporarily unavailable.
>> Two core functions are missing, one is DYNAMIC_FTRACE_WITH_REGS, and
>> another is save_stack_trace_tsk_reliable().
>> `Huang Pei <huangpei@loongson.cn>` is doing for ftrace. He will use
>> `-fpatchable-function-entry` to achieve more complete ftrace.
> DYNAMIC_FTRACE_WITH_ARGS has been introduced recently, so you might also
> look at that. As far as the live patching is concerned,
> DYNAMIC_FTRACE_WITH_ARGS is sufficient.
Huang Pei had told me, and the follow link explains it detaily.
He is doing this work on mips arch now.

http://mpe.github.io/posts/2016/05/23/kernel-live-patching-for-ppc64le/

>> save_stack_trace_tsk_reliable() currently has difficulties. This function
>> may be improved in the future, but that seems to be a long time away.
>> This is also the reason for delivering this RFC. Hope to get any help.
> You may want to look at Documentation/livepatch/reliable-stacktrace.rst
> which nicely describes the requirements for the reliable stacktraces.
And Maciej answered many questions for me about reliable stacktrace.
I thought Documentation/livepatch/reliable-stacktrace.rst is important, too.
I noticed that arm64 has submitted objtool patches before, and it seems that
MIPS may use this method (ORC) to achieve reliable stack traceback. It looks
complicated to me. Drawf, compiler, abi and so on.

> Regards
> Miroslav
Thanks,
Jinyang


      reply	other threads:[~2021-03-10  8:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-01 11:30 [PATCH RFC] MIPS: livepatch: Add LIVEPATCH basic code Jinyang He
2021-03-10  8:18 ` Miroslav Benes
2021-03-10  8:56   ` Jinyang He [this message]

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=07945438-05b9-b62a-28eb-b91729ebf637@loongson.cn \
    --to=hejinyang@loongson.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=lixuefeng@loongson.cn \
    --cc=mbenes@suse.cz \
    --cc=tsbogend@alpha.franken.de \
    --cc=yangtiezhu@loongson.cn \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).