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: <ZNwYxJg0u7jAZRff@Asurada-Nvidia>
Date:   Tue, 15 Aug 2023 18:07:07 -0700
From:   Nicolin Chen <nicolinc@...dia.com>
To:     Jason Gunthorpe <jgg@...dia.com>
CC:     Yi Liu <yi.l.liu@...el.com>, <joro@...tes.org>,
        <alex.williamson@...hat.com>, <kevin.tian@...el.com>,
        <robin.murphy@....com>, <baolu.lu@...ux.intel.com>,
        <cohuck@...hat.com>, <eric.auger@...hat.com>,
        <kvm@...r.kernel.org>, <mjrosato@...ux.ibm.com>,
        <chao.p.peng@...ux.intel.com>, <yi.y.sun@...ux.intel.com>,
        <peterx@...hat.com>, <jasowang@...hat.com>,
        <shameerali.kolothum.thodi@...wei.com>, <lulu@...hat.com>,
        <suravee.suthikulpanit@....com>, <iommu@...ts.linux.dev>,
        <linux-kernel@...r.kernel.org>, <linux-kselftest@...r.kernel.org>,
        <zhenzhong.duan@...el.com>
Subject: Re: [PATCH v7 3/4] iommufd: Add IOMMU_GET_HW_INFO

On Tue, Aug 15, 2023 at 11:58:04AM -0700, Nicolin Chen wrote:
> On Tue, Aug 15, 2023 at 03:56:37PM -0300, Jason Gunthorpe wrote:
> > On Tue, Aug 15, 2023 at 11:53:26AM -0700, Nicolin Chen wrote:
> > > > 	ops = dev_iommu_ops(idev->dev);
> > > > 	if (!ops->hw_info) {
> > > > 		data = ops->hw_info(idev->dev, &data_len, &cmd->out_data_type);
> > > 
> > > It should be:
> > >  	if (ops->hw_info) {
> > 
> > Hmm, the test suite probably needs some more stuff then too since it
> > passed like that :)
> 
> Ack. I will see what I can do.

It actually reports errors when hw_info is defined (and it would
get an IOMMU_HW_INFO_TYPE_NONE.

#ok 62 iommufd_ioas.two_mock_domain.ioas_area_auto_destroy
# #  RUN           iommufd_ioas.two_mock_domain.get_hw_info ...
# iommufd: iommufd_utils.h:368: _test_cmd_get_hw_info: Assertion `cmd.out_data_type == IOMMU_HW_INFO_TYPE_SELFTEST' failed.
# # get_hw_info: Test terminated by assertion

By removing mock_domain_hw_info() to test the other path, simply
there would be a kernel crash.

So, I think that we are fine.

Thanks
Nicolin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ