[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <07945438-05b9-b62a-28eb-b91729ebf637@loongson.cn>
Date: Wed, 10 Mar 2021 16:56:27 +0800
From: Jinyang He <hejinyang@...ngson.cn>
To: Miroslav Benes <mbenes@...e.cz>
Cc: Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Tiezhu Yang <yangtiezhu@...ngson.cn>,
Xuefeng Li <lixuefeng@...ngson.cn>, linux-mips@...r.kernel.org,
linux-kernel@...r.kernel.org, live-patching@...r.kernel.org
Subject: Re: [PATCH RFC] MIPS: livepatch: Add LIVEPATCH basic code
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@...ngson.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
Powered by blists - more mailing lists