mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xiaoguang Wang <xiaoguang.wang@linux.alibaba.com>
To: Greg KH <gregkh@linuxfoundation.org>,
	Guixin Liu <kanie@linux.alibaba.com>
Cc: bostroesser@gmail.com, martin.petersen@oracle.com,
	linux-scsi@vger.kernel.org, target-devel@vger.kernel.org,
	linux-kernel@vger.kernel.org, xlpang@linux.alibaba.com
Subject: Re: [PATCH 2/2] scsi:target:tcmu: reduce once copy by using uio ioctl
Date: Thu, 17 Feb 2022 19:13:07 +0800	[thread overview]
Message-ID: <bc301d7d-49a7-8523-0bd4-f7f2a2fbfa81@linux.alibaba.com> (raw)
In-Reply-To: <Yg4gL1tL7yJELNL2@kroah.com>

hi,

> On Thu, Feb 17, 2022 at 10:29:22AM +0800, Guixin Liu wrote:
>> --- a/include/uapi/linux/target_core_user.h
>> +++ b/include/uapi/linux/target_core_user.h
>> @@ -185,4 +185,13 @@ enum tcmu_genl_attr {
>>   };
>>   #define TCMU_ATTR_MAX (__TCMU_ATTR_MAX - 1)
>>   
>> +struct tcmu_data_xfer {
>> +	unsigned short cmd_id;
>> +	unsigned long iov_cnt;
>> +	struct iovec __user *iovec;
>> +};
> That is no way to define a structure that crosses the user/kernel
> boundry, it just will not work at all, even if we wanted it to :(
Sorry, I don't quite understand your comments well, can you explain more 
why this structure
does not work, except that "unsigned short" or "unsigned long" here 
isn't correct, should use
u16 or u32.
Syscalls, such as readv/preadv also pass a struct iovec from user to 
kernel, thanks.


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


  reply	other threads:[~2022-02-17 11:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-17  2:29 [PATCH 1/2] uio: add ioctl to uio Guixin Liu
2022-02-17  2:29 ` [PATCH 2/2] scsi:target:tcmu: reduce once copy by using uio ioctl Guixin Liu
2022-02-17  6:45   ` kernel test robot
2022-02-17  8:07   ` kernel test robot
2022-02-17 10:15   ` Greg KH
2022-02-17 11:13     ` Xiaoguang Wang [this message]
2022-02-17 12:28       ` Greg KH
2022-02-17 11:10   ` [RFC PATCH] scsi:target:tcmu: tcmu_ioctl_copy_between_sgl_and_iovec() can be static kernel test robot
2022-02-17 11:12   ` [PATCH 2/2] scsi:target:tcmu: reduce once copy by using uio ioctl kernel test robot
2022-02-21 17:09   ` Bodo Stroesser
2022-02-28  8:52     ` Xiaoguang Wang
2022-02-28 10:47       ` Greg KH
2022-02-17  6:13 ` [PATCH 1/2] uio: add ioctl to uio Greg KH
     [not found]   ` <362edb61-b8ad-495e-2346-8020355c0938@linux.alibaba.com>
2022-02-17 12:30     ` Greg KH
2022-02-17 12:30   ` Xiaoguang Wang
2022-02-17  6:55 ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bc301d7d-49a7-8523-0bd4-f7f2a2fbfa81@linux.alibaba.com \
    --to=xiaoguang.wang@linux.alibaba.com \
    --cc=bostroesser@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kanie@linux.alibaba.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=target-devel@vger.kernel.org \
    --cc=xlpang@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®