Thread (30 messages) 30 messages, 5 authors, 2019-03-05

Re: [PATCH v10 07/12] fs, arm64: untag user pointers in fs/userfaultfd.c

From: Catalin Marinas <catalin.marinas@arm.com>
Date: 2019-03-01 16:59:18
Also in: linux-arch, linux-doc, linux-kselftest, linux-mm, lkml

On Tue, Feb 26, 2019 at 03:39:08PM +0100, Andrey Konovalov wrote:
On Sat, Feb 23, 2019 at 12:06 AM Dave Hansen [off-list ref] wrote:
quoted
On 2/22/19 4:53 AM, Andrey Konovalov wrote:
quoted
userfaultfd_register() and userfaultfd_unregister() use provided user
pointers for vma lookups, which can only by done with untagged pointers.
So, we have to patch all these sites before the tagged values get to the
point of hitting the vma lookup functions.  Dumb question: Why don't we
just patch the vma lookup functions themselves instead of all of these
callers?
That might be a working approach as well. We'll still need to fix up
places where the vma fields are accessed directly. Catalin, what do
you think?
Most callers of find_vma*() always follow it by a check of
vma->vma_start against some tagged address ('end' in the
userfaultfd_(un)register()) case. So it's not sufficient to untag it in
find_vma().

-- 
Catalin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help