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:   Tue, 15 Aug 2023 11:53:26 -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 03:29:21PM -0300, Jason Gunthorpe wrote:

> Well the way it ought to work is that userspace can pass in 0 length
> and the kernel will return the correct length
> 
> So maybe this does need resending with this removed:
> 
> 	*length = min(*length, data_len);

That "length" is 0 (copying the value of cmd->data_len), so it
should be 0 even having this line?
 
> Also I see clear_user is called wrong, it doesn't return errno.

Oh, right.

> Please check and repost it ASAP I will update the branch. Probably
> needs some doc adjusting too.

I think your version should be good. I can update the series for
the doc part. Yi can confirm tonight and report in his time zone.
And it should be available for you to take tomorrow.

> 	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) {

Thanks
Nic

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ