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: <471fd771-7809-4f18-b9a3-8caca8f63b9d@lucifer.local>
Date: Fri, 23 Jan 2026 15:08:15 +0000
From: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
To: Vlastimil Babka <vbabka@...e.cz>
Cc: Suren Baghdasaryan <surenb@...gle.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        David Hildenbrand <david@...nel.org>,
        "Liam R . Howlett" <Liam.Howlett@...cle.com>,
        Mike Rapoport <rppt@...nel.org>, Michal Hocko <mhocko@...e.com>,
        Shakeel Butt <shakeel.butt@...ux.dev>, Jann Horn <jannh@...gle.com>,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        linux-rt-devel@...ts.linux.dev, Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>,
        Boqun Feng <boqun.feng@...il.com>, Waiman Long <longman@...hat.com>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Clark Williams <clrkwllms@...nel.org>,
        Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [PATCH RESEND v3 04/10] mm/vma: add+use vma lockdep
 acquire/release defines

On Fri, Jan 23, 2026 at 09:41:24AM +0100, Vlastimil Babka wrote:
> On 1/22/26 20:41, Suren Baghdasaryan wrote:
> >> > +/*
> >> > + * VMA locks do not behave like most ordinary locks found in the kernel, so we
> >> > + * cannot quite have full lockdep tracking in the way we would ideally prefer.
> >> > + *
> >> > + * Read locks act as shared locks which exclude an exclusive lock being
> >> > + * taken. We therefore mark these accordingly on read lock acquire/release.
> >> > + *
> >> > + * Write locks are acquired exclusively per-VMA, but released in a shared
> >> > + * fashion, that is upon vma_end_write_all(), we update the mmap's seqcount such
> >> > + * that write lock is de-acquired.
> >> > + *
> >> > + * We therefore cannot track write locks per-VMA, nor do we try. Mitigating this
> >> > + * is the fact that, of course, we do lockdep-track the mmap lock rwsem.
> >> > + *
> >> > + * We do, however, want to indicate that during either acquisition of a VMA
> >> > + * write lock or detachment of a VMA that we require the lock held be exclusive,
> >> > + * so we utilise lockdep to do so.
> >> > + */
> >> > +#define __vma_lockdep_acquire_read(vma) \
> >
> > One question I forgot to ask. Are you adding "__" prefix to indicate
> > no other users should be using them or for some other reason?
>
> I'd say it's the case of 'it has to be in a "public" header but not expected
> to be used directly" by the end-users of the header'.

Yup, this is why I did that.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ