Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp2667921rwe; Sun, 16 Apr 2023 02:53:49 -0700 (PDT) X-Google-Smtp-Source: AKy350YedvofHiHu0g2ZtEnjdzFAbj4f5HQomty8Sybu5h57QadR+4BuSU6iado2z84kzv0h4LAI X-Received: by 2002:a05:6a00:2e82:b0:63b:e4:554 with SMTP id fd2-20020a056a002e8200b0063b00e40554mr18644789pfb.4.1681638828860; Sun, 16 Apr 2023 02:53:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681638828; cv=none; d=google.com; s=arc-20160816; b=HhMZJdC1iGdK4Lv8P27Dy6AG4xk9Z7AIEeshs24LjE9d4NGwQBz1EgI9AI/X+bfB3d OI9SvSzIIpgFjYfzkdhugDhOaOT/kgd36PFIQMjgJOiRfF9CyDdZIBadNH+7jYat+1ZF jTumULYWdsm2RJh/hpbhYqSw/sa89+PsHytXnk7TDap6ufqE/2DylaF/R3w2OteHH5DP oGTI55AaH7nEtbnK099RFexgxgP+65qsRyJwOzoTP5gKuQELBlQrKh+8rcQ+J+igNH4n FnO8gKVuPi/NFh/eZmdL/EJzd3Lz1l14TJWO6xXQJbMUONE269N4wb5yRHI4jJnKffl4 n0zA== 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=3rm3Tx4scnUmIq1Y7/GKTAQGQLeBUUnvNMLalbZs9d4=; b=XbCmqW6+z3vM1zUFQCj8Up7yGtvi2txUW6ZrFv/otPnBmZv/nHEccZ9+DbtUR0ERUd ol5JmK9RkhRpb736YJghoXR3Dj1BILKOtsCR8IMPanLbletI8Nt5Vw2fhzpE98I9BrpZ EJCb5BaOm/2JBG992n1W0Jm2/8gPaM/8rIiSuGM1zxk1k8HK1d1qBZjHcep36jnpu8e9 12pyevPmXwml1NbNrELxHieuSTmr0JLnnJyl11Zfcz5zrnp5Z/9bSJ6CSbUpDBaBMw9i ACxONWR2qZZ1uBWC2Sbmivo/lTTEuLyhTfkFMP5bvjRznGOPqvvu8Sgp97DN8vajRjlh 75FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IapjlLR4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l69-20020a638848000000b0051b1415e936si9077017pgd.633.2023.04.16.02.53.35; Sun, 16 Apr 2023 02:53:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IapjlLR4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230356AbjDPJw0 (ORCPT + 99 others); Sun, 16 Apr 2023 05:52:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230036AbjDPJwY (ORCPT ); Sun, 16 Apr 2023 05:52:24 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 151921BDC for ; Sun, 16 Apr 2023 02:51:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681638696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=3rm3Tx4scnUmIq1Y7/GKTAQGQLeBUUnvNMLalbZs9d4=; b=IapjlLR4ztDMDpW+rx6/AS5XEE9FtpM+74iVkFZbyimyneGzYA/SPpEzLbmFSU/eWsaEFb FnG+JXq/y/cXMWe9N92eHfzZRjV/eD6EcWhbVqEFZ9Z+8KHQWee0XQ3s0lhOvkeMluKYJx jGu5/91WFeguANMV3k5aUG1a2uQe8/8= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-492-pFmwaZ38MRmb-VHaBeYHqg-1; Sun, 16 Apr 2023 05:51:33 -0400 X-MC-Unique: pFmwaZ38MRmb-VHaBeYHqg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BA6AB185A78F; Sun, 16 Apr 2023 09:51:32 +0000 (UTC) Received: from ovpn-8-16.pek2.redhat.com (ovpn-8-16.pek2.redhat.com [10.72.8.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2053614152F6; Sun, 16 Apr 2023 09:51:20 +0000 (UTC) Date: Sun, 16 Apr 2023 17:51:14 +0800 From: Ming Lei To: Pavel Begunkov Cc: Breno Leitao , axboe@kernel.dk, davem@davemloft.net, dccp@vger.kernel.org, dsahern@kernel.org, edumazet@google.com, io-uring@vger.kernel.org, kuba@kernel.org, leit@fb.com, linux-kernel@vger.kernel.org, marcelo.leitner@gmail.com, matthieu.baerts@tessares.net, mptcp@lists.linux.dev, netdev@vger.kernel.org, pabeni@redhat.com, willemdebruijn.kernel@gmail.com, ming.lei@redhat.com Subject: Re: [PATCH RFC] io_uring: Pass whole sqe to commands Message-ID: References: <20230406144330.1932798-1-leitao@debian.org> <20230406165705.3161734-1-leitao@debian.org> <44420e92-f629-f56e-f930-475be6f6a83a@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Fri, Apr 14, 2023 at 03:56:47PM +0100, Pavel Begunkov wrote: > On 4/14/23 14:59, Ming Lei wrote: > [...] > > > > Will this kind of inconsistency cause trouble for driver? Cause READ > > > > TWICE becomes possible with this patch. > > > > > > Right it might happen, and I was keeping that in mind, but it's not > > > specific to this patch. It won't reload core io_uring bits, and all > > > > It depends if driver reloads core bits or not, anyway the patch exports > > all fields and opens the window. > > If a driver tries to reload core bits and even worse modify io_uring > request without proper helpers, it should be rooted out and thrown > into a bin. In any case cmds are expected to exercise cautiousness > while working with SQEs as they may change. I'd even argue that > hiding it as void *cmd makes it much less obvious. Fair enough, if it is well documented, then people will know these problems and any change in this area can get careful review. Thanks, Ming