Live Patching
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: song@kernel.org, jpoimboe@kernel.org, joe.lawrence@redhat.com,
	jikos@kernel.org, mbenes@suse.cz, pmladek@suse.com
Cc: live-patching@vger.kernel.org, "Yafang Shao" <laoar.shao@gmail.com>
Subject: Re: [PATCH v2 3/4] livepatch: deprecate stack_order
Date: Fri, 29 May 2026 04:54:46 +0000	[thread overview]
Message-ID: <20260529045446.B22791F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260529034542.68766-4-laoar.shao@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Critical] The commit entirely removes the `stack_order` sysfs attribute while only marking it as `<deprecated>` in the ABI documentation, causing immediate backwards compatibility breakage and contradicting documentation guidelines.
--

commit 041b2dbba1a7397626104dd773fc1f37228d382c
Author: Yafang Shao <laoar.shao@gmail.com>

livepatch: deprecate stack_order

This commit deprecates the stack_order sysfs attribute for atomic-replace
livepatches, since a single function can only be modified by a unique
replace_set.

> diff --git a/Documentation/ABI/testing/sysfs-kernel-livepatch b/Documentation/ABI/testing/sysfs-kernel-livepatch
> index 6d75235a6a2e4..fddad93dba797 100644
> --- a/Documentation/ABI/testing/sysfs-kernel-livepatch
> +++ b/Documentation/ABI/testing/sysfs-kernel-livepatch
> @@ -62,6 +62,7 @@ Description:
>  		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.
> +		<deprecated>

[ ... ]

> diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c
> index 969fea2a92631..6d65f839f4420 100644
> --- a/kernel/livepatch/core.c
> +++ b/kernel/livepatch/core.c
[ ... ]
> @@ -457,38 +456,15 @@ static ssize_t replace_set_show(struct kobject *kobj,
>  	return sysfs_emit(buf, "%u\n", patch->replace_set);
>  }
>  
> -static ssize_t stack_order_show(struct kobject *kobj,
> -				struct kobj_attribute *attr, char *buf)
> -{
> -	struct klp_patch *patch, *this_patch;
> -	int stack_order = 0;
> -
> -	this_patch = container_of(kobj, struct klp_patch, kobj);
> -
> -	mutex_lock(&klp_mutex);
> -
> -	klp_for_each_patch(patch) {
> -		stack_order++;
> -		if (patch == this_patch)
> -			break;
> -	}
> -
> -	mutex_unlock(&klp_mutex);
> -
> -	return sysfs_emit(buf, "%d\n", stack_order);
> -}
> -
>  static struct kobj_attribute enabled_kobj_attr = __ATTR_RW(enabled);
>  static struct kobj_attribute transition_kobj_attr = __ATTR_RO(transition);
>  static struct kobj_attribute force_kobj_attr = __ATTR_WO(force);
>  static struct kobj_attribute replace_set_kobj_attr = __ATTR_RO(replace_set);
> -static struct kobj_attribute stack_order_kobj_attr = __ATTR_RO(stack_order);
>  static struct attribute *klp_patch_attrs[] = {
>  	&enabled_kobj_attr.attr,
>  	&transition_kobj_attr.attr,
>  	&force_kobj_attr.attr,
>  	&replace_set_kobj_attr.attr,
> -	&stack_order_kobj_attr.attr,
>  	NULL
>  };

[Severity: Critical]
The commit message and documentation state that the stack_order attribute
is being deprecated, but this code completely removes the attribute. Does
this abruptly break ABI compatibility for userspace tools that expect this
sysfs file to exist?

Normally, deprecating an interface requires keeping it around for a
transition period (perhaps returning a dummy value) rather than deleting
it immediately. Also, if it were actually removed, shouldn't the ABI
documentation be moved to the removed/ directory instead of just appending
<deprecated> to the existing entry?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260529034542.68766-1-laoar.shao@gmail.com?part=3

  reply	other threads:[~2026-05-29  4:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-29  3:45 [PATCH v2 0/4] livepatch: Introduce replace set support Yafang Shao
2026-05-29  3:45 ` [PATCH v2 1/4] livepatch: Make klp_find_func() non-static Yafang Shao
2026-05-29  4:01   ` sashiko-bot
2026-05-29  9:07     ` Yafang Shao
2026-05-29  3:45 ` [PATCH v2 2/4] livepatch: Support scoped atomic replace using replace_set Yafang Shao
2026-05-29  4:32   ` sashiko-bot
2026-05-29  9:11     ` Yafang Shao
2026-05-29  3:45 ` [PATCH v2 3/4] livepatch: deprecate stack_order Yafang Shao
2026-05-29  4:54   ` sashiko-bot [this message]
2026-05-29  9:13     ` Yafang Shao
2026-05-29  3:45 ` [PATCH v2 4/4] selftests/livepatch: Update tests for replace_set Yafang Shao
2026-05-29  5:16   ` sashiko-bot
2026-05-29  9:12     ` 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=20260529045446.B22791F00893@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