Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2115041rdb; Mon, 20 Nov 2023 02:19:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IFC+SrVBqRQHxMGaysjv6mtszxFEE9fB29of7pQXXpWEjtTmUQEuCK4p+FFleAEFaMAm/3W X-Received: by 2002:a05:6870:224e:b0:1e9:e923:9520 with SMTP id j14-20020a056870224e00b001e9e9239520mr8217107oaf.11.1700475552489; Mon, 20 Nov 2023 02:19:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700475552; cv=none; d=google.com; s=arc-20160816; b=AzcRH3PcJ7u4mDszj4JeJxPOlI0Lx4fnHu/5iWLAZ5S80o5WNr3LZSGfja8W7y1b4b L/NpJ0LBNTCGN880u9wpDjqBriowhKCPBu39ffU6NUVQWE7C5EO7lUKZpuCQSl1jCP+9 /PQEVh9EzgwK87t9fHIpM4SYBpUmg0++pcXT/mVi18aPzrNi//7q1BayHiQt5E4EJ51V BHMVW31T7nH+pNa1eDSgQnNtWQ/mTAcmNghZk7GUPoR33/zFVknVqrgNT8i+lFg8sS6J w9f4Q7i3obHKl7I7Z0D0VMsqIFFYuKanKySGD3io/FCLFEmx7+pSq6Up2V0MYgPijj+o Yvpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id; bh=/mpjNaJompao/Eu3273sR8jB7ryD7Xh0dcC+At10JAc=; fh=YF1HUd+TJjvY/7mwuWFq3ry1oc22WN//OxGnoWKVCjQ=; b=dylTUrrr4QByu8nT238Yh7Vkt1S0AtVwjbfhJ6KLazDpglatEnqPDoK1jJB9ZANPvF oJZZw4wOZSq0YjU0Dbg8rzANGisK+ldNCA2Kuww8U+CaGPsh8qcs7DJBNBgp7/7mn8iK YGITFBVO1T2wzeCRXwG7C1IpMGbKjA+E7u0M0QeStmgxWxTvxNbK4VAB8o7Z5CqE9sl1 B0YKb8X3XVLXi8RkRnqnuRY3GlQkJuYr1zmAYQFC8S+uartWXJSc3ZhnsAKLtmx/VWWi KFpPJ20tMp2Tr82sct2PU9zMsuyh46kSQbq0Qeq3mCf6eFOS6gtap/8u4mItUdr8OYSH jKfA== 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:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id f14-20020a056a00228e00b006cb70cd9e3fsi3700394pfe.233.2023.11.20.02.19.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 02:19:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id F3F0D8047549; Mon, 20 Nov 2023 02:19:09 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232986AbjKTKTD (ORCPT + 99 others); Mon, 20 Nov 2023 05:19:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232562AbjKTKTC (ORCPT ); Mon, 20 Nov 2023 05:19:02 -0500 Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F20BEA4 for ; Mon, 20 Nov 2023 02:18:57 -0800 (PST) Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-54887484d0bso451609a12.1 for ; Mon, 20 Nov 2023 02:18:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700475536; x=1701080336; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/mpjNaJompao/Eu3273sR8jB7ryD7Xh0dcC+At10JAc=; b=LVvUI4FV/YysIRaCIfcv6myfOrSvWvyJnkPluEL0OxJluWiQaglDBQ5RJjj6YBZ8Fn rDh21DUz7cNrSX4s7YWEDUOCLPC9fr2sn6zS9gi6SJFEAn0PVszPMJKBMdaN/LJR6pZp Gibx6QPMHMxmyX9RXXWCCrGz80I5Y3XIbW3PcerXgAok84Q9AaK4OrVMMy/BLTjE7ksu ajvK81CbVqw0BY39NcAYmmBnvxn2QDDc94ulKcgXmCKkXjPXqY3GkbdbyKgP6GxOLfED sbn2Gd+ijHciB3aGooGpkmrqUZUmfwgVD3gSVaRADaFZxeVx3dK8KV/dQ38SFehz79Wf FlOA== X-Gm-Message-State: AOJu0YzHazGwToMh5saovKvMwQj9tbFN+PLwo4dt5GLRuRcenoMiDvGd ssf+PIQCyvuKrbue3g+vWzE= X-Received: by 2002:a17:906:10cf:b0:9cb:b737:e469 with SMTP id v15-20020a17090610cf00b009cbb737e469mr4829185ejv.4.1700475536100; Mon, 20 Nov 2023 02:18:56 -0800 (PST) Received: from [192.168.64.177] (bzq-219-42-90.isdn.bezeqint.net. [62.219.42.90]) by smtp.gmail.com with ESMTPSA id n8-20020a1709062bc800b009dd8473559dsm3718134ejg.110.2023.11.20.02.18.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Nov 2023 02:18:55 -0800 (PST) Message-ID: <2fc7ca93-3ad7-4127-b779-76c32f8d9124@grimberg.me> Date: Mon, 20 Nov 2023 12:18:51 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] nvme-core: remove head->effects to fix use-after-free To: Christoph Hellwig , Keith Busch Cc: Yuanyuan Zhong , Jens Axboe , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, randyj@purestorage.com, hcoutinho@purestorage.com References: <20231115185439.2616073-1-yzhong@purestorage.com> <69218380-45f0-41cc-8a65-50878d44219e@kernel.dk> <20231117132846.GB7867@lst.de> <20231120082346.GA11622@lst.de> Content-Language: en-US From: Sagi Grimberg In-Reply-To: <20231120082346.GA11622@lst.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 agentk.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 (agentk.vger.email [0.0.0.0]); Mon, 20 Nov 2023 02:19:10 -0800 (PST) On 11/20/23 10:23, Christoph Hellwig wrote: > On Fri, Nov 17, 2023 at 09:38:19AM -0700, Keith Busch wrote: >> The effects log is per-CSI so different command sets won't create >> conflicts. > > True. But that wasn't the point anyway. It is that different > controllers might expose very different namespaes with different > capabilities. Maybe a controller with HDD namespaces vs flash might > be a better example. > >> Namespaces that are not shared don't really matter here because this >> problem is unique to mulitpath. > > Indeed. > >> It doesn't make sense for effects logs to be different per-controller >> for the same shared namespace. The spec doesn't seem to explicitly >> prevent that, but hints that all hosts should be seeing the same thing >> no matter which controller they're connected to: > > Also agreed as already indicated in the past mail. Having every ns get its own effects log cache is another 4k per nshead. Even if we restrict it only to iocs its 1k per nshead. Would it make sense to have nvme_free_cels fence passthru commands with an rcu instead?