Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp511466rdb; Fri, 17 Nov 2023 05:29:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IHnM+M/RVJGLGgOYiwYIhctJNa/Eut3O/C1WiRJvRrkFPwS+y0E5jKhOtOBBdUiOpt/dHIK X-Received: by 2002:a05:6a20:7487:b0:148:f952:552b with SMTP id p7-20020a056a20748700b00148f952552bmr21726014pzd.51.1700227744866; Fri, 17 Nov 2023 05:29:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700227744; cv=none; d=google.com; s=arc-20160816; b=lVVFlNeh75FXXJ7N2CubyZl5WmqVkCbVPd7iMEE8ozaE6iCn7TqKak6QkVg3eEGgP4 YxhccAuxjdTyqhnJOJhZtYF+EGMzr4Dif6gpWsDpKT/aqQ4Qga4vTtlN3SNEr4TYUX/c MC7VqsVeZg+Y1d+EXKde/xIKg/jq5oXLEtgYdldzCaBDfI8ZzxGo8/tX3aTvh5OiC1vC EGFBtm5m8QxpITE+i4jngh4opiNhXtnaI/nTHQnANwlFHcq5MMnWXGmZuDg1vcoezL+Y dAh5IGgix9xepzUbSkAnDGXIDf1Q1yuEfPGsiQJ7oB5nBT2JmxqeAXrmQxsYPiqK1sBU BpdA== 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; bh=m9SIh6UJCRZvsLT6SHHptbjVqGOS8n/FvnvaeADtKSQ=; fh=VsJE5L4dnSTbjXUYsW7VUw2YXrHJSwHoEU899uW3Me0=; b=aKobpe1Va9wgJgRoa3M7rQxjMiFGsRAjQE5kWyKvRwpgSgr7GXMX4eE+F8zwnYsCrW XpHuTy3o53KRvyjI2tPXO2sTwhH8Go4ROFw7QXRsbCWIxUTCuoW3684dLnz0WrRAKoIg 0/yFDZ+VVgbBxbfqhzFK60geLh26Y4aJ7UvCCQP/3qqs14SyOWILuxWbY/kDfBEii4jy HA30MIBh+eF8FI28WD+yjtd0DU0hxsSgINfn8fY4RLYn/+ItHLPR0o/y62F8I2KPt9bV 3fuLQgpNsDFWhIvLz0DNYq8DRy2yFaFIGQNq/CiBr5YEZMZkF+3o45lEYA6ipGGmmTFK gX7g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id y5-20020a633205000000b00584e65212d4si1800324pgy.609.2023.11.17.05.29.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 05:29:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 5FE0E8098626; Fri, 17 Nov 2023 05:29:02 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230513AbjKQN2x (ORCPT + 99 others); Fri, 17 Nov 2023 08:28:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbjKQN2w (ORCPT ); Fri, 17 Nov 2023 08:28:52 -0500 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFED5101 for ; Fri, 17 Nov 2023 05:28:49 -0800 (PST) Received: by verein.lst.de (Postfix, from userid 2407) id 39D486732D; Fri, 17 Nov 2023 14:28:46 +0100 (CET) Date: Fri, 17 Nov 2023 14:28:46 +0100 From: Christoph Hellwig To: Keith Busch Cc: Yuanyuan Zhong , Jens Axboe , hch@lst.de, sagi@grimberg.me, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, randyj@purestorage.com, hcoutinho@purestorage.com Subject: Re: [PATCH] nvme-core: remove head->effects to fix use-after-free Message-ID: <20231117132846.GB7867@lst.de> References: <20231115185439.2616073-1-yzhong@purestorage.com> <69218380-45f0-41cc-8a65-50878d44219e@kernel.dk> 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) X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Fri, 17 Nov 2023 05:29:02 -0800 (PST) On Wed, Nov 15, 2023 at 10:52:01PM -0500, Keith Busch wrote: > > Yes, in section 5.16.1.6, "Commands Supported and Effects": > > This log page is used to describe the commands that the controller > supports and the effects of those commands on the state of the NVM > subsystem. > > Oddly enough, Figure 202 says the scope of the log page is "Controller" > rather than "Subsystem". Sounds like ECN potential. You can memcmp the > effects log from each controller for a sanity check if you think some > subsystem controllers messed that up. If we really want to be 111% sure we could read the effects for all controllers and do a logical OR of them, but I think the reason for the per-controller scope is that for odd subsystems where different controllers don't actually access the same namespaces these flags could be different, i.e. one that only does KV, one that does ZNS, one that does NVM and one that is just an administrative controller.