From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Hansen Subject: Re: [PATCH v10 07/12] fs, arm64: untag user pointers in fs/userfaultfd.c Date: Fri, 22 Feb 2019 15:05:51 -0800 Message-ID: <73f2f3fe-9a66-22a1-5aae-c282779a75f5@intel.com> References: <8343cd77ca301df15839796f3b446b75ce5ffbbf.1550839937.git.andreyknvl@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <8343cd77ca301df15839796f3b446b75ce5ffbbf.1550839937.git.andreyknvl@google.com> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Andrey Konovalov , Catalin Marinas , Will Deacon , Mark Rutland , Robin Murphy , Kees Cook , Kate Stewart , Greg Kroah-Hartman , Andrew Morton , Ingo Molnar , "Kirill A . Shutemov" , Shuah Khan , Vincenzo Frascino , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Dmitry Vyukov , Kostya Serebryany , Evgeniy Stepanov , Lee Smith , Ramana Radhakrishnan , Jacob Bramley , Ruben Ayrapetyan , Chintan Pandya , Luc Van Oostenryck , Dave Martin , Kevin Brodsky , Szabolcs Nagy List-Id: linux-arch.vger.kernel.org On 2/22/19 4:53 AM, Andrey Konovalov wrote: > 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? From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com ([134.134.136.20]:16641 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725900AbfBVXFw (ORCPT ); Fri, 22 Feb 2019 18:05:52 -0500 Subject: Re: [PATCH v10 07/12] fs, arm64: untag user pointers in fs/userfaultfd.c References: <8343cd77ca301df15839796f3b446b75ce5ffbbf.1550839937.git.andreyknvl@google.com> From: Dave Hansen Message-ID: <73f2f3fe-9a66-22a1-5aae-c282779a75f5@intel.com> Date: Fri, 22 Feb 2019 15:05:51 -0800 MIME-Version: 1.0 In-Reply-To: <8343cd77ca301df15839796f3b446b75ce5ffbbf.1550839937.git.andreyknvl@google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: Andrey Konovalov , Catalin Marinas , Will Deacon , Mark Rutland , Robin Murphy , Kees Cook , Kate Stewart , Greg Kroah-Hartman , Andrew Morton , Ingo Molnar , "Kirill A . Shutemov" , Shuah Khan , Vincenzo Frascino , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Dmitry Vyukov , Kostya Serebryany , Evgeniy Stepanov , Lee Smith , Ramana Radhakrishnan , Jacob Bramley , Ruben Ayrapetyan , Chintan Pandya , Luc Van Oostenryck , Dave Martin , Kevin Brodsky , Szabolcs Nagy Message-ID: <20190222230551._XyvDMUVN68doRoFodt-N50Qb33y0ktjYsDWw2IRezs@z> On 2/22/19 4:53 AM, Andrey Konovalov wrote: > 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?