From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-65.freemail.mail.aliyun.com (out30-65.freemail.mail.aliyun.com [115.124.30.65]) (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 29F671C860B for ; Sat, 29 Nov 2025 19:57:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764446259; cv=none; b=HFvvEoxurtvLH66jYpZ0uAhLAMN8gb/4wlRKK2zl2Xru38Bcexkg8DIWIsFc/MljL1j1mxnr3BNET2UL1owTvCnAePdCCpte3jVyBcqQ48r70GXoi7e3uZCX97DjEPuY66OWfqPdmk+UJKNivYjzqSoTTdNP0OvF4of12Z24Ji0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764446259; c=relaxed/simple; bh=dAldBJQD26YtVhORqOZFb12xVoAOgA6yprD6orzfbmE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=F6M5g89NygHUM+R0VPOhC3mwlld/py2GoRAydGU8blvn63CWeJErcB/YiUSqJLl8syerolGE4b4IubOsE3sRby7A03gtBj7Ms4KizkCxFBPu7GleBM5WYNDKuXDYKlGRuW24WuczIaGOeaWmIZTWXEdNI2itmJR5OLaAKaQ6S9s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aliyun.com; spf=pass smtp.mailfrom=aliyun.com; dkim=pass (1024-bit key) header.d=aliyun.com header.i=@aliyun.com header.b=dkWswu2e; arc=none smtp.client-ip=115.124.30.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aliyun.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aliyun.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=aliyun.com header.i=@aliyun.com header.b="dkWswu2e" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=aliyun.com; s=s1024; t=1764446255; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type; bh=VAlptIlTrmNyDtwguekUJcn/mQ8zPoUeElwiD02khq8=; b=dkWswu2eD8sQbP6idTMUwwGONhJL5ceyUmlo4VifzftT/m9oB90PDAv1eFMdnMtfvnGYUe/VHLyOHQvp5GmF+ltH4MB/FBOdEAoBs9Md8oorjq3iSDIrwVV/L8zxxfiUn3J8UIQx+2htn5L+XND7y0ztddYglbOxlmzR5wl/PH0= Received: from aliyun.com(mailfrom:ekorenevsky@aliyun.com fp:SMTPD_---0WtgOH16_1764446247 cluster:ay36) by smtp.aliyun-inc.com; Sun, 30 Nov 2025 03:57:30 +0800 Date: Sat, 29 Nov 2025 22:57:22 +0300 From: Eugene Korenevsky To: Christoph Hellwig Cc: Keith Busch , Jens Axboe , Sagi Grimberg , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] nvme: nvme_identify_ns_descs: prevent oob Message-ID: References: <20251127144916.GA9423@lst.de> 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: <20251127144916.GA9423@lst.de> On Thu, Nov 27, 2025 at 03:49:16PM +0100, Christoph Hellwig wrote: > I think we'll need a somewhat more complex check that at there > is at least enough space for the len member. But I prefer that > style over a table lookup and magic name pasting macros. Okay, simplified the patch. See v2.