lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250507153325.48726051dbbff4f3936a83ff@linux-foundation.org>
Date: Wed, 7 May 2025 15:33:25 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Jeongjun Park <aha310510@...il.com>
Cc: urezki@...il.com, edumazet@...gle.com, linux-mm@...ck.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] mm/vmalloc: fix data race in show_numa_info()

On Wed,  7 May 2025 23:25:52 +0900 Jeongjun Park <aha310510@...il.com> wrote:

> The following data-race was found in show_numa_info():
> 
> ...
>
> 
> According to this report, there is a read/write data-race because m->private
> is accessible to multiple CPUs. To fix this, instead of allocating the heap
> in proc_vmalloc_init() and passing the heap address to m->private,
> show_numa_info() should allocate the heap.
> 
> One thing to note is that show_numa_info() is called in a critical section
> of a spinlock, so it must be allocated on the heap with GFP_ATOMIC flag.

GFP_ATOMIC is unfortunate.  Can vmalloc_info_show() allocate the
storage outside the lock and pass that pointer into show_numa_info()? 
That way will be more efficient also, less allocating and freeing.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ