Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp3847342ybg; Sun, 7 Jun 2020 12:29:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyklEsR2pEzNN3iiUf1dc5nLlAuravbj4xhFfCdcxIAmn0qZnZYXPWO4dT1WuC42JH+x0Qo X-Received: by 2002:a50:fd01:: with SMTP id i1mr20114487eds.32.1591558148697; Sun, 07 Jun 2020 12:29:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591558148; cv=none; d=google.com; s=arc-20160816; b=F2c1ekVNA7aOkMeZFQsJuGzdTt+eh6do1BeKXUbIhk57sZJORjuSaOXVHulmiT+XB+ 2Z9l+frWcigwKNC5GTcl7hi8MEhtbCbZlOvUf8FYccFKlRgAT7tU6tGhTLLb+5HnOBEJ wj+/HxiPloM90BP6u0boUiRxa+JpZr4mmI8u1QlJBxVNDVLIRX21eNcPOAqDID0HO4ZD G2veeykR7jd4f5ixYDyucabHLr0JVf0fvCgMqa3uqvLCC1xMrxepMMfhv3rUAII7BUoh 9BG5dpzFkt8f043Yy1dPadbbGqo+qPdoasZdu6Mn9ZW7YXYonTzPyh7/Nd+9ZGKSW9rC 5j7Q== 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; bh=oaoza6BZTyNKRZRKO1j6/Tti3J6kIOrcDNoXUXscHik=; b=ezcgVMpSqo6Ivdpaa36yAIm82CepXM8DPR4RBYhfNmPL7lO70PA913vl3BTMwLVlSO s0kGCr5e197r18Q8UybCd09VQuSjgUvCIZvwhPMlTV8MaeF6rwG+0EncNPXzGlw/ufou nsb59bxIBT14nHUD8YO3nHEUMKNhs9K7TSBOfUhWgARhaRIfB0jViHfmr4Owt85+tx2/ 2vyIwe8IWxSdd3s+hIR5hn+oxsVIx2rUEw0rI1e0Wk4N0PxjLdvOcEOyphycmxFb4KJ9 Dxi5gEhydVl4qoryW2oyjsqkSpeWbOcOAm3qvs02YQ9r/Ch8aqgXEAstJA6Edv+5uc+B C3/A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s7si7999349eji.518.2020.06.07.12.28.43; Sun, 07 Jun 2020 12:29:08 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726954AbgFGT0p (ORCPT + 99 others); Sun, 7 Jun 2020 15:26:45 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:37107 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726780AbgFGT0o (ORCPT ); Sun, 7 Jun 2020 15:26:44 -0400 Received: from mail-qk1-f170.google.com ([209.85.222.170]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPSA (Nemesis) id 1MmQUL-1jHRY22MM5-00iRsH for ; Sun, 07 Jun 2020 21:26:43 +0200 Received: by mail-qk1-f170.google.com with SMTP id q8so15265692qkm.12 for ; Sun, 07 Jun 2020 12:26:43 -0700 (PDT) X-Gm-Message-State: AOAM530DeStpF5AUWZdTFvjwje5uwVKJKtI8n9xuLnyKZpPaOlTRFbnT MIm1DRHcVPYwUA/M4E1kKt8hM5gsv3KMQbdbsx4= X-Received: by 2002:a37:554:: with SMTP id 81mr19496641qkf.394.1591558002353; Sun, 07 Jun 2020 12:26:42 -0700 (PDT) MIME-Version: 1.0 References: <20200511142113.GA31707@afzalpc> <20200512104758.GA12980@afzalpc> <20200514111755.GA4997@afzalpc> <20200514133545.GA5020@afzalpc> <20200516060624.GA6371@afzalpc> <20200607125932.GA4576@afzalpc> In-Reply-To: <20200607125932.GA4576@afzalpc> From: Arnd Bergmann Date: Sun, 7 Jun 2020 21:26:26 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: ARM: vmsplit 4g/4g To: afzal mohammed Cc: Russell King , Linux ARM , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:jnEjANIvRpfY5WjlA4VhDwG3UxQnwa8DO2FkM6DwCH76XsBL323 TBuHecc6WLVd21Txo/oRgrWD7+azhyq3mJG61PHS4VEkOi88Dwk5MWKIA9Y7u44lhjS7FI2 NsPwF7lHcZbOe8ZLCcq20NCb9S1IEX/qx5/4aWq4zD+NYQ7nTm569nFgGWd/9Pixi+Ax8iz mOiXCTdO6WGae/oms0VQg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:60aUizmMctM=:LhwFxQ6znscXLQwm3aAmyR /naRp0fnNj2mcTcL2wUuQruHXMbJOE8oL1dtOkHFV1uN7k+VR4Qv47AluhaCjC1xGcfdd0SPP f08lrmf/iysXm51pAc4uTeNgRXx1ThuvBMY7YUMg1yOIaVZT+h+YJuWrDhaaY8ynRbZBy9GHE ek6RrPO2ugOrN1D1/wfWdkTMe7i3wolspG5Hvcp0M1ZHPpAZaJTt015eQltSJgT2Rm7OSIo3y HHHLTanVngUEY03laFaC1XwoW9uIWTxOFJa/ideD3HMQIZaWvgA/K/jQajxcN74HkpAk8YXjr dz/0LRAnEtOvBYnt3YmmwmqrYAesPLtUi3ZBAgHaATutHqWImT/wW84bYaPWFfhcU6QULEGuL R54mlENMvNkkyxc99dAupI9mQ8Ep2Bo4d8SEOtlrdy4wzmIbUlrLxw/NzIKrpq2tdvu4kjeTf CdvLknEwjOi4wUdElIddLtZTMmwPGXVGwKfWjN5ScyfmCckd+ZEE6mg6DtoTNX2yP4k38GHsT 3pZQRq3Zefq7y1ENq/AzOtxQfujCiSeTXnNaP0pHQVuNKrBjxyBeVszBllmtwb8zY03ZzAgz8 GBKx0OUBxsSuEQHTiP2kPxMb91dzHaqtZbee6zKB0ACzR3OglJAgNBXEPuKMKK/1R3YeB0fdg ntjUMj2udm+CNK9HDX+T8XL/ykK8DL57ZcU8qp6ESiDk0MbTMaxha/Jpt2nBlDeq/MG86YuTw IJpEkLAroy6xlR7zs3Um30qbjGuWB+JPHmXkZy60nvR6RNiQzoNaXllChAdZYTalB9uwq1qH2 ZGeUlJtpLXx8wrXfCHcXQwqH9PONvebQDXcf++tByaLLUXoC20= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jun 7, 2020 at 2:59 PM afzal mohammed wrote: > On Sat, May 16, 2020 at 09:35:57AM +0200, Arnd Bergmann wrote: > > On Sat, May 16, 2020 at 8:06 AM afzal mohammed wrote: > > > > Okay, so the conclusion i take is, > > > 1. VMSPLIT 4G/4G have to live alongside highmem > > > 2. For user space copy, do pinning followed by kmap > > > Right, though kmap_atomic() should be sufficient here > > because it is always a short-lived mapping. > > get_user_pages_fast() followed by kmap_atomic() & then memcpy() seems > to work in principle for user copy. Nice! 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. > Verified in a crude way by pointing TTBR0 to a location that has user > pgd's cleared upon entry to copy_to_user() & restoring TTBR0 to > earlier value after user copying was done and ensuring boot. 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? > Meanwhile more testing w/ kernel static mapping in vmalloc space > revealed a major issue, w/ LPAE it was not booting. There were issues > related to pmd handling, w/ !LPAE those issues were not present as pmd > is in effect equivalent to pgd. The issues has been fixed, though now > LPAE boots, but feel a kind of fragile, will probably have to revisit > it. Ok. Arnd