From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 511BBC43381 for ; Fri, 1 Mar 2019 16:59:21 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1FF8920840 for ; Fri, 1 Mar 2019 16:59:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="W3hJGqMw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1FF8920840 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nAIOEpLls4gv8aCz0fYZfJdGqfP42G79jvWnfvQULVE=; b=W3hJGqMw+bJJ77 xLm95x5lihi/9cQ7QrYzpNwL1hc3iNaiH6PQMU3VMxY7CyCdybfvdlG9G0bbrJ0EvCZAqMOMTAQKZ AZTKVS0zfGmLKwvLBfoAi51i6JThqom4Pxvq1cgi6UuyKPlxt/hScnj4s0vXOxVFlqULuM/q3+ZPL FmKY7AJNmBJwT1AfCNoaOYRmGzYVGyndE22wXcD3L/CCZBZ58fVZgYZqNPLY5m4VeSKrI9Pj3mZmC 4SPdayUc5Msr4yZZ4ScZtxLj7WdOt6ps8ZPGW7t+d+7RdksKj3nIyrsSb1W6HEMNABDGQutTAVZmz wSVucOp4LuNXiHQ7I7Jw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gzlVI-0005eP-44; Fri, 01 Mar 2019 16:59:20 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gzlVF-0005de-8K for linux-arm-kernel@lists.infradead.org; Fri, 01 Mar 2019 16:59:18 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D6B7080D; Fri, 1 Mar 2019 08:59:15 -0800 (PST) Received: from arrakis.emea.arm.com (arrakis.cambridge.arm.com [10.1.196.78]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0CD8F3F575; Fri, 1 Mar 2019 08:59:10 -0800 (PST) Date: Fri, 1 Mar 2019 16:59:08 +0000 From: Catalin Marinas To: Andrey Konovalov Subject: Re: [PATCH v10 07/12] fs, arm64: untag user pointers in fs/userfaultfd.c Message-ID: <20190301165908.GA130541@arrakis.emea.arm.com> References: <8343cd77ca301df15839796f3b446b75ce5ffbbf.1550839937.git.andreyknvl@google.com> <73f2f3fe-9a66-22a1-5aae-c282779a75f5@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190301_085917_302803_1CB0BA7E X-CRM114-Status: GOOD ( 16.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Kate Stewart , "open list:DOCUMENTATION" , Szabolcs Nagy , Will Deacon , Kostya Serebryany , "open list:KERNEL SELFTEST FRAMEWORK" , Chintan Pandya , Vincenzo Frascino , Shuah Khan , Ingo Molnar , linux-arch , Jacob Bramley , Dmitry Vyukov , Dave Martin , Evgeniy Stepanov , Kevin Brodsky , Kees Cook , Ruben Ayrapetyan , Ramana Radhakrishnan , Linux ARM , Linux Memory Management List , Greg Kroah-Hartman , Dave Hansen , LKML , Luc Van Oostenryck , Lee Smith , Andrew Morton , Robin Murphy , "Kirill A . Shutemov" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Feb 26, 2019 at 03:39:08PM +0100, Andrey Konovalov wrote: > 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? 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