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] [day] [month] [year] [list]
Message-ID: <CAJuCfpH0dMvOA55KH=n-o9tT2W7k_m5UDvjNKH_Cs5x1AtP-ng@mail.gmail.com>
Date: Tue, 10 Dec 2024 08:26:26 -0800
From: Suren Baghdasaryan <surenb@...gle.com>
To: David Hildenbrand <david@...hat.com>
Cc: akpm@...ux-foundation.org, oliver.sang@...el.com, klarasmodin@...il.com, 
	willy@...radead.org, liam.howlett@...cle.com, lorenzo.stoakes@...cle.com, 
	mhocko@...e.com, vbabka@...e.cz, hannes@...xchg.org, mjguzik@...il.com, 
	mgorman@...hsingularity.net, peterx@...hat.com, oleg@...hat.com, 
	dave@...olabs.net, paulmck@...nel.org, brauner@...nel.org, 
	dhowells@...hat.com, hdanton@...a.com, hughd@...gle.com, minchan@...gle.com, 
	jannh@...gle.com, shakeel.butt@...ux.dev, souravpanda@...gle.com, 
	pasha.tatashin@...een.com, corbet@....net, linux-doc@...r.kernel.org, 
	linux-mm@...ck.org, linux-kernel@...r.kernel.org, kernel-team@...roid.com
Subject: Re: [PATCH 1/1] mm: fix vma_copy for !CONFIG_PER_VMA_LOCK

On Tue, Dec 10, 2024 at 1:06 AM David Hildenbrand <david@...hat.com> wrote:
>
> On 09.12.24 23:10, Suren Baghdasaryan wrote:
> > vma_copy() function for !CONFIG_PER_VMA_LOCK configuration copies all
> > fields using memcpy() as opposed to CONFIG_PER_VMA_LOCK version which
> > copies only required fields. anon_vma_chain field should not be copied
> > and new vma should instead initialize it to an empty list. Fix this
> > by initializing anon_vma_chain inside vma_copy() function. The version
> > of vma_copy() for CONFIG_PER_VMA_LOCK is fine since it does not change
> > that field and anon_vma_chain of any new vma is already initialized and
> > empty.
>
> I'm wondering if there is sufficient reason to have two implementations
> to do the copying.
>
> How expensive would it be to simply use the CONFIG_PER_VMA_LOCK variant
> unconditionally? Is it even measurable in fork() micro-benchmarks?

Yeah, the benefit if any would be tiny. I'll try measuring the
difference and if it's not visible will remove the
!CONFIG_PER_VMA_LOCK version.
Thanks!

>
> --
> Cheers,
>
> David / dhildenb
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ