Re: [PATCH v8 7/9] livepatch: Improve the search performance of module_kallsyms_on_each_symbol()

From
Petr Mladek <pmladek@suse.com>
Date
2022-11-23 14:02:30
Also in
live-patching, lkml
Reply to
Zhen Lei, 2022-11-02
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.

Best Regards,
Petr
Thread (35 messages) 35 messages, 6 authors, last reply 2022-12-07
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help