From: Petr Mladek <pmladek@suse.com>
To: Harry Hsu <x90613@gmail.com>,
jpoimboe@kernel.org, mbenes@suse.cz, joe.lawrence@redhat.com
Cc: jikos@kernel.org, live-patching@vger.kernel.org,
shuah@kernel.org, song@kernel.org, linux-kernel@vger.kernel.org,
Petr Mladek <pmladek@suse.com>
Subject: [PATCH v4 0/5] livepatch: Fail object initialization on duplicate patched function
Date: Tue, 8 Sep 2026 14:03:20 +0200 [thread overview]
Message-ID: <20260908120325.299649-1-pmladek@suse.com> (raw)
This is v4 of the patch failing object initialization when it patches
the same underlying function twice through two aliased symbols
(functions sharing one address) in the same object.
Changes against [v3]:
+ Add selftest for livepatching aliased symbols [Song, Harry]
+ Only partially revert relocations when failing inside
klp_apply_object_relocs() [Sashiko]
+ Cleanup changes made by klp_init_object_loaded() for failing
patch on another failures in klp_module_coming() [Sashiko]
Changes against [v2]:
+ Clarify comments and the commit message [Miroslav]
+ Cleanup when klp_init_object_loaded() fails [Sashiko]
[v2] https://lore.kernel.org/r/20260823060734.58443-1-x90613@gmail.com
[v3] https://lore.kernel.org/r/20260830173343.52759-1-x90613@gmail.com
Harry Hsu (2):
livepatch: Fail object initialization on duplicate patched function
selftests/livepatch: Test rejection of aliased symbols in one object
Petr Mladek (3):
livepatch: Move code for updating livepatch object relocations
livepatch: Clear relocations when klp_apply_object_relocs() fails
livepatch: Clean up klp_init_object_loaded() when fails
kernel/livepatch/core.c | 137 ++++++++++++------
tools/testing/selftests/livepatch/Makefile | 3 +-
.../testing/selftests/livepatch/test-alias.sh | 81 +++++++++++
.../selftests/livepatch/test_modules/Makefile | 4 +-
.../test_modules/test_klp_alias_patch.c | 62 ++++++++
.../test_modules/test_klp_alias_target.c | 48 ++++++
6 files changed, 285 insertions(+), 50 deletions(-)
create mode 100755 tools/testing/selftests/livepatch/test-alias.sh
create mode 100644 tools/testing/selftests/livepatch/test_modules/test_klp_alias_patch.c
create mode 100644 tools/testing/selftests/livepatch/test_modules/test_klp_alias_target.c
--
2.55.0
next reply other threads:[~2026-09-08 12:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 12:03 Petr Mladek [this message]
2026-09-08 12:03 ` [PATCH v4 1/5] " Petr Mladek
2026-09-08 12:17 ` sashiko-bot
2026-09-08 13:02 ` Petr Mladek
2026-09-08 12:03 ` [PATCH v4 2/5] selftests/livepatch: Test rejection of aliased symbols in one object Petr Mladek
2026-09-08 12:03 ` [PATCH v4 3/5] livepatch: Move code for updating livepatch object relocations Petr Mladek
2026-09-08 12:03 ` [PATCH v4 4/5] livepatch: Clear relocations when klp_apply_object_relocs() fails Petr Mladek
2026-09-08 12:18 ` sashiko-bot
2026-09-08 13:29 ` Petr Mladek
2026-09-08 12:03 ` [PATCH v4 5/5] livepatch: Clean up klp_init_object_loaded() when fails Petr Mladek
2026-09-08 12:25 ` sashiko-bot
2026-09-08 13:32 ` Petr Mladek
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=20260908120325.299649-1-pmladek@suse.com \
--to=pmladek@suse.com \
--cc=jikos@kernel.org \
--cc=joe.lawrence@redhat.com \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=shuah@kernel.org \
--cc=song@kernel.org \
--cc=x90613@gmail.com \
/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
all inboxes | Powered by JetHome®