From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (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 C164A3EC83C for ; Thu, 30 Jul 2026 09:07:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785402472; cv=none; b=G0fICHJKDy3t0HLcvg2R7mnqSM/sw3BJutfcCNOkVHTVPO7EMR3vTZI9mHaFLA8hEYLGIXCewgbING7eGmSvEmCzz8VydB2AM+Klat3NOLx+LusrTBqAPCn8nhQ5X9lmUDzaSy2hgYjFd/TMkBC8w2cyaML0JGu/wDAnLfMGiHQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785402472; c=relaxed/simple; bh=jHwhbqYZcyFMLFasS7DHToFvnOjYKNx0LAh55A/C47Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QvjiAovCNiXTojNoH3ybV0lOEUSOsVl8rYkw5ObkeE1NaTlvpsuh/svY9mLp1Ny2Iqb1Jk/H6dy+f5XP+IvlAlkwbbG6/o8xAe6FZH77wrTNkdI9ty//1+hKVwEQjRwJ/nFAjP1KNBOadNVeCWSzAH4IBKqzhLVxHFTIUizSXas= 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=ro6Jh7dp; arc=none smtp.client-ip=209.85.167.53 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="ro6Jh7dp" Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-5b0231a3e86so1982237e87.0 for ; Thu, 30 Jul 2026 02:07:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785402469; x=1786007269; 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:content-type; bh=jHwhbqYZcyFMLFasS7DHToFvnOjYKNx0LAh55A/C47Q=; b=ro6Jh7dpPnu/9CJxx+rJu/3In2N/T9/vA4aoPaYZjk58sv/YIYfdddobeMjNyyEx7a QbteZLUbTk7VLWRWJ52OkbXjorbJBO5YTKZ/lzasRNL2+EE/n9GWIR+9kGNmzM2Yb4kE rfKEZ2vpmLS6qpk31bmTe7AFh0Em80sNwV2q9vzpXLIcVTmOtGpVTYTDTODvxXJVShPQ X2toO5a/Oty3gBoD6hpVV8chTjnFxqDE4XYsE9xgrAheU1f4Z+5y1txNXKL+/6WQLISy WVFcqe1+DNIPR0HkGzxTbDmRIs4wM9vZt2O7f5laQuHNNGvJhCyof6MjmQtdZ1dm4ldn 2FIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785402469; x=1786007269; 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:content-type; bh=jHwhbqYZcyFMLFasS7DHToFvnOjYKNx0LAh55A/C47Q=; b=m5sH3+46ez5a9nU0ZWTFMNRpVmm9YEuL/KKQ/egANBXQRQsYbqpQnrdd0/RVMvHbVE 3yXjytVevgvKk93+NEFWF5ZqVm6cr/EPU3gIypDixRju5Dxx081E1GQTDfn1YmmuwfUw r7eL8jZ3mwq5do9HAe6WcXIAlGrOoBcKZIG7P8Qy0UBBrfD7HxO+3aIk/gRQXRBcgpy8 CyF2GPjNjvzO8Mq+jJBxbLJdsVwohunJWwgl/nESJ+mdOMikvpa4fwJ8nCTaIALs6ANW S3WcPWSgDtnLT2Vp096JuYSEyB0tOqjuJGk/WJY9ZHqRf8xEayNWzjiVSVJcG6O9mEbN M4Tg== X-Forwarded-Encrypted: i=1; AHgh+RqEGqTA+enlleuC5Bwv2GK8YY0gdZP+/njoj4rmBMefUmoocYTFsf2mx9DxuKc5AEpludvvamLt5GONcoE=@vger.kernel.org X-Gm-Message-State: AOJu0YyTNOjI9+A9+wsnHAyin3yX+gz0ahf3NuP4L55gE2qhw9LyJ/e2 yJSJHMT1tLlt8ljuV1LwkxWpjT6sZN/1fxOewDllJq8ilPaEwYbSo37O X-Gm-Gg: AR+sD11Rw7MQIiRmG3kOMw2pkHC8viiJ6CmPk2++GifSVNvTtKXIpUb9WC8cT3ri6+c b+5qamePM4fQ4zL3AJix3gFNnCWio8C8bcrO1mlpRrNRmeYSXutwK9tyNUScT1OsQHc21vpSq02 MU9qymODwQzFeVpsszJSqXt27BilZ4C52q6QWuJsIk62WuRnkIMPjzZtD0zdIApGd6d5Z5yUv6Y 9sj2nuHPOAo6JQQdMToC8DkX3yhjxAGa0QLfFzN9M04ZPz+EFsyS83kB8R3RJkI9VRrBnWde7oF iSgWJvajQzUk1sQu5G9/SWatIFVttzdNpzAlx/MI6szV0ShzwS77LBiwF2OFeByMH6L1uWi0Xvm 1tCS/SV23Gp2gTxBlYUT0POCCsIkQ7sljMzbo/cEW2vki0JfvNMib0RNhe3uCOe2QHR4A51bntr PhXZ74u4wbJBRyRsObx9FBKX4VmvJbIn2M0nSQAp1e2qs8fj5le6aCAqZFaxw6OsLKHeDlD6dWv rq7WXDnwpI/eSmHCyy7BLbcgyXuxJ/xuhIiZNGYT8jV+4a5BDOC/W0ZxCbZZwrvOJG8 X-Received: by 2002:a05:6512:108d:b0:5aa:8822:c946 with SMTP id 2adb3069b0e04-5b2db37ec16mr338558e87.48.1785402468876; Thu, 30 Jul 2026 02:07:48 -0700 (PDT) Received: from localhost.localdomain (46-138-176-102.dynamic.spd-mgts.ru. [46.138.176.102]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5b2db942de5sm216643e87.10.2026.07.30.02.07.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jul 2026 02:07:48 -0700 (PDT) From: Artem Lytkin To: Matthew Wilcox Cc: linux-mm@kvack.org, akpm@linux-foundation.org, urezki@gmail.com, shivamkalra98@zohomail.in, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/vmalloc: make vm_struct.nr_pages an unsigned long Date: Thu, 30 Jul 2026 12:07:27 +0300 Message-ID: <20260730090727.65911-1-iprintercanon@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: <20260729175708.7074-1-iprintercanon@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Wed, Jul 29, 2026 at 07:28:36PM +0100, Matthew Wilcox wrote: > I'm not saying we shouldn't fix this, but it's all theoretical for now, > right? The 2^32 page part is, yes, and my opening sentence pointed at the wrong thing. What went wrong twice wasn't a page count, it was a byte count. nr_pages is unsigned int, so nr_pages << PAGE_SHIFT is 32-bit arithmetic and wraps at 4GiB of bytes, which is 2^20 pages. In vread_iter() that made /proc/kcore hand back zeros for a 4GiB area as a successful read, and any machine with more than 4GiB of memory can allocate one. So the reachable part is 4GiB and the 16TiB framing was me leading with the wrong number. To answer the other half of it, and Andrew's question too: no report behind any of this, I found it reading the code. v2 says so in as many words. Artem