Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp840212pxb; Thu, 17 Feb 2022 16:16:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJx8NrdYsIXc5dTYiT3Ois6n7midNVfTH7TL5Lt+98De0HPEf8gXahjdijllyOZnvyyOWafp X-Received: by 2002:a17:902:e748:b0:14d:7e1d:5d83 with SMTP id p8-20020a170902e74800b0014d7e1d5d83mr4936755plf.103.1645143415053; Thu, 17 Feb 2022 16:16:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645143415; cv=none; d=google.com; s=arc-20160816; b=xKgbA1ddP383ovBMuIjoXeuUfDyD0MXCZV8KpyCSlz7ZZJ9RQeMgBMoW0JGRU+ECji NXg0y/VPu1czulVGCqeia85G5EDrE93+IauG04qBLpUg4LJ9udkoncns7Yb3R1dHM+ZO LDj6QeWNX4ohBKnbtUUTM3ycTnDuIXl1vVS7Oss7fs+C/rTQU3G7fXzQe4Zjh5HIP17N /CUxjYfGcVoBUX+PA2Xyxc6wKPujjDcp3U7sEtMHLPr2MdEpHs4pc+9lPEM5rQNgaMhp bH/XaONVOf/mjvcTxH72DDTbrW2hbhzFuw+LBC8DK5JsSYmLWdKqzsvDFiBVScRygRjc EXKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=7jOlXXvREj1qFTGbee5gMMKerPgSN6zPPjG7jxn+T8c=; b=W8hmxVl6lyt93PkkW1ta611iC0+47QPUKN2LDvGSHmYPns5b5kU9TDmYDaP0kwO8nG hAEeDJJGUGNhSLGa7y+Kr52M3zUcyl8/mdvednmKnlCogrNQ8XE+PZlsli8kR22crlVt Us2cZKeoz8Pxy23+p7UvKjDvT+rjl3pWjvjWgtayLnrpwQ0F5p0hjjQrqOY0c3/nDhMw 8WOwO+8Ef8SA7XnG4J8nHdQcBDx5dnsLUV7ooup04+44j9yhlnSe/k/zy+Crr5RBmhLX tZtYFu9OS773NInrNDP9XkwC1UTnMZPzoAFHdQs/fPaCchhVIPfGgyiAum8onWCgrxca 6KUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ayQFuDuC; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id b10si20557168plh.152.2022.02.17.16.16.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Feb 2022 16:16:55 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ayQFuDuC; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BBD4F3CFC5; Thu, 17 Feb 2022 15:41:15 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239077AbiBQKPe (ORCPT + 99 others); Thu, 17 Feb 2022 05:15:34 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:36336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232768AbiBQKPb (ORCPT ); Thu, 17 Feb 2022 05:15:31 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDC2A2AAB3D; Thu, 17 Feb 2022 02:15:16 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 45F00B820B3; Thu, 17 Feb 2022 10:15:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 40701C340E8; Thu, 17 Feb 2022 10:15:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1645092913; bh=99+3Rkag+n6hqU+y7F8k/uyn3+KPpbhOvvdGy8sTHls=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ayQFuDuCYHMAajv5eGocJAnJGnfoNg+H70bxHXWdGurvTieQ3EP2i/4maqtCWNqIG e06jEgEmbHOLvkbqt0p3kc3JJfhliCN7fbKzxyxnOioJjGnm84JTURvuihnN4Z9XJ5 aQ9ITbxRR3HI9kB0fCkULlErOofvD+er7rtqAKrE= Date: Thu, 17 Feb 2022 11:15:11 +0100 From: Greg KH To: Guixin Liu Cc: bostroesser@gmail.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-kernel@vger.kernel.org, xiaoguang.wang@linux.alibaba.com, xlpang@linux.alibaba.com Subject: Re: [PATCH 2/2] scsi:target:tcmu: reduce once copy by using uio ioctl Message-ID: References: <1645064962-94123-1-git-send-email-kanie@linux.alibaba.com> <1645064962-94123-2-git-send-email-kanie@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1645064962-94123-2-git-send-email-kanie@linux.alibaba.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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, greg k-h