Re: [PATCH v6] livepatch: Clear relocation targets on a module removal

From
Petr Mladek <pmladek@suse.com>
Date
2022-12-09 14:20:37
Also in
live-patching, lkml
Reply to
Petr Mladek, 2022-12-09
On Fri 2022-12-09 14:54:10, Petr Mladek wrote:
On Mon 2022-11-28 17:57:06, Song Liu wrote:
quoted
On Fri, Nov 18, 2022 at 8:24 AM Petr Mladek [off-list ref] wrote:
quoted
quoted
--- a/kernel/livepatch/core.c
+++ b/kernel/livepatch/core.c
I see that you removed also:

	if (strcmp(objname ? objname : "vmlinux", sec_objname))
		return 0;

This is another bug in your "simplification".
This actually is not a bug. It was replaced by the strcmp() check below.
quoted
quoted
quoted
+
+             if (strcmp(objname, sec_objname))
+                     continue;
But this works only because the function is not called for "vmlinux".
It can't be unloaded.

Well, this optimization is not worth it. IMHO, it is better when
the API is able to handle "vmlinux" object a safe way.

We always try to make the livepatch API as error-proof as possible.
It is the main idea of livepatching. It should fix bugs without
breaking the running system.

Best Regards,
Petr
Thread (27 messages) 27 messages, 5 authors, last reply 2022-12-13
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