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]
Date:   Wed, 29 Jun 2022 12:47:30 -0700
From:   Nicolin Chen <nicolinc@...dia.com>
To:     Yong Wu <yong.wu@...iatek.com>
CC:     "Tian, Kevin" <kevin.tian@...el.com>,
        Jason Gunthorpe <jgg@...dia.com>,
        Baolu Lu <baolu.lu@...ux.intel.com>,
        "linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>,
        "cohuck@...hat.com" <cohuck@...hat.com>,
        "jordan@...micpenguin.net" <jordan@...micpenguin.net>,
        "linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>,
        "thierry.reding@...il.com" <thierry.reding@...il.com>,
        "will@...nel.org" <will@...nel.org>,
        "alyssa@...enzweig.io" <alyssa@...enzweig.io>,
        "jean-philippe@...aro.org" <jean-philippe@...aro.org>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "zhang.lyra@...il.com" <zhang.lyra@...il.com>,
        "iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
        "jonathanh@...dia.com" <jonathanh@...dia.com>,
        "yangyingliang@...wei.com" <yangyingliang@...wei.com>,
        "orsonzhai@...il.com" <orsonzhai@...il.com>,
        "gerald.schaefer@...ux.ibm.com" <gerald.schaefer@...ux.ibm.com>,
        "linux-arm-msm@...r.kernel.org" <linux-arm-msm@...r.kernel.org>,
        "alex.williamson@...hat.com" <alex.williamson@...hat.com>,
        "christophe.jaillet@...adoo.fr" <christophe.jaillet@...adoo.fr>,
        "matthias.bgg@...il.com" <matthias.bgg@...il.com>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "virtualization@...ts.linux-foundation.org" 
        <virtualization@...ts.linux-foundation.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "dwmw2@...radead.org" <dwmw2@...radead.org>,
        "marcan@...can.st" <marcan@...can.st>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "baolin.wang7@...il.com" <baolin.wang7@...il.com>,
        "linux-mediatek@...ts.infradead.org" 
        <linux-mediatek@...ts.infradead.org>,
        "robin.murphy@....com" <robin.murphy@....com>
Subject: Re: [PATCH v3 1/5] iommu: Return -EMEDIUMTYPE for incompatible
 domain and device/group

On Fri, Jun 24, 2022 at 03:19:43PM -0300, Jason Gunthorpe wrote:
> On Fri, Jun 24, 2022 at 06:35:49PM +0800, Yong Wu wrote:
> 
> > > > It's not used in VFIO context. "return 0" just satisfy the iommu
> > > > framework to go ahead. and yes, here we only allow the shared
> > > > "mapping-domain" (All the devices share a domain created
> > > > internally).
> 
> What part of the iommu framework is trying to attach a domain and
> wants to see success when the domain was not actually attached ?
> 
> > > What prevent this driver from being used in VFIO context?
> > 
> > Nothing prevent this. Just I didn't test.
> 
> This is why it is wrong to return success here.

Hi Yong, would you or someone you know be able to confirm whether
this "return 0" is still a must or not?

Considering that it's an old 32-bit platform for MTK, if it would
take time to do so, I'd like to drop the change in MTK driver and
note in commit log for you or other MTK folks to change in future.

Thanks
Nic

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ