From: sashiko-bot@kernel.org
To: song@kernel.org, joe.lawrence@redhat.com, pmladek@suse.com,
mbenes@suse.cz, "Yafang Shao" <laoar.shao@gmail.com>,
jpoimboe@kernel.org, jikos@kernel.org
Cc: live-patching@vger.kernel.org
Subject: Re: [PATCH v8 9/9] selftests/livepatch: Add function test for provides/obsoletes
Date: Wed, 09 Sep 2026 02:56:03 +0000 [thread overview]
Message-ID: <20260909025604.14C2C1F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260909024324.16002-10-laoar.shao@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The test fails to verify its own claim that a function is functionally unpatched after an atomic replacement.
--
commit abfccb0026870ac46d37d3802586498b0874cba2
Author: Yafang Shao <laoar.shao@gmail.com>
selftests/livepatch: Add function test for provides/obsoletes
This commit adds selftest scenarios for livepatches using the provides
and obsoletes features to ensure patches with different provides IDs do
not modify the same function. It verifies replacement and coexistence
behaviors for different function combinations. Tests are skipped on legacy
kernels.
> diff --git a/tools/testing/selftests/livepatch/test-provides-obsoletes.sh b/tools/testing/selftests/livepatch/test-provides-obsoletes.sh
> --- a/tools/testing/selftests/livepatch/test-provides-obsoletes.sh
> +++ b/tools/testing/selftests/livepatch/test-provides-obsoletes.sh
[ ... ]
> +# - after the replacement /proc/meminfo is no longer patched, while
> +# /proc/cmdline is patched
> +# - unload the replacing livepatch, then the replaced one
> +
> +start_test "different functions, atomic replace works (nops)"
> +
> +load_lp $MOD_MEMINFO provides=1
> +
> +grep 'live patched' /proc/meminfo > /dev/kmsg
> +
> +load_lp $MOD_CMDLINE provides=1
> +
> +grep 'live patched' /proc/cmdline > /dev/kmsg
> +
> +disable_lp $MOD_CMDLINE
[Severity: Medium]
The test documentation explicitly claims that after the replacement,
/proc/meminfo is no longer patched while /proc/cmdline is patched.
However, only /proc/cmdline is checked during this sequence.
Should there be an additional step to grep /proc/meminfo and verify it
is functionally unpatched before disabling the livepatch? If the atomic
replace logic had a flaw that accidentally left /proc/meminfo patched,
it appears this verification would be missed and the test would still pass.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260909024324.16002-1-laoar.shao@gmail.com?part=9
next prev parent reply other threads:[~2026-09-09 2:56 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-09 2:43 [PATCH v8 0/9] livepatch: Add support for scoped atomic replace Yafang Shao
2026-09-09 2:43 ` [PATCH v8 1/9] selftests/livepatch: Clarify test module file names Yafang Shao
2026-09-09 5:22 ` Song Liu
2026-09-09 2:43 ` [PATCH v8 2/9] selftests/livepatch: Adapt atomic replace tests to provides/obsoletes Yafang Shao
2026-09-09 5:27 ` Song Liu
2026-09-09 6:59 ` Yafang Shao
2026-09-09 2:43 ` [PATCH v8 3/9] livepatch: Make klp_find_func() non static Yafang Shao
2026-09-09 2:43 ` [PATCH v8 4/9] livepatch: Call klp_init_patch_early() earlier Yafang Shao
2026-09-09 2:56 ` sashiko-bot
2026-09-09 3:44 ` Yafang Shao
2026-09-09 2:43 ` [PATCH v8 5/9] livepatch: Implement provides and obsoletes for scoped atomic replace Yafang Shao
2026-09-09 2:43 ` [PATCH v8 6/9] livepatch: Deprecate stack_order Yafang Shao
2026-09-09 2:43 ` [PATCH v8 7/9] selftests/livepatch: Add provides/obsoletes test scenarios Yafang Shao
2026-09-09 2:43 ` [PATCH v8 8/9] selftests/livepatch: Add state test for provides/obsoletes Yafang Shao
2026-09-09 2:57 ` sashiko-bot
2026-09-09 7:30 ` Yafang Shao
2026-09-09 2:43 ` [PATCH v8 9/9] selftests/livepatch: Add function " Yafang Shao
2026-09-09 2:56 ` sashiko-bot [this message]
2026-09-09 7:01 ` Yafang Shao
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=20260909025604.14C2C1F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=jikos@kernel.org \
--cc=joe.lawrence@redhat.com \
--cc=jpoimboe@kernel.org \
--cc=laoar.shao@gmail.com \
--cc=live-patching@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=pmladek@suse.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=song@kernel.org \
/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