[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <175820544017.3483828.18098921754214406254.b4-ty@kernel.org>
Date: Thu, 18 Sep 2025 17:43:09 +0100
From: Will Deacon <will@...nel.org>
To: Mark Rutland <mark.rutland@....com>,
Suzuki K Poulose <suzuki.poulose@....com>,
Mike Leach <mike.leach@...aro.org>,
James Clark <james.clark@...aro.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Anshuman Khandual <anshuman.khandual@....com>,
Tamas Zsoldos <tamas.zsoldos@....com>,
Leo Yan <leo.yan@....com>
Cc: catalin.marinas@....com,
kernel-team@...roid.com,
Will Deacon <will@...nel.org>,
coresight@...ts.linaro.org,
linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org,
linux-perf-users@...r.kernel.org
Subject: Re: [PATCH 0/2] perf: Fix overflow in PERF_IDX2OFF() for Arm SPE and TRBE drivers
On Wed, 17 Sep 2025 18:41:37 +0100, Leo Yan wrote:
> If the AUX buffer size is specified as 2 GiB or larger, the expression
> "(buf)->nr_pages << PAGE_SHIFT" may exceed 0x8000_0000. Since
> (buf)->nr_pages is a signed integer, the shift can overflow and produce
> a negative value. As a result, PERF_IDX2OFF() fails to work correctly.
>
> Fix this by casting (buf)->nr_pages to unsigned long before the shift,
> which allows PERF_IDX2OFF() to handle large buffers properly.
>
> [...]
Applied to will (for-next/perf), thanks!
[1/2] coresight: trbe: Prevent overflow in PERF_IDX2OFF()
https://git.kernel.org/will/c/105f56877f2d
[2/2] perf: arm_spe: Prevent overflow in PERF_IDX2OFF()
https://git.kernel.org/will/c/a29fea30dd93
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
Powered by blists - more mailing lists