From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6EB1F40DFDC for ; Wed, 27 May 2026 13:32:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779888731; cv=none; b=ggY59KJiGmP5HV6JYsBXM1ALf6wf4hf5LO6h7l7SVZ5Q0dfKV8OcaULe23f3m3wdAJAwQ9yx9z/CMwIxRbBeyJVqO3IwShBwGPHWDmf2cjAgRE8QgaSdPoIAUnqcyvatk9BMt03dgb3vkIeyDig/xZm+xMpkOf5exwD+opyVbMs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779888731; c=relaxed/simple; bh=RpdZptpxIvLpo2ZRaFEaS75BVdz2uaSumCuWeGKkXXY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RhNqTVUwLwj9UWqWgvKiq2+pXggmCJMfviqnW/pYrpGO3xpkewIJTKXEQTLTfYkhkvs0E43YO9TT3iJEMP9VlRmacrrVO881JkF5+DluFM/zPumJIAD8pZJCtIJ7ouVAJP9EJz1EyXUO9713/+kRsnTwYw4la0uBrqJG7h/IMyU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id B3BE668BEB; Wed, 27 May 2026 15:32:05 +0200 (CEST) Date: Wed, 27 May 2026 15:32:05 +0200 From: Christoph Hellwig To: liuxixin Cc: linux-nvme@lists.infradead.org, kbusch@kernel.org, axboe@kernel.dk, hch@lst.de, sagi@grimberg.me, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/1] nvme: fix FDP configuration log parsing Message-ID: <20260527133205.GA12042@lst.de> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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) On Wed, May 27, 2026 at 10:29:45AM +0800, liuxixin wrote: > > From: liuxixin > Date: Wed, 27 May 2026 10:22:32 +0800 > Subject: [PATCH v2 1/1] nvme: fix FDP configuration log parsing > > The fdpcidx bounds check sets n = NUMFDPC + 1 but used > instead of >=, > incorrectly accepting fdp_idx when it equals n (i.e. NUMFDPC + 1). Looks good. > > Also validate descriptor sizes while walking the list so dsze == 0 or a > descriptor past the log end cannot cause unbounded iteration or reads past > the buffer. Also looks good, although I would have split that into a separate patch. > Fixes: 30b5f20bb2ddab013035399e5c7e6577da49320a ("nvme: register fdp parameters with the block layer") Please shorten the sha id to 12 characters, i.e: Fixes: 30b5f20bb2dd ("nvme: register fdp parameters with the block layer")