[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b53c5873-4f83-915b-c5ac-9594f7964dcb@huawei.com>
Date: Thu, 24 Nov 2022 10:41:46 +0800
From: "Leizhen (ThunderTown)" <thunder.leizhen@...wei.com>
To: Petr Mladek <pmladek@...e.com>
CC: Josh Poimboeuf <jpoimboe@...nel.org>,
Jiri Kosina <jikos@...nel.org>,
Miroslav Benes <mbenes@...e.cz>,
Joe Lawrence <joe.lawrence@...hat.com>,
<live-patching@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
"Masahiro Yamada" <masahiroy@...nel.org>,
Alexei Starovoitov <ast@...nel.org>,
Jiri Olsa <jolsa@...nel.org>,
Kees Cook <keescook@...omium.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Luis Chamberlain <mcgrof@...nel.org>,
<linux-modules@...r.kernel.org>,
Steven Rostedt <rostedt@...dmis.org>,
"Ingo Molnar" <mingo@...hat.com>,
David Laight <David.Laight@...lab.com>
Subject: Re: [PATCH v8 7/9] livepatch: Improve the search performance of
module_kallsyms_on_each_symbol()
On 2022/11/23 21:57, Petr Mladek wrote:
> On Wed 2022-11-02 16:49:19, Zhen Lei wrote:
>> Currently we traverse all symbols of all modules to find the specified
>> function for the specified module. But in reality, we just need to find
>> the given module and then traverse all the symbols in it.
>>
>> Let's add a new parameter 'const char *modname' to function
>> module_kallsyms_on_each_symbol(), then we can compare the module names
>> directly in this function and call hook 'fn' after matching. And the
>> parameter 'struct module *' in the hook 'fn' can also be deleted.
>>
>> Phase1: mod1-->mod2..(subsequent modules do not need to be compared)
>> |
>> Phase2: -->f1-->f2-->f3
>
> Just for record. The patch looks good from the livepatching code POV.
>
> But I guess that it will need to get updated to support the new
> callers in the ftrace and bpf code.
Yes, this patch and 8/9 conflicts with the patch series of Jiri Olsa,
So they didn't merge into linux-next. I will update and repost after
v6.2-rc1.
>
> Best Regards,
> Petr
> .
>
--
Regards,
Zhen Lei
Powered by blists - more mailing lists