Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1383867pxb; Fri, 26 Feb 2021 09:21:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJy6urqZi27Xfi1Zw2OPcDiSDpGorsuxFmivkLVcPCYpYNf19e+1zblDC0fRioGoDBIy/ts3 X-Received: by 2002:a17:906:3acc:: with SMTP id z12mr4639041ejd.494.1614360067099; Fri, 26 Feb 2021 09:21:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614360067; cv=none; d=google.com; s=arc-20160816; b=LKr2vfDo9zAWTmQ9PuE/4Q0X98elfGriy8nDo84QIFT8Hhfz+dl/R9laEjnQZoBi8O zfCqSyb0oRzPkmge3TQSATk5gLnrg0IaV3rb0XZgmo3sd83n1kdvnqNmHaDDFKF4aPIh GJQEJPMD7LRF+Nw9qnZzq++pg6IC0+zbvsGt4vS1iVYZj9eh2BoSm7r8ktd/0LdakMKq ER3L20U/c+vhMKhyhPQ9TVipVeB8XVw9ttwkp3Lw5jXetDKyW1YkYK56kCuWwGDbNCiT 0Obt8Fr/Lfiy4Qhx9/4suxHj+nI18P+zE8zYtsOWEVuBWtm68YgsoMwBQruqzkPykyTa DkpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=MPMx9sNB3ktq18XebcSD7Ue4HOmL35oQ6IQjX+oWjK8=; b=HHBW0ndxGMXrEod/fQNff8wBgBObTKXXURG+HQYeZJ+ZRwchkVaq18up+l09xMgI55 Jb954BF3HmkuMKoEAF0psPmivUI8PIp9OILOMFb0giBZ6ernbyO9+Sah5zwMeMPrVWMm lVjHSJhFh+VAZIJ1kfXgQz5dqlRwmL8AqOU3Xfp16M/cewXhaYB28pyVWro2S2Pt0L+3 rCs3jbPqrlJdxIWEvsD1SEEVpmqFYGcM7BydrKnyoCk8sthQE3eQRFqghaLtb5LGzqJ1 rKDiS92bfL7KSrcnPDFSCbwvcOYlNQyotG0q61gOMuOuKex+n4AaWmqmh+W6tHxKECrJ MWhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pYoJwosy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u23si6397526ejz.201.2021.02.26.09.20.42; Fri, 26 Feb 2021 09:21:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pYoJwosy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229795AbhBZRTu (ORCPT + 99 others); Fri, 26 Feb 2021 12:19:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:35758 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229545AbhBZRTt (ORCPT ); Fri, 26 Feb 2021 12:19:49 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1AF0564F0E; Fri, 26 Feb 2021 17:19:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614359947; bh=Bd65XOTrei5fxTOedo0AjEPLzm2AKptX7w7syoIfjEM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pYoJwosyELFYEIXxbJxq635ucCVg8L5ywVQfRZgrvXD9USOPC4lIPoxyKBWODEavg NC/BDaTzdzxp50/0ApeNMHmUwxCn+9LiVdH0ZKXiKSmgcAkQiQRChpjRGz5Wan3RSs HBm3VjFhjRWnMxKI8S/qg8kLTu73Xu4j7ItUb0kMHHXSrsJD2Us9wT0x2CvuYtJO4/ SQOjOKacJSaL7DeE0LYVOml5Po7RN5Yje9B0sX8lBaxp3xOoAgE+XolwX6Rg25iPRK 7NGQU1HqAftCl9CgzWt43+g8M6x84ISJP9+wOz20/I8oqqKvQl0sS6/plHSKcSA8OS ojq8uq2FYoVOA== Date: Sat, 27 Feb 2021 02:19:01 +0900 From: Keith Busch To: Hannes Reinecke Cc: Daniel Wagner , Sagi Grimberg , Jens Axboe , Christoph Hellwig , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] nvme-tcp: Check if request has started before processing it Message-ID: <20210226171901.GA3949@redsun51.ssa.fujisawa.hgst.com> References: <20210212210929.GA3851@redsun51.ssa.fujisawa.hgst.com> <73e4914e-f867-c899-954d-4b61ae2b4c33@suse.de> <20210215104020.yyithlo2hkxqvguj@beryllium.lan> <20210226123534.4oovbzk4wrnfjp64@beryllium.lan> <9e209b12-3771-cdca-2c9d-50451061bd2a@suse.de> <20210226161355.GG31593@redsun51.ssa.fujisawa.hgst.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 26, 2021 at 05:42:46PM +0100, Hannes Reinecke wrote: > On 2/26/21 5:13 PM, Keith Busch wrote: > > > > That's just addressing a symptom. You can't fully verify the request is > > valid this way because the host could have started the same command ID > > the very moment before the code checks it, incorrectly completing an > > in-flight command and getting data corruption. > > > Oh, I am fully aware. > > Bad frames are just that, bad frames. > We can only fully validate that when digests are enabled, but I gather that > controllers sending out bad frames wouldn't want to enable digests, either. > So relying on that is possibly not an option. > > So really what I'm trying to avoid is the host crashing on a bad frame. > That kind of thing always resonates bad with customers. > And tripping over an uninitialized command is just too stupid IMO. Crashing is bad, silent data corruption is worse. Is there truly no defense against that? If not, why should anyone rely on this?