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] [day] [month] [year] [list]
Message-ID: <87czmhmqzu.wl-maz@kernel.org>
Date:   Tue, 30 Nov 2021 18:35:01 +0000
From:   Marc Zyngier <maz@...nel.org>
To:     Bjorn Helgaas <helgaas@...nel.org>
Cc:     Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
        lorenzo.pieralisi@....com, bhelgaas@...gle.com,
        svarbanov@...sol.com, bjorn.andersson@...aro.org, robh@...nel.org,
        linux-pci@...r.kernel.org, linux-arm-msm@...r.kernel.org,
        linux-kernel@...r.kernel.org, kernel test robot <lkp@...el.com>,
        Alyssa Rosenzweig <alyssa@...enzweig.io>,
        Sven Peter <sven@...npeter.dev>
Subject: Re: [PATCH] PCI: qcom: Fix warning generated due to the incorrect data type

On Tue, 30 Nov 2021 16:03:38 +0000,
Bjorn Helgaas <helgaas@...nel.org> wrote:
> 
> [+cc Marc, Alyssa, Sven for RID-to-SID mapping insight.  The patch at
> https://lore.kernel.org/all/20211130062137.GD205712@thinkpad/ merely
> fixes a warning.  My meta-question is about the qcom BDF-to-SID
> mapping.]
> 
> On Tue, Nov 30, 2021 at 11:51:37AM +0530, Manivannan Sadhasivam wrote:
> > On Mon, Nov 29, 2021 at 09:36:14PM -0600, Bjorn Helgaas wrote:
> > > ...
> > > I'm also curious why pcie-qcom.c is the only driver that does this.
> > > "iommu-map" is not specific to qcom, but no other drivers do similar
> > > things with it.
> > 
> > Yes, on the recent qcom platforms starting from sm8250 we need to program
> > the BDF to SID mapping in the controller and that's the reason we are
> > extracting the "iommu-map" property in DT.
> 
> This sounds like something that may not really be specific to sm8250.
> 
> It looks vaguely similar to apple_pcie_add_device().  Compare the qcom
> code at [1] with the Apple code at [2].

It looks indeed similar in spirit, though the implementation seems
different. The qcom code seems to brute-force the mappings upfront,
while the apple driver relies on bus notifiers to map things on
demand.

The annoying thing with these blocks is that they are neither part of
the IOMMU nor the PCIe block. It is just a piece of glue logic in
the middle...

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ