[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0899838f-7845-48e3-a5b6-7a2d00ce0bac@linux.intel.com>
Date: Wed, 11 Dec 2024 15:35:20 +0800
From: Baolu Lu <baolu.lu@...ux.intel.com>
To: "Tian, Kevin" <kevin.tian@...el.com>, Joerg Roedel <joro@...tes.org>,
Will Deacon <will@...nel.org>, Robin Murphy <robin.murphy@....com>,
"Liu, Yi L" <yi.l.liu@...el.com>
Cc: baolu.lu@...ux.intel.com, "iommu@...ts.linux.dev"
<iommu@...ts.linux.dev>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: Re: [PATCH] iommu/vt-d: Remove cache tags before disabling ATS
On 2024/12/11 15:21, Tian, Kevin wrote:
>> From: Lu Baolu<baolu.lu@...ux.intel.com>
>> Sent: Friday, November 29, 2024 10:05 AM
>>
>> The current implementation removes cache tags after disabling ATS,
>> leading to potential memory leaks and kernel crashes. Specifically,
>> CACHE_TAG_DEVTLB type cache tags may still remain in the list even
>> after the domain is freed, causing a use-after-free condition.
>>
>> This issue really shows up when multiple VFs from different PFs
>> passed through to a single user-space process via vfio-pci. In such
>> cases, the kernel may crash with kernel messages like:
> Is "multiple VFs from different PFs" the key to trigger the problem?
This is the real test case that triggered this issue. It's definitely
not the only case that could trigger this issue.
>
> what about multiple VFs from the same PF or just assigning multiple
> devices to a single process/vm?
I think it's possible.
> My understanding from the below fix is that this issue will be triggered
> as long as the domain is still being actively used after one device with
> ATS is detached from it, i.e. sounds like a problem in multi-device
> assignment scenario.
Yes.
Thanks,
baolu
Powered by blists - more mailing lists