From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51680C433F5 for ; Tue, 5 Apr 2022 06:00:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229454AbiDEGCc (ORCPT ); Tue, 5 Apr 2022 02:02:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230027AbiDEGCb (ORCPT ); Tue, 5 Apr 2022 02:02:31 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE3D969CC1 for ; Mon, 4 Apr 2022 23:00:31 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id B9FB668BFE; Tue, 5 Apr 2022 08:00:24 +0200 (CEST) Date: Tue, 5 Apr 2022 08:00:23 +0200 From: Christoph Hellwig To: Kanchan Joshi Cc: Christoph Hellwig , Kanchan Joshi , Jens Axboe , io-uring@vger.kernel.org, linux-nvme@lists.infradead.org, Pavel Begunkov , Ming Lei , Luis Chamberlain , Pankaj Raghav , Javier =?iso-8859-1?Q?Gonz=E1lez?= , Anuj Gupta Subject: Re: [RFC 3/5] io_uring: add infra and support for IORING_OP_URING_CMD Message-ID: <20220405060023.GD23698@lst.de> References: <20220401110310.611869-1-joshi.k@samsung.com> <20220401110310.611869-4-joshi.k@samsung.com> <20220404071656.GC444@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On Mon, Apr 04, 2022 at 08:44:20PM +0530, Kanchan Joshi wrote: > Another stuff that got left out from the previous series :-( > Using this field for a bit of sanity checking at the moment. Like this in nvme: > > + if (ioucmd->cmd_len != sizeof(struct nvme_passthru_cmd64)) > + return -EINVAL; > + cptr = (struct nvme_passthru_cmd64 *)ioucmd->cmd; Do we actually need that sanity checking? Each command should have a known length bound by the SQE size, right?