From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-vk1-f169.google.com (mail-vk1-f169.google.com [209.85.221.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B26E12BE05F for ; Mon, 20 Apr 2026 23:16:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776727004; cv=none; b=CtNgKekIMugtabkMZ8nFPXnB2+tmyJSut/ZOTNweXB9XEk0OQSiUvzVN1wYo7NCrwEzMSyLNF0SZdka25nDAn9eywreOos83xKR8yKEbhELfDG2I0GNz33/HeXS9HRKa/ZJFiNDb63BYXnOtS7qyCbCSHqPqt2ZgMDMv1o1JDWo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776727004; c=relaxed/simple; bh=TDif+KpaFEjc5/VuxXEUTLe+PiZSNUfRlc+tEpl6P18=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Jv0Sv3xZuIjvgWQW0DCHL0K9En8Gk3cHbhrQRp67DyyHXzn/VbogmjjcCJK6Mipj6Z/LCCXoHzeYmotPS7SG5aFJjX4ciiHVmFSeyfJjfm43s3Z2cuDEk0z3wMASvTcFdpTtoDUiDAjwcSp1CZIYCDv0M6fyxYbIR4E90o0hlWw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=NkcCOpIs; arc=none smtp.client-ip=209.85.221.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NkcCOpIs" Received: by mail-vk1-f169.google.com with SMTP id 71dfb90a1353d-56d958880ecso1160498e0c.2 for ; Mon, 20 Apr 2026 16:16:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776727003; x=1777331803; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ks/kPV6KM5qh7zx8h8Sh9vjdlfuUH/Z42xMVQT+4k5w=; b=NkcCOpIsOxZtTl7utwGc9uxVW4BO2V/0d+E9D4APSYFnyYY6MAw1PTJU+ZlX8LXOyJ jB28NtQfcfhhWT483ECJyprfoJkThvFOFJ1YyBmEL78TekGcSyOaoLoZJbg8XfP007NU LlCptAVO2PpiL3DwoNf+lI2Bq12NJbcPQhWEA9UiNu40W1zM1sDjATLxSS4/TOhjU89S BmYoY+uYLEYbuiLKmsUtTAWqGuhqYWOTBC38ymZhoesId4yeMuuZn0uKuvlcleAHFka2 5E55v/7Q56FM8A7Ncd4KLnV7QRaSmzYuEP5Ul8Z22bhFVROnsxjGt3J2hCZe3RcbhIh7 PopA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776727003; x=1777331803; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ks/kPV6KM5qh7zx8h8Sh9vjdlfuUH/Z42xMVQT+4k5w=; b=jGStTPgOcy6mop9T1KS3h/nrjoOsH/RgsU9sKZ+Lk53cqF9KhE+Gaj8vEJyNeefLMK qEcKH5G6dQt2N0GAU6Zev0b9cTbUwlQadlyVu/wJbV9+AizReEoU5IplpRPeQXlq1JuB qFIKhJ4JuSR0DzEcxygqg4WIpDdkL1NvjYb+xtCSw/d/M9y9dsnIkDjnYrksuSRlHeNk 9UyT4oLgk331y8h90eQOuI7ZQmXXiDXpCtPu58PHf9IAXphT2bFRQdj2lWz3tU8F7AnN Aq+Nn0ZoEGq05tS3KLsrJSWlZdnRYApen3oj6mHOSW9I4NcR5JutZodNTLU6rd+6HGcD abeA== X-Forwarded-Encrypted: i=1; AFNElJ9r2ZbR0jq0DVAVtV2mGG8OuvEnPaZBOOrMXqapu73nEMp8JVL14V6gW6iZpbBOLC0RJArzfqsD42GLPUg=@vger.kernel.org X-Gm-Message-State: AOJu0YyVPLoQ1ArfAD4e8y9DzL/DViZMT5NcecOpMVxEvF2rMG2YSDP3 r78viTDfZncKTXfL+khXRWiFm+s05Y+25cHarBKshgO/Q+9agtnWWWpu X-Gm-Gg: AeBDietzaTqeUteYWrru55XRCLxdfO+TIU1Z7I/4YPJ9e3ddxiTQycxMqJP/tL4I3p1 bdbv7uAdcMI+E+2cYIaZGMoBfeQzVyYo4ZZ33qaIwv1lvs3vdzI6+QCyHYWPCQy9AI/0xctIvoq p+KUbWhGpU9rJtG5Q4RTkFBciy2FrfHYAHnMNOHrrHMGZk0y2cSdQ8IRDfjLYru+k9wvGtx7h9U 1mlSscQmW+gkUAlNHl2WhhlkNbvQF29MVuLKGDhSqILm0y7FCSCB1o21iWFwfXhEkiskFR5+1XJ 182Og3B2XnMBP/2IPyd0zWUpB5+J3WWgYEPjME1Lspv/9TyzwK4ddCMacDkeJ4DRPFBW2kpJytE eXyc7hIHpTYrYUaiJSdpdTt/XoH1ur48qGcaoeCGPYhJuaxc2cvVGCaWv2l/lMROhxJGluFqN66 WxCdmFn4ESbwS0CboGsDZU36audg+/TBrwwIfXVb+/8cg+YQoGCsjz X-Received: by 2002:a05:6122:1d91:b0:56c:ce8a:b07a with SMTP id 71dfb90a1353d-56fa589cdb0mr6794650e0c.7.1776727002733; Mon, 20 Apr 2026 16:16:42 -0700 (PDT) Received: from syssplab.cs.fiu.edu (nat1.cs.fiu.edu. [131.94.134.89]) by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-56fa93253aesm6835593e0c.14.2026.04.20.16.16.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2026 16:16:42 -0700 (PDT) From: Chao Shi To: Keith Busch , Jens Axboe , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Daniel Wagner , Maurizio Lombardi , Chao Shi Subject: [PATCH v2 0/1] nvme: core: reject invalid LBA data size from Identify Namespace Date: Mon, 20 Apr 2026 19:11:13 -0400 Message-ID: <20260420231116.748204-1-coshi036@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260418042835.420281-1-coshi036@gmail.com> References: <20260418042835.420281-1-coshi036@gmail.com> 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=UTF-8 Content-Transfer-Encoding: 8bit Thanks for sharing comments! I did such changes in v2: - Remove Fixes tag(Keith Busch: ds has never been validated) - Change -EIO to -ENODEV (Keith Busch) - Add missing "queue_limits_cancel_update()" in error path (Keith Busch) - Add warning for ds == 0 (LBA format not available) (Maurizio Lombardi) --- On Mon, Apr 20, 2026 at 02:51:00PM -0700, Keith Busch wrote: > I think ENODEV is more appropriate errno. Fixed in v2. > you're missing the corresponding queue_limits_cancel_update() for this > error case. Added in both error paths in v2. > This fixes tag is wrong. Removed. On Mon, Apr 20, 2026 at 02:22:04PM +0200, Daniel Wagner wrote: > This fixes tag is wrong. Probably a5b1cd61820e is the better choice here. Keith pointed out that ds has never been validated so no commit introduced a regression — removed the Fixes tag entirely. On Mon, Apr 20, 2026 at 02:22:04PM +0200, Maurizio Lombardi wrote: > ds == 0 has a special meaning: 'LBA format is not currently available.' Thanks,added dev_warn_once() for ds==0 in v2. Chao Shi (1): nvme: core: reject invalid LBA data size from Identify Namespace drivers/nvme/host/core.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) -- 2.43.0