Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp665263img; Tue, 26 Feb 2019 06:39:56 -0800 (PST) X-Google-Smtp-Source: AHgI3IaMR6XqTdVs6N2QZ2a6Iinsz1ppl5cfPsZkiAPvtrG0TvE69a2MnUd8GmM08XCbwb5bTkyX X-Received: by 2002:a62:14c6:: with SMTP id 189mr24692509pfu.23.1551191996590; Tue, 26 Feb 2019 06:39:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551191996; cv=none; d=google.com; s=arc-20160816; b=e+kz7o2s4xx1I7Iyp7BGL3ZFbz2t5wQTnIA38mk5b1oMyPTgzR9RMycnqFOx+Gu+jd W3UTdt94swvckGp9Jt5FnaJ5yTC04L/e/mfMgqcVhsldoy1TK1lEVxk8dJIDIB1MFEkn ZDGjYdAcLwh+3Wl4EP8ZHE14BWrjAzTXidJKiS8oYgVkoKwlox9GT9soJdD3gG0YNFBz b8uCYaLkYY9bDNaCzc7XTfgcVLjGdzWdPIl3D64sENG4gJdsc96t7geNrGuT2nVjRNMz kO1/qYvOTVLzTJFBiKpuCxNVmANgWAfMCGYbHSgLNqurS94vrk/TDvM0Dp+ZUo34Bed1 0cRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=dfiBLpo8ppzHN31Df3pK9Pue7IUmmemEwHEq/+qIHW8=; b=ikw/301rs57ZAe8olwN3w0IJ+sk2pZzforFdy+u71OBQ2PT18wggJ13+yn4lPr5uBd vJ/kwBuc0V4EkSseJZoY1Tw8wP+Ozk+2keltBDuht8UQlMWDGd8VKoJ++vI1IvXazYLm ypaYJEmlKavCPnC8T4QVHgmtAHinL0PBjOKyDB7WntgfCm+S6527eW4K8h7is4Al+9s2 X3gooUZt+oTdi6Nxiaxtv+Z7Qoi0n8FnRV1xyZSQdTDF2iQtjJpluE1Olsak6WQvf6dA WMGxUiIfYC5D7r3nWg8qBWXlFjw6oXXLUprTsPu78bg25VZFxek8oO7HLFG3U3pEnKUl BUpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=qrniw8KQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y18si12293176pgf.247.2019.02.26.06.39.41; Tue, 26 Feb 2019 06:39:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=qrniw8KQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727416AbfBZOjU (ORCPT + 99 others); Tue, 26 Feb 2019 09:39:20 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:38359 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726965AbfBZOjU (ORCPT ); Tue, 26 Feb 2019 09:39:20 -0500 Received: by mail-pf1-f193.google.com with SMTP id n125so6349384pfn.5 for ; Tue, 26 Feb 2019 06:39:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dfiBLpo8ppzHN31Df3pK9Pue7IUmmemEwHEq/+qIHW8=; b=qrniw8KQBsnVcBdkLwXYTHP1tzALWjLL3wqY47zLDB86u7VpyXqsBCFNMPUvx2rcQ5 tleEIn43VcQEIxdaz5Lq3qoXKxfo59ovHYPtXDa7JwcKInE8AMfYDGNxNizwMWMWQjde EhSO6jW2VXILtMDY8JQSd+bipZZVCQ+CR0EOZ2zJgqQHGK2gbFfefcVUCOF/9F/FdN4j khe0Gzu8tDmq3gffWUNVCHAG7gYifd/AMvfrRv8bNWrE6v7GDGV6bjcxEvsAriDj0zwX 9ukzSjG/hOjO6EfG3Aixqm8fiGMNQyIAiftpSDpkdyIWPy343s9BUOUiQ9YAblVGHraC nJQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dfiBLpo8ppzHN31Df3pK9Pue7IUmmemEwHEq/+qIHW8=; b=eQzH4wb35v4yPQjWJucbA2ihhhDevCE++xHrbXZ2oVR7HHgSLG5Zn8mOFEd2ZW9P0d LMVk3fSlx5OuEsWR7vq90KMMqPUmbCxIJi4BOaSBmbk2/Q51aFavx/1WRd4vsJqNWuOf kEfPyRrJLXemk0tX2N/wOdu5JrZQKc0ndcyvwqpxJseKJ3MU9E9rcWLRggpZbQWJHcwy BuT/kgkFBFC/HpAlLKYpKYMHbyViEEWzvPaev4jAUlqEzo7785ALEHmjiAcSITcVU0yQ LRafi00g6SApIvx3wyEHuXcz8NvR5V84IWVBVY5yi+Eyu1ip/4H0BIKLb+IeJk+lICpJ ooGQ== X-Gm-Message-State: AHQUAuaPheGDxAObTQjxBX2lV5b6QYTX3fniXoDmAbooZez8gyhT3A2C FfLr+qQ2zELeKOGghWb7zK5mAfOMHTnZ8qsvSBecXA== X-Received: by 2002:a65:6651:: with SMTP id z17mr23465185pgv.95.1551191958932; Tue, 26 Feb 2019 06:39:18 -0800 (PST) MIME-Version: 1.0 References: <8343cd77ca301df15839796f3b446b75ce5ffbbf.1550839937.git.andreyknvl@google.com> <73f2f3fe-9a66-22a1-5aae-c282779a75f5@intel.com> In-Reply-To: <73f2f3fe-9a66-22a1-5aae-c282779a75f5@intel.com> From: Andrey Konovalov Date: Tue, 26 Feb 2019 15:39:08 +0100 Message-ID: Subject: Re: [PATCH v10 07/12] fs, arm64: untag user pointers in fs/userfaultfd.c To: Dave Hansen Cc: 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 , "open list:DOCUMENTATION" , Linux Memory Management List , linux-arch , "open list:KERNEL SELFTEST FRAMEWORK" , LKML , 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 23, 2019 at 12:06 AM Dave Hansen wrote: > > 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? 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?