From: John Garry <john.g.garry@oracle.com>
To: Ivy Lopez <skunkolee@gmail.com>,
Sathya Prakash <sathya.prakash@broadcom.com>
Cc: Sreekanth Reddy <sreekanth.reddy@broadcom.com>,
Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com>,
Ranjan Kumar <ranjan.kumar@broadcom.com>,
"James E . J . Bottomley" <James.Bottomley@HansenPartnership.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
MPT-FusionLinux.pdl@broadcom.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: mpt3sas: avoid out-of-bounds cpumask_of_node() call in _base_assign_reply_queues()
Date: Tue, 18 Aug 2026 16:09:07 +0100 [thread overview]
Message-ID: <ed63506e-4b73-4ce5-a506-23f1411d19f7@oracle.com> (raw)
In-Reply-To: <20260817221300.43286-1-skunkolee@gmail.com>
On 17/08/2026 23:13, Ivy Lopez wrote:
> dev_to_node() can return NUMA_NO_NODE (-1) on systems without NUMA
> topology information for the PCI device, such as single-socket
> boards that don't expose device-to-node affinity.
I think that this problem would have appeared by now for this driver (if
it were really a problem).
However, for CONFIG_NUMA=n dev_to_node() always returns NUMA_NO_NODE.
> Passing -1
> directly into cpumask_of_node() indexes node_to_cpumask_map[-1],
> an out-of-bounds array read caught by UBSAN:
>
> UBSAN: array-index-out-of-bounds in arch/x86/include/asm/topology.h:72:28
> index -1 is out of range for type 'cpumask *[1024]'
x86 seems to be only arch which has this problem now.
I have tried unsuccessfully to fix it:
https://lore.kernel.org/lkml/20260107094007.966496-5-john.g.garry@oracle.com/
next prev parent reply other threads:[~2026-08-18 15:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-17 22:13 Ivy Lopez
2026-08-18 12:46 ` Johannes Thumshirn
2026-08-18 15:09 ` John Garry [this message]
2026-08-25 19:03 ` [PATCH v2] " Ivy Lopez
2026-09-01 10:21 ` John Garry
2026-09-03 3:10 ` Martin K. Petersen (Oracle)
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=ed63506e-4b73-4ce5-a506-23f1411d19f7@oracle.com \
--to=john.g.garry@oracle.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=MPT-FusionLinux.pdl@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=ranjan.kumar@broadcom.com \
--cc=sathya.prakash@broadcom.com \
--cc=skunkolee@gmail.com \
--cc=sreekanth.reddy@broadcom.com \
--cc=suganath-prabu.subramani@broadcom.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
all inboxes | Powered by JetHome®