From: sashiko-bot@kernel.org
To: "Sumanth Korikkar" <sumanthk@linux.ibm.com>
Cc: linux-s390@vger.kernel.org,
"Alexander Gordeev" <agordeev@linux.ibm.com>,
"Heiko Carstens" <hca@linux.ibm.com>,
"Vasily Gorbik" <gor@linux.ibm.com>,
"Christian Borntraeger" <borntraeger@linux.ibm.com>
Subject: Re: [PATCH 2/2] s390/cpum_cf: Honor hwctr session cpu mask during hotplug
Date: Tue, 06 Oct 2026 11:24:17 +0000 [thread overview]
Message-ID: <20261006112418.5D1021F00893@smtp.kernel.org> (raw)
In-Reply-To: <20261006111304.4023017-3-sumanthk@linux.ibm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Critical] s390/cpum_cf: strict mask enforcement breaks legacy lshwc tools
--
commit d3def3a5308e1d518c4fe69c3d9a0fc29e832d28
Author: Sumanth Korikkar <sumanthk@linux.ibm.com>
s390/cpum_cf: Honor hwctr session cpu mask during hotplug
This commit updates cfset_online_cpu() and cfset_offline_cpu() to start and
stop counter sets only for active hwctr sessions that include the CPU in
their requested mask. It prevents the kernel from dynamically modifying
the session mask on each hotplug event.
> diff --git a/arch/s390/kernel/perf_cpum_cf.c b/arch/s390/kernel/perf_cpum_cf.c
> index 1d63dc3b0ab99..a2334af515447 100644
> --- a/arch/s390/kernel/perf_cpum_cf.c
> +++ b/arch/s390/kernel/perf_cpum_cf.c
> @@ -1778,17 +1779,19 @@ static int cfset_online_cpu(unsigned int cpu)
>
> if (!list_empty(&cfset_session.head)) {
> list_for_each_entry(rp, &cfset_session.head, node) {
> + if (!cpumask_test_cpu(cpu, &rp->mask))
> + continue;
> +
[Severity: Critical]
Could this strict mask enforcement cause a userspace regression with legacy
lshwc tools?
Legacy versions of lshwc initiate 'allcpu' sessions by providing the currently
online CPU mask instead of the possible CPU mask.
When a new CPU is hotplugged, this strict evaluation will silently exclude the
new CPU, preventing the legacy behavior of dynamically expanding the session
mask to newly onlined CPUs.
Since this change alters the semantic behavior of hwctr sessions, will systems
using legacy s390-tools on an updated kernel encounter incomplete data for newly
hotplugged CPUs?
Breaking existing userspace applications, even when fixing a bug such as the
incorrect inclusion of CPUs in subset masks, is generally considered an ABI
regression.
> p.sets = rp->ctrset;
> cfset_ioctl_on(&p);
> - cpumask_set_cpu(cpu, &rp->mask);
> }
> }
> return 0;
> }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261006111304.4023017-1-sumanthk@linux.ibm.com?part=2
next prev parent reply other threads:[~2026-10-06 11:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-06 11:13 [PATCH 0/2] s390/cpum_cf: Check session cpu mask during hotplug Sumanth Korikkar
2026-10-06 11:13 ` [PATCH 1/2] s390/cpum_cf: Check session mask before cpu offline Sumanth Korikkar
2026-10-06 11:24 ` sashiko-bot
2026-10-06 11:13 ` [PATCH 2/2] s390/cpum_cf: Honor hwctr session cpu mask during hotplug Sumanth Korikkar
2026-10-06 11:24 ` sashiko-bot [this message]
2026-10-06 11:53 ` Sumanth Korikkar
2026-10-06 14:04 ` [PATCH 0/2] s390/cpum_cf: Check " Heiko Carstens
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=20261006112418.5D1021F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=sumanthk@linux.ibm.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