mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Harry Hsu <x90613@gmail.com>
To: pmladek@suse.com
Cc: jpoimboe@kernel.org, jikos@kernel.org, mbenes@suse.cz,
	joe.lawrence@redhat.com, live-patching@vger.kernel.org,
	linux-kernel@vger.kernel.org, Harry Hsu <x90613@gmail.com>
Subject: [PATCH v3 0/3] livepatch: Fail object initialization on duplicate patched function
Date: Mon, 31 Aug 2026 01:33:05 +0800	[thread overview]
Message-ID: <20260830173343.52759-1-x90613@gmail.com> (raw)

This is v3 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 [1].

Per Miroslav's review, the changelog and title have been reworded to
avoid implying this is livepatch-specific validation: the check runs
during object initialization, which klp_module_coming() also triggers
for a module still being loaded.

Petr found that the error path in klp_init_object_loaded() -- taken
by this new check, among others -- leaves stale object state behind
on failure. His two patches (2/3, 3/3) fix that by routing all of
klp_init_object_loaded()'s error returns through proper cleanup, and
are included in this series since they touch the same code and would
otherwise conflict with patch 1/3.

[1] https://lore.kernel.org/all/20260823060734.58443-1-x90613@gmail.com/

Harry Hsu (1):
  livepatch: Fail object initialization on duplicate patched function

Petr Mladek (2):
  livepatch: Move code for updating livepatch object relocations
  livepatch: Clean up klp_init_object_loaded() when fails

 kernel/livepatch/core.c | 117 ++++++++++++++++++++++++----------------
 1 file changed, 71 insertions(+), 46 deletions(-)

-- 
2.43.0


             reply	other threads:[~2026-08-30 17:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-30 17:33 Harry Hsu [this message]
2026-08-30 17:33 ` [PATCH 1/3] " Harry Hsu
2026-08-30 17:33 ` [PATCH 2/3] livepatch: Move code for updating livepatch object relocations Harry Hsu
2026-08-30 17:33 ` [PATCH 3/3] livepatch: Clean up klp_init_object_loaded() when fails Harry Hsu
2026-08-30 17:56   ` sashiko-bot
2026-08-31 12:57     ` Petr Mladek
2026-09-05 15:55 ` [PATCH] selftests/livepatch: Test rejection of aliased symbols in one object Harry Hsu

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=20260830173343.52759-1-x90613@gmail.com \
    --to=x90613@gmail.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=pmladek@suse.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®