From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796247497; b=f9CJo2Sc8mS1dP4nWSh1s8VFLczZG7vddroKJZRzNxrNT4GriIaxJdzDzFLpeUVpa8Fz mGP0J3W15sCy2ejqc8cl493VJ7c/ZNwZWmNdtxLnOLMOjwONrBdQ8lswqYfTXndLorn95 ixSMqz0MTq2SqrzaUHGXE7D9A3BRQbbvDBRRe3Y3t+o2qYQjoxrvVpxzMUcPN5eQBBlFV YDHVe7MfMB/2WGAK7w0o15lpp1t5yykRalKVfVqCIZimZH11nZdMWGCpnfj3uzP8qfwqG cqh8qN+JhubeMSNXQveHWTnU4BECmbtuoQryLTWu+NOlQm+TRwwWGEtFmOj4lCwsiJQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796247497; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-Id: In-Reply-To:References:X-Mailer:Mime-Version:Content-Type: Content-Transfer-Encoding; bh=Dc7j5hvR/J/lYyh0+k/jPQI/TWXVDXN9cLuCDYv6G2I=; b=gs5jtOdaBAUeYdKWo85OZsO2fWTQY4w15pvLn/1o6UcqIlNXH30Q2E2hH9FnWa1yvpwh w7d7CdzMPkP/LEEDztOZGm4BCBm1/+GWlUGGtyqYIXdHA74TOcXpPUK1BEGQd0OLo35eU w/FL0WGyUSgo6EmisTbEwUtt/ImO/DKr6sWU9zdmlZDFEh3XQaIeW8M4C8jbO0yMxHgUv 6PZUAaK9oVHymdLrVdH+tAdWrT8uGweSTORk1ZdFY2iVte77OQR/9+REc5NFYxyX4eLlZ tnUkv2kvRh6pxrlMaqGUgiiZfGFpmy6A3q23AAELfvdbdsCCce572wS4Sm6MyWTI+Jw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=korg header.b=KgazlE9L; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 169CA606A322 for ; Wed, 2 Dec 2026 21:38:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=korg header.b=KgazlE9L Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB4121F000C1; Wed, 2 Dec 2026 21:38:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1796247496; bh=Dc7j5hvR/J/lYyh0+k/jPQI/TWXVDXN9cLuCDYv6G2I=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=KgazlE9LhSQc9usiy7fVa2wtOUvyAm8LDQEBG5oHivAXOtpimGLkB4reWC/Hv93+r vga+gCk2+ysR1CAU4WtKtpI0fb0xRfpIc0iVXQ81hybIz/260csyUHImaImLjoEZ1+ fULA/a5PaOvn6Bt5ICzeWjx414wWbTHQmIRAreJw= Date: Wed, 2 Dec 2026 13:38:15 -0800 From: Andrew Morton To: Wen Jiang Cc: Barry Song , "David Hildenbrand (Arm)" , catalin.marinas@arm.com, will@kernel.org, urezki@gmail.com, linux-mm@kvack.org, dev.jain@arm.com, ryan.roberts@arm.com, anshuman.khandual@arm.com, rppt@kernel.org, leo.yan@arm.com, xueyuan.chen21@gmail.com, chleroy@kernel.org, maddy@linux.ibm.com, mpe@ellerman.id.au, npiggin@gmail.com, ajd@linux.ibm.com, jiangwen6@xiaomi.com, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v12 09/10] mm/vmalloc: map contiguous pages in batches for vmap() if possible Message-Id: <20261202133815.8e89255e321f272c2b2c4146@linux-foundation.org> In-Reply-To: References: <20261107134953.748622-1-jiangwenxiaomi@gmail.com> <20261107134953.748622-10-jiangwenxiaomi@gmail.com> <949c3260-6740-4dfd-9ab7-b50c3f471497@kernel.org> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On Wed, 2 Dec 2026 18:23:00 +0800 Wen Jiang wrote: > On Wed, 2 Dec 2026 at 17:45, Barry Song wrote: > > > > On Wed, Dec 2, 2026 at 5:36 PM David Hildenbrand (Arm) wrote: > > [...] > > > > > > > > > > Hi David, > > > > > > > > Thanks, the analysis is right. This patch sets VM_UNINITIALIZED on the > > > > area until the mapping is complete, so show_busy_info() skips it the > > > > same way vread_iter() does, and clear_vm_uninitialized_flag() orders > > > > the stores to area->pages and area->nr_pages before the flag is > > > > cleared. So this race is covered as well. > > > > > > Is this patch already upstream or could we still add Fixes and decide on stable? > > > > It's still in mm-new/mm-unstable, so I think it's perfectly fine to > > add a Fixes tag? On Wed, 2 Dec 2026 10:13:34 +0100 "David Hildenbrand (Arm)" wrote: > Apparently this thing here fixes an issue: > > When CONFIG_PROC_FS and CONFIG_NUMA are enabled, a race between vmap() > called with VM_MAP_PUT_PAGES and a concurrent /proc/vmallocinfo read can > cause a NULL pointer dereference in show_numa_info(): /proc/vmallocinfo is mode 0400. And I am told that the vmap(VM_MAP_PUT_PAGES) callsites are also privileged: - i915 GVT setup: Host administrator creates a virtual GPU; this calls shmem_pin_map(). - i915 selftests: Must be built and enabled through driver/module setup; normally administrator controlled. These also call shmem_pin_map(). - I/O-iterator KUnit test: Runs at boot or module load when configured; administrator controlled. > Yes, the tag would be > > Fixes: b944afc9d64d ("mm: add a VM_MAP_PUT_PAGES flag for vmap") > > David, do you think it should also have Cc: stable? The patch needs some dental work to make it apply to mainline and given the above I'd say we skip cc:stable?