From: Petr Mladek <pmladek@suse.com>
To: Yafang Shao <laoar.shao@gmail.com>
Cc: jpoimboe@kernel.org, jikos@kernel.org, mbenes@suse.cz,
joe.lawrence@redhat.com, song@kernel.org,
live-patching@vger.kernel.org, Wardenjohn <zhangwarden@gmail.com>
Subject: Re: [PATCH v3 4/7] livepatch: Deprecate stack_order
Date: Wed, 10 Jun 2026 17:11:21 +0200 [thread overview]
Message-ID: <ail-mQ77SQR7WkiM@pathway.suse.cz> (raw)
In-Reply-To: <20260607131659.29281-5-laoar.shao@gmail.com>
On Sun 2026-06-07 21:16:56, Yafang Shao wrote:
> stack_order is no longer needed for atomic-replace livepatches, as a
> single function can only be modified by a unique replace_set.
> To maintain backward compatibility, print a dummy value, as suggested by
> sashiko-bot.
I would personally remove it completely. I believe that there are
only few users around the world. And they will need to update
the tooling/strategy for the new "replace_set" anyway.
> --- /dev/null
> +++ b/Documentation/ABI/removed/sysfs-kernel-livepatch
> @@ -0,0 +1,9 @@
> +What: /sys/kernel/livepatch/<patch>/stack_order
> +Date: Jan 2025
> +KernelVersion: 6.14.0
> +Description:
> + This attribute specifies the sequence in which live patch modules
> + are applied to the system. If multiple live patches modify the same
> + function, the implementation with the biggest 'stack_order' number
> + is used, unless a transition is currently in progress.
I was not aware of this ABI/removed part. We should put here also
the livepatch/replace interface which was removed in the 3rd patch.
> --- a/tools/testing/selftests/livepatch/test-sysfs.sh
> +++ b/tools/testing/selftests/livepatch/test-sysfs.sh
> @@ -21,8 +21,6 @@ check_sysfs_rights "$MOD_LIVEPATCH" "enabled" "-rw-r--r--"
> check_sysfs_value "$MOD_LIVEPATCH" "enabled" "1"
> check_sysfs_rights "$MOD_LIVEPATCH" "force" "--w-------"
> check_sysfs_rights "$MOD_LIVEPATCH" "replace" "-r--r--r--"
> -check_sysfs_rights "$MOD_LIVEPATCH" "stack_order" "-r--r--r--"
> -check_sysfs_value "$MOD_LIVEPATCH" "stack_order" "1"
> check_sysfs_rights "$MOD_LIVEPATCH" "transition" "-r--r--r--"
> check_sysfs_value "$MOD_LIVEPATCH" "transition" "0"
> check_sysfs_rights "$MOD_LIVEPATCH" "vmlinux/patched" "-r--r--r--"
> @@ -135,71 +133,4 @@ livepatch: '$MOD_LIVEPATCH': completing unpatching transition
> livepatch: '$MOD_LIVEPATCH': unpatching complete
> % rmmod $MOD_LIVEPATCH"
>
> -start_test "sysfs test stack_order value"
> -
This is not longer needed in linux-next. Marcos made the test optional,
see
https://lore.kernel.org/all/20260504-lp-tests-old-fixes-v5-6-0be26d94ab9a@suse.com/
The changes are queued for 7.2 merge window which will likely start
next week.
I suggest to wait with v4 until the change is merged. We should wait
for opinion from others (Miroslav, Josh, Joe, Song) anyway. We
need to be sure that the change of the semantic is acceptable
in general.
> -load_lp $MOD_LIVEPATCH
> -
> -check_sysfs_value "$MOD_LIVEPATCH" "stack_order" "1"
> -
> -load_lp $MOD_LIVEPATCH2
> -
> -check_sysfs_value "$MOD_LIVEPATCH2" "stack_order" "2"
> -
> -load_lp $MOD_LIVEPATCH3
Nit: It seems that MOD_LIVEPATCH2 and MOD_LIVEPATCH3 are not longer used
at least in this test-sysfs.sh file. Well, I guess that we will
keep this test optional for older kernels.
> -check_sysfs_value "$MOD_LIVEPATCH3" "stack_order" "3"
> -
Best Regards,
Petr
next prev parent reply other threads:[~2026-06-10 15:11 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-07 13:16 [PATCH v3 0/7] livepatch: Introduce replace set support Yafang Shao
2026-06-07 13:16 ` [PATCH v3 1/7] livepatch: Fix NULL pointer dereference in klp_find_func() Yafang Shao
2026-06-09 13:27 ` Petr Mladek
2026-06-10 3:00 ` Yafang Shao
2026-06-07 13:16 ` [PATCH v3 2/7] livepatch: Move klp_find_func() into core.h Yafang Shao
2026-06-09 15:28 ` Petr Mladek
2026-06-10 3:01 ` Yafang Shao
2026-06-07 13:16 ` [PATCH v3 3/7] livepatch: Support scoped atomic replace using replace_set Yafang Shao
2026-06-07 13:33 ` sashiko-bot
2026-06-07 14:00 ` Yafang Shao
2026-06-09 16:00 ` Petr Mladek
2026-06-10 3:24 ` Yafang Shao
2026-06-10 9:48 ` Petr Mladek
2026-06-10 14:45 ` code review: was: " Petr Mladek
2026-06-07 13:16 ` [PATCH v3 4/7] livepatch: Deprecate stack_order Yafang Shao
2026-06-07 13:31 ` sashiko-bot
2026-06-10 15:11 ` Petr Mladek [this message]
2026-06-07 13:16 ` [PATCH v3 5/7] selftests/livepatch: Update tests for replace_set Yafang Shao
2026-06-07 13:29 ` sashiko-bot
2026-06-07 13:16 ` [PATCH v3 6/7] selftests/livepatch: Add test for state ID conflict across replace_sets Yafang Shao
2026-06-07 13:16 ` [PATCH v3 7/7] selftests/livepatch: Add test for function " 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=ail-mQ77SQR7WkiM@pathway.suse.cz \
--to=pmladek@suse.com \
--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=song@kernel.org \
--cc=zhangwarden@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