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: <1a8f724b-e136-51fd-c523-e4c5f2410338@linux.alibaba.com>
Date:   Thu, 17 Feb 2022 20:30:32 +0800
From:   Xiaoguang Wang <xiaoguang.wang@...ux.alibaba.com>
To:     Greg KH <gregkh@...uxfoundation.org>,
        Guixin Liu <kanie@...ux.alibaba.com>
Cc:     bostroesser@...il.com, martin.petersen@...cle.com,
        linux-scsi@...r.kernel.org, target-devel@...r.kernel.org,
        linux-kernel@...r.kernel.org, xlpang@...ux.alibaba.com
Subject: Re: [PATCH 1/2] uio: add ioctl to uio


hi,

> On Thu, Feb 17, 2022 at 10:29:21AM +0800, Guixin Liu wrote:
>> In TCMU, if backstore holds its own userspace buffer, for read cmd, the
>> data needs to be copied from userspace buffer to tcmu data area first,
>> and then needs to be copied from tcmu data area to scsi sgl pages again.
>>
>> To solve this problem, add ioctl to uio to let userspace backstore can
>> copy data between scsi sgl pages and its own buffer directly.
>>
>> Reviewed-by: Xiaoguang Wang <xiaoguang.wang@...ux.alibaba.com>
>> Signed-off-by: Guixin Liu <kanie@...ux.alibaba.com>
>> ---
>>   drivers/uio/uio.c          | 22 ++++++++++++++++++++++
>>   include/linux/uio_driver.h |  1 +
> No, sorry, thie uio driver will not be adding ioctls to them.  If you
> need an ioctl, then you should not be using the UIO api but rather use a
> custom character driver instead.
I found that early in 2015, there was developer trying to add ioctl 
interface
to uio framework: 
https://lore.kernel.org/lkml/20151005080149.GB1747@kroah.com/

Some of my customers use tcm_loop & tcmu to simulate block devices, it's 
tcmu
driver that uses uio framework. There maybe more extra work if we tries 
to replace
uio with a new character driver.

Currently tcmu has performance bottleneck, Guixin's patch uses ioctl 
interface
to bypass tcmu data area. I also have implemented a tcmu zero-copy 
feature that
allows tcmu driver map io request sgl's pages to user space, which uses 
ioctl
to do this mapping work, similar to network 
getsockopt(TCP_ZEROCOPY_RECEIVE).

I also understand your concerns about ioctl interface. Except that replacing
uio with a new character driver in tcmu, are there any less complicated 
methods
to complete our needs? Thanks.

Regards,
Xiaoguang Wang
>
> thanks,
>
> greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ