[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z798_nEvv6YVZntx@x1.local>
Date: Wed, 26 Feb 2025 15:43:42 -0500
From: Peter Xu <peterx@...hat.com>
To: Suren Baghdasaryan <surenb@...gle.com>
Cc: akpm@...ux-foundation.org, lokeshgidra@...gle.com, aarcange@...hat.com,
21cnbao@...il.com, v-songbaohua@...o.com, david@...hat.com,
willy@...radead.org, Liam.Howlett@...cle.com,
lorenzo.stoakes@...cle.com, hughd@...gle.com, jannh@...gle.com,
kaleshsingh@...gle.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH 2/2] userfaultfd: fix PTE unmapping stack-allocated PTE
copies
On Wed, Feb 26, 2025 at 10:55:09AM -0800, Suren Baghdasaryan wrote:
> Current implementation of move_pages_pte() copies source and destination
> PTEs in order to detect concurrent changes to PTEs involved in the move.
> However these copies are also used to unmap the PTEs, which will fail if
> CONFIG_HIGHPTE is enabled because the copies are allocated on the stack.
> Fix this by using the actual PTEs which were kmap()ed.
>
> Fixes: adef440691ba ("userfaultfd: UFFDIO_MOVE uABI")
> Reported-by: Peter Xu <peterx@...hat.com>
> Signed-off-by: Suren Baghdasaryan <surenb@...gle.com>
> Cc: stable@...r.kernel.org
Reviewed-by: Peter Xu <peterx@...hat.com>
--
Peter Xu
Powered by blists - more mailing lists