From: Mark Brown <broonie@kernel.org>
To: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
Witold Sadowski <wsadowski@marvell.com>,
Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
kernel test robot <lkp@intel.com>
Subject: Re: [PATCH v2] spi: cadence: Fix out-of-bounds array access in cdns_mrvl_xspi_setup_clock()
Date: Mon, 31 Mar 2025 13:16:00 +0100 [thread overview]
Message-ID: <4f589f15-7531-46cf-9ed9-0e4c6afdcda3@sirena.org.uk> (raw)
In-Reply-To: <gs2ooxfkblnee6cc5yfcxh7nu4wvoqnuv4lrllkhccxgcac2jg@7snmwd73jkhs>
[-- Attachment #1: Type: text/plain, Size: 439 bytes --]
On Fri, Mar 28, 2025 at 09:36:30PM -0700, Josh Poimboeuf wrote:
> If requested_clk > 128, cdns_mrvl_xspi_setup_clock() iterates over the
> entire cdns_mrvl_xspi_clk_div_list array without breaking out early,
> causing 'i' to go beyond the array bounds.
> - while (i < ARRAY_SIZE(cdns_mrvl_xspi_clk_div_list)) {
> + while (i < ARRAY_SIZE(cdns_mrvl_xspi_clk_div_list)-1) {
The usual coding style would be to have spaces around the - here.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2025-03-31 12:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-28 16:08 [PATCH] " Josh Poimboeuf
2025-03-29 4:36 ` [PATCH v2] " Josh Poimboeuf
2025-03-31 12:16 ` Mark Brown [this message]
2025-03-31 15:33 ` [PATCH v3] " Josh Poimboeuf
2025-03-31 18:12 ` Mark Brown
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=4f589f15-7531-46cf-9ed9-0e4c6afdcda3@sirena.org.uk \
--to=broonie@kernel.org \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=wsadowski@marvell.com \
--cc=x86@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
all inboxes | Powered by JetHome®