Linux s390 Architecture development
 help / color / mirror / Atom feed
From: Thomas Richter <tmricht@linux.ibm.com>
To: sashiko-reviews@lists.linux.dev
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>,
	Thomas Richter <tmricht@linux.ibm.com>,
	Jan Polensky <japo@linux.ibm.com>,
	Sumanth Korikkar <sumanthk@linux.ibm.com>
Subject: Re: [PATCH 1/3 v8] s390/pai: Use PAI PMU index as parameter replacing event
Date: Tue, 1 Sep 2026 11:56:27 +0200	[thread overview]
Message-ID: <9f3ef9c6-85ab-4e37-a1a5-0ff1f14b6650@linux.ibm.com> (raw)
In-Reply-To: <20260901091238.F26751F000E9@smtp.kernel.org>

On 9/1/26 11:12, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> 
> Pre-existing issues:
> - [High] Missing bounds check on the hardware-reported NNPA counter count (`ib.num_nnpa`) leads to an out-of-bounds kernel heap read.
> --

This is not correct. The value of ib.num_nnpa is read out from hadware and should be correct.
It is assigned to member pai_pmu::num_avail.
Later in function  attr_event_init() that value is compared to pai_pmu::num_named
which contains the number of supported events. And the minimum of both values is taken:

In attr_event_init()
  unsigned int min_attr = min_t(unsigned int, p->num_named, p->num_avail);

So this is protected.
-- 
Thomas Richter, Dept 3303, IBM s390 Linux Development, Boeblingen, Germany
--
IBM Deutschland Research & Development GmbH

Vorsitzender des Aufsichtsrats: Wolfgang Wendt

Geschäftsführung: David Faller

Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294

  reply	other threads:[~2026-09-01  9:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-01  8:54 [PATCH 0/3 v8] Add CPU hotplug support for PAI PMU Thomas Richter
2026-09-01  8:54 ` [PATCH 1/3 v8] s390/pai: Use PAI PMU index as parameter replacing event Thomas Richter
2026-09-01  9:12   ` sashiko-bot
2026-09-01  9:56     ` Thomas Richter [this message]
2026-09-01  8:54 ` [PATCH 2/3 v8] s390/pai: Move locking to event init and delete Thomas Richter
2026-09-01  9:12   ` sashiko-bot
2026-09-01  8:54 ` [PATCH 3/3 v8] s390/pai: Support CPU hotplug for PMU PAI Thomas Richter
2026-09-01  9:03   ` sashiko-bot
2026-09-01 11:19   ` 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=9f3ef9c6-85ab-4e37-a1a5-0ff1f14b6650@linux.ibm.com \
    --to=tmricht@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=japo@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