From: Christoph Hellwig <hch@lst.de>
To: "Petr Tesařík" <petr@tesarici.cz>
Cc: Petr Tesarik <petrtesarik@huaweicloud.com>,
Christoph Hellwig <hch@lst.de>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Robin Murphy <robin.murphy@arm.com>,
Petr Tesarik <petr.tesarik.ext@huawei.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"open list:DMA MAPPING HELPERS" <iommu@lists.linux.dev>,
open list <linux-kernel@vger.kernel.org>,
Wangkefeng <wangkefeng.wang@huawei.com>,
Roberto Sassu <roberto.sassu@huaweicloud.com>,
Petr Tesarik <petr.tesarik1@huawei-partners.com>,
Niklas Schnelle <schnelle@linux.ibm.com>,
Halil Pasic <pasic@linux.ibm.com>,
stable@vger.kernel.org
Subject: Re: [PATCH 1/1] swiotlb: fix out-of-bounds TLB allocations with CONFIG_SWIOTLB_DYNAMIC
Date: Wed, 8 Nov 2023 15:18:28 +0100 [thread overview]
Message-ID: <20231108141828.GA1574@lst.de> (raw)
In-Reply-To: <20231108132120.0538a778@meshulam.tesarici.cz>
On Wed, Nov 08, 2023 at 01:21:20PM +0100, Petr Tesařík wrote:
> On Wed, 8 Nov 2023 12:12:49 +0100
> Petr Tesarik <petrtesarik@huaweicloud.com> wrote:
>
> > From: Petr Tesarik <petr.tesarik1@huawei-partners.com>
> >
> > Limit the free list length to the size of the IO TLB. Transient pool can be
> > smaller than IO_TLB_SEGSIZE, but the free list is initialized with the
> > assumption that the total number of slots is a multiple of IO_TLB_SEGSIZE.
> > As a result, swiotlb_area_find_slots() may allocate slots past the end of
> > a transient IO TLB buffer.
>
> Just to make it clear, this patch addresses only the memory corruption
> reported by Niklas, without addressing the underlying issues. Where
> corruption happened before, allocations will fail with this patch.
Thanks, I've applied so that we can get it into -rc1.
next prev parent reply other threads:[~2023-11-08 14:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-08 11:12 [PATCH 1/1] swiotlb: fix out-of-bounds TLB allocations with CONFIG_SWIOTLB_DYNAMIC Petr Tesarik
2023-11-08 12:21 ` Petr Tesařík
2023-11-08 14:18 ` Christoph Hellwig [this message]
2023-11-09 12:24 ` Niklas Schnelle
2023-11-09 15:05 ` Petr Tesařík
2023-11-08 15:04 ` Halil Pasic
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=20231108141828.GA1574@lst.de \
--to=hch@lst.de \
--cc=gregkh@linuxfoundation.org \
--cc=iommu@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=pasic@linux.ibm.com \
--cc=petr.tesarik.ext@huawei.com \
--cc=petr.tesarik1@huawei-partners.com \
--cc=petr@tesarici.cz \
--cc=petrtesarik@huaweicloud.com \
--cc=roberto.sassu@huaweicloud.com \
--cc=robin.murphy@arm.com \
--cc=schnelle@linux.ibm.com \
--cc=stable@vger.kernel.org \
--cc=wangkefeng.wang@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.