mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.com>
To: Harry Hsu <x90613@gmail.com>
Cc: jpoimboe@kernel.org, jikos@kernel.org, mbenes@suse.cz,
	joe.lawrence@redhat.com, shuah@kernel.org, song@kernel.org,
	live-patching@vger.kernel.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] selftests/livepatch: Test rejection of aliased symbols in one object
Date: Tue, 8 Sep 2026 09:09:21 +0200	[thread overview]
Message-ID: <ap-0odfpLVv8k2er@pathway> (raw)
In-Reply-To: <20260905155507.273262-1-x90613@gmail.com>

On Sat 2026-09-05 23:55:07, Harry Hsu wrote:
> klp_init_object_loaded() now rejects an object whose klp_funcs resolve to
> the same address, because aliased symbols would push two klp_funcs of one
> livepatch onto a single ops->func_stack and leave the redirection
> ambiguous.
> 
> Add a target module providing test_klp_alias_show() together with its
> __alias() sibling, and a livepatch naming both of them.  Two test cases
> cover both callers of klp_init_object_loaded(): the klp_enable_patch()
> path, where the target module is loaded before the livepatch, and the
> klp_module_coming() path, where the livepatch is loaded first and the
> module loader has to refuse the target module.
> 
> Suggested-by: Song Liu <song@kernel.org>
> Signed-off-by: Harry Hsu <x90613@gmail.com>

Looks good to me and seems to work:

Reviewed-by: Petr Mladek <pmladek@suse.com>
Tested-by: Petr Mladek <pmladek@suse.com>

> This is the selftest I promised in the v2 thread [1].
> 
> It applies on top of patch 1/3 of the series [2] and does not touch the
> rest of it.  Petr, since you are going to post v4 of the whole patchset
> anyway, please feel free to fold this in as the last patch.  Otherwise I
> am happy to resend it as a separate follow-up once the series lands --
> whichever is less work for you.

Yup, I am working on v4 and included this patch.

Best Regards,
Petr

  reply	other threads:[~2026-09-08  7:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-30 17:33 [PATCH v3 0/3] livepatch: Fail object initialization on duplicate patched function Harry Hsu
2026-08-30 17:33 ` [PATCH 1/3] " Harry Hsu
2026-09-08  7:06   ` Petr Mladek
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
2026-09-08  7:09   ` Petr Mladek [this message]
2026-09-08 20:39   ` Song Liu

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=ap-0odfpLVv8k2er@pathway \
    --to=pmladek@suse.com \
    --cc=jikos@kernel.org \
    --cc=joe.lawrence@redhat.com \
    --cc=jpoimboe@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@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®