Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp4294608ybg; Mon, 8 Jun 2020 04:20:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwde5dFUe6/LAeYTZEvWOo/Ux5X69FCAlQJ9f7Lg49iRgdgRGKzLDLR59jvnqgETx/I3Czo X-Received: by 2002:aa7:d9d6:: with SMTP id v22mr22357126eds.66.1591615247517; Mon, 08 Jun 2020 04:20:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591615247; cv=none; d=google.com; s=arc-20160816; b=yI9xd47DFD5sNzAxflY2QuIyCN0WPM0qLH6tW8pNLb4T2Yj3e6Kv4OnwsmOmH2VtmQ 6jg9x5IxSa6tnBaLnsL335BTMfzxx/K04Gl6bnVwZpjJMQlQrrPr4mQrs/7xIs2mbS5D 1eo0I0Y8MjBi3gzb6BB2aD18rcZM1LujLf/dRMJgCiFASvoEFujlmFWjZlI5IqN08xrL K9++UT9cvgAgAJAVsKP3H4mfeV+c/NMuxFsiQtlWNPAF+ZjRcOvJglUEHVJT0v0jfSNp h9SJQ2KUdYLfBoQpvd+b+5V/Tc9IrzWoeDqkiyR4yerIFMzQc086KwOyyJ7CXa4y+5yr ip4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=bLGHAPpBMCAk0XEijfEImk2BbxF7rnJc2dl2Taiz1TQ=; b=t0xqRnwXfRKfpHiPqFiNDc1vJTTImBYrvG8Q0mfK7tKxBlQgnfmTxZqJpzPzyK1ZAt P5bdj48B971xEYwi5qGibc6X3ju3hsFX924U2iaKvY9BpvLP3AzUBGYynJiBb5qMxktk Xp8h9d1Km9y0shA+HRgeo1xGKpcRm4IJvv9hawYOyVnHku+XsuCWzpDRysezFyGtkJ0R tVf2iyHiflF3TUuQuLWHbrXNUJYOjCJef/oyy3dkGqjJbwcp6lwLbKyjDRuRKkacomWA d8MQr/dAA+rVt/OCISKvrPw2bsIwjujmwRIQfAF4lTS1VGZbPt0bOETFXze5w1Ku+Exv DS3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TaSeTrlV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p11si642076ejb.333.2020.06.08.04.20.23; Mon, 08 Jun 2020 04:20:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TaSeTrlV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729567AbgFHLSk (ORCPT + 99 others); Mon, 8 Jun 2020 07:18:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729487AbgFHLSi (ORCPT ); Mon, 8 Jun 2020 07:18:38 -0400 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64437C08C5C2 for ; Mon, 8 Jun 2020 04:18:38 -0700 (PDT) Received: by mail-pf1-x42c.google.com with SMTP id b16so8386647pfi.13 for ; Mon, 08 Jun 2020 04:18:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=bLGHAPpBMCAk0XEijfEImk2BbxF7rnJc2dl2Taiz1TQ=; b=TaSeTrlVy0Eb/aruMNajP24/DLeWRd9UFdtv6Dj3gjkKh/9LLrMOB2uP/JbEbb9+a0 /eecysEbxfYfxZaAI4VpkTG/+hIJpU2+HYkSU7YWBauOPir/dzTWnUU76V1HHw+Mc3La JKb9NDNzINJjPg6Ji9GUO5U0GUd+RYQ6kbkmaXOBc5xsXNIa3VgPPmxTzCFvibeFrNYr kxukMwwf7TpfibkoNfeTHbv1jWbpAk8Gw5IX+F8x1wfdJ7kB3WwKckYPQDZ6ESVJQMzG yy4dpGQIfkVMzththSiR2XHutN/3S8l/tws+7BDwAESu37w3DayBWbC28jRVaGR8Psb+ Jyuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=bLGHAPpBMCAk0XEijfEImk2BbxF7rnJc2dl2Taiz1TQ=; b=K/E9JOXTG5NogKmyza4rT6L+ZZqmMOqMJz+vCp3A1Lk0OhtycYg1m4B7oQWPvKWRvJ d/yJV2b1AzeL9bwCXtRSrI+3gbPQOXJ8oeRiToMjOnam32yWnyJ7jh5mYhsKYISvESHo SpSw+BpyhjwZhWeeaZ3rulC7mN9BFfAvmJePQwsstqVuofS37cLlUezM2Hj/y2leTbJU g/+IWwiTYPfHpKq3po4RbiL4ITQhNEm2fK7kxTrf60Y8L/V2aYjdhNdhzDgSYOs3NOSS z7/jZy/O1+mHGY8MUxw66dy87efg1RAflokJ4xyheUPC6czZl/Npx6MtHuitxQuwd1sQ 84GA== X-Gm-Message-State: AOAM533jAuN0dr/bQQ5fAvgfofmMLK/OPAhZ284TTJbPy4ipyoXnrOng 968IyssUY1qxZcixTfnsFUI= X-Received: by 2002:a63:5d62:: with SMTP id o34mr19595022pgm.420.1591615117630; Mon, 08 Jun 2020 04:18:37 -0700 (PDT) Received: from localhost ([49.207.55.212]) by smtp.gmail.com with ESMTPSA id d4sm15396959pjm.55.2020.06.08.04.18.36 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 Jun 2020 04:18:36 -0700 (PDT) Date: Mon, 8 Jun 2020 16:48:34 +0530 From: afzal mohammed To: Arnd Bergmann Cc: Russell King , Linux ARM , "linux-kernel@vger.kernel.org" Subject: Re: ARM: vmsplit 4g/4g Message-ID: <20200608111834.GB5736@afzalpc> References: <20200512104758.GA12980@afzalpc> <20200514111755.GA4997@afzalpc> <20200514133545.GA5020@afzalpc> <20200516060624.GA6371@afzalpc> <20200607125932.GA4576@afzalpc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Sun, Jun 07, 2020 at 09:26:26PM +0200, Arnd Bergmann wrote: > I think you have to use get_user_pages() though instead of > get_user_pages_fast(), > in order to be able to check the permission bits to prevent doing a > copy_to_user() > into read-only mappings. i was not aware of this, is it documented somewhere ?, afaiu, difference b/n get_user_pages_fast() & get_user_pages() is that fast version will try to pin pages w/o acquiring mmap_sem if possible. > Do you want me to review the uaccess patch to look for any missing > corner cases, or do you want to do the whole set of user access helpers > first? i will cleanup and probably post RFC initially for the changes handling copy_{from,to}_user() to get feedback. Regards afzal