lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250411234419.GC252886@nvidia.com>
Date: Fri, 11 Apr 2025 20:44:19 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Nicolin Chen <nicolinc@...dia.com>
Cc: Robin Murphy <robin.murphy@....com>, will@...nel.org, joro@...tes.org,
	jsnitsel@...hat.com, praan@...gle.com,
	linux-arm-kernel@...ts.infradead.org, iommu@...ts.linux.dev,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iommu/arm-smmu-v3: Allow stream table to have nodes with
 the same ID

On Fri, Apr 11, 2025 at 04:33:44PM -0700, Nicolin Chen wrote:

> > The bridge *does* claim its own RID, and per the aliasing rules the
> > devices behind it claim both their own RID and the alias to function
> > 00.0 on the bridge's secondary bus, like so in action:
> 
> Yea, I just found out that the bridge does have a different SID.
> It was actually the VGA controller itself having two fwspec->ids
> populated by the IORT code. Then, the SMMU driver allocated two
> separate streams with the same set of device pointer and SID:
>   pci 0008:06:00.0: arm_smmu_insert_master: fwspec index=0, sid=0x10600
>   pci 0008:06:00.0: Adding to iommu group 21
>   pci 0008:07:00.0: arm_smmu_insert_master: fwspec index=0, sid=0x10700
>   pci 0008:07:00.0: arm_smmu_insert_master: fwspec index=1, sid=0x10700
>   pci 0008:07:00.0: Adding to iommu group 21
> 
> Perhaps the duplicated fwspec->id should be avoided in the IORT
> code at the first place v.s. bypassing the fwspec->ids[1]?

It is a much easier fix if all you have to do is ignore hits in the RB
tree that match to the same master, just don't fail on duplicates and
don't add the duplicate rb node at all?

Seem strange though. Where did the duplicate come from?

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ