linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jann Horn <jannh@google.com>
To: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Vlastimil Babka <vbabka@suse.cz>,
	Andrew Morton <akpm@linux-foundation.org>,
	 "Liam R. Howlett" <Liam.Howlett@oracle.com>,
	Suren Baghdasaryan <surenb@google.com>,
	 Pedro Falcato <pfalcato@suse.de>, Linux-MM <linux-mm@kvack.org>,
	 kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [BUG] hard-to-hit mm_struct UAF due to insufficiently careful vma_refcount_put() wrt SLAB_TYPESAFE_BY_RCU
Date: Wed, 23 Jul 2025 22:00:40 +0200	[thread overview]
Message-ID: <CAG48ez0782x2dqa5LrK2cf9M0_Q=Gvo5tXsUFQDtyK00LpcvyQ@mail.gmail.com> (raw)
In-Reply-To: <CAG48ez0KE9bfFJ+yAMPUAj=_hcNRfes3=nfQd7Rv95TSnHtUCg@mail.gmail.com>

On Wed, Jul 23, 2025 at 9:52 PM Jann Horn <jannh@google.com> wrote:
> I'm not sure if I'm understanding you correctly; but yes,
> __vma_enter_locked() waits for all the waiters to drop their
> "refcounts". (It's not really a refcount, you can also think of it as
> a sleepable read-write lock where the low bits are the number of
> readers.)

Sorry, that's not entirely true, since an attached VMA has a refcount
elevated by one. It's kind of a refcount, and kind of forms part of a
sleepable read-write lock, it's complicated.


  reply	other threads:[~2025-07-23 20:01 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-23 16:26 Jann Horn
2025-07-23 17:32 ` Vlastimil Babka
2025-07-23 17:49   ` Jann Horn
2025-07-23 17:55     ` Suren Baghdasaryan
2025-07-23 19:01       ` Lorenzo Stoakes
2025-07-24  0:13         ` Suren Baghdasaryan
2025-07-24  4:40           ` Lorenzo Stoakes
2025-07-23 18:10     ` Vlastimil Babka
2025-07-23 18:19       ` Jann Horn
2025-07-23 18:39         ` Lorenzo Stoakes
2025-07-23 19:52           ` Jann Horn
2025-07-23 20:00             ` Jann Horn [this message]
2025-07-24  5:24               ` Lorenzo Stoakes
2025-07-24  5:23             ` Lorenzo Stoakes
2025-07-23 20:27         ` Suren Baghdasaryan
2025-07-24  2:30           ` Suren Baghdasaryan
2025-07-24  8:38             ` Vlastimil Babka
2025-07-24 10:53               ` Lorenzo Stoakes
2025-07-24 14:29                 ` Suren Baghdasaryan
2025-07-24 14:45                   ` Vlastimil Babka
2025-07-24 14:52                     ` Suren Baghdasaryan
2025-07-24 14:45               ` Jann Horn
2025-07-24 16:36                 ` Suren Baghdasaryan
2025-07-28 17:14                   ` Suren Baghdasaryan
2025-07-23 18:14 ` Lorenzo Stoakes
2025-07-23 18:30   ` Jann Horn
2025-07-23 18:45     ` Lorenzo Stoakes
2025-07-23 19:43       ` Jann Horn
2025-07-24  5:13         ` Lorenzo Stoakes
2025-07-24 14:50           ` Jann Horn
2025-07-24 14:56             ` Lorenzo Stoakes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAG48ez0782x2dqa5LrK2cf9M0_Q=Gvo5tXsUFQDtyK00LpcvyQ@mail.gmail.com' \
    --to=jannh@google.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=pfalcato@suse.de \
    --cc=surenb@google.com \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox