Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3594672ybt; Tue, 30 Jun 2020 06:53:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgZKYNA5iZ0giRdj/7wSBArmHbyWACe4saKw6O4LmDssYlwtj6m6lEb3XsZiARDdWt2JDc X-Received: by 2002:aa7:c714:: with SMTP id i20mr23498963edq.215.1593525215843; Tue, 30 Jun 2020 06:53:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593525215; cv=none; d=google.com; s=arc-20160816; b=Q8Xu0f1TrB8ltKMuGktfqjKHRJPf39K1RgpBk/gKzsJ6x/AoGo68lq99DxQw/pcMu2 3Ywb5dCH9LfxjDEZDjqjsvm1gTV7mv6fVbLUolaSdOrEYChbhBIU+dET44enwxbQy5CF Ej2NAVLKWqrbbC5JZW14WIT2TezVpre+7uxBonynglu/ZWdEaiwWbh0fKgbrVZiJ623o MTP9WEePYLxxre7XStMpYsn2//6nMZjVNdDwYtHplliPb6hV4iVbQXUjNSu82MI8l+7P Cn7I31Y9YFHWVg7rzDcRqzu6hfrSHYEX2qtINXOvu3flg9smVsfvIxgC+Oq7l8eGBYGR iW1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=ewHaRUgTO7M1AjbL7qI24FjsXIfnvSi+yxUDrCHnuB4=; b=vspCAYXxoeX+hdlPDnWO5xNUkS01PHt7WlDVIF0XojCMkQznZWlYGtYnLyh5w3DaPD z94xYE+YPycvv10Ab2xmgqSn4Niu728zUq/PWH7kLg9+XzOo6/pbZgCg5iWVK7uE9t8O OIYpkVLPCHtjplzrhV3A/ucHqRUVWYM2ZRezX1VD6AnCgYTsZJkDg5y/LSFhCjxDHosS 0pv5VPi+dHT3Y9sWPfBLwfjoSo3ybC0bTQaq1cAGW0AcXsMwGvrKVxxtdwb0FllB/1hx +MBwWCTR9MZElcWfmSlSLvTMOyM9OXfBsnQl1B5PcFXfOcyzCfHh8K0/VHwf9N65FZHU /+HQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n7si1718359edv.74.2020.06.30.06.53.13; Tue, 30 Jun 2020 06:53:35 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730989AbgF3NgN (ORCPT + 99 others); Tue, 30 Jun 2020 09:36:13 -0400 Received: from verein.lst.de ([213.95.11.211]:36002 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726033AbgF3NgM (ORCPT ); Tue, 30 Jun 2020 09:36:12 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 019CF68B05; Tue, 30 Jun 2020 15:36:09 +0200 (CEST) Date: Tue, 30 Jun 2020 15:36:09 +0200 From: Christoph Hellwig To: Maximilian Heyne Cc: Amit Shah , stable@vger.kernel.org, Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] nvme: validate cntlid's only for nvme >= 1.1.0 Message-ID: <20200630133609.GA20809@lst.de> References: <20200630122923.70282-1-mheyne@amazon.de> <20200630133358.GA20602@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200630133358.GA20602@lst.de> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 30, 2020 at 03:33:58PM +0200, Christoph Hellwig wrote: > On Tue, Jun 30, 2020 at 12:29:23PM +0000, Maximilian Heyne wrote: > > Controller ID's (cntlid) for NVMe devices were introduced in version > > 1.1.0 of the specification. Controllers that follow the older 1.0.0 spec > > don't set this field so it doesn't make sense to validate it. On the > > contrary, when using SR-IOV this check breaks VFs as they are all part > > of the same NVMe subsystem. > > > > Signed-off-by: Maximilian Heyne > > Cc: # 5.4+ > > The first hunk looks ok, the second doesn't make sense as fabrics > was only added with NVMe 1.2.2. I can fix it up when applying if you > are ok with that. > > But you guys really shouldn't be doing SR-IOV with 1.0 controllers > independent of this.. And actually - 1.0 did not have the concept of a subsystem. So having a duplicate serial number for a 1.0 controller actually is a pretty nasty bug. Can you point me to this broken controller? Do you think the OEM could fix it up to report a proper version number and controller ID?