Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1235161pxa; Fri, 28 Aug 2020 07:25:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfdoJa55avc6BtrfSqJZvJ5HJtelAr+XEnFmyBCAeUtGp17dWHNXsoTlIdiJoaQ6i9bh81 X-Received: by 2002:a17:906:194c:: with SMTP id b12mr2073127eje.459.1598624742943; Fri, 28 Aug 2020 07:25:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598624742; cv=none; d=google.com; s=arc-20160816; b=rtpNwNfA0vmJ2gbETQWQLDulAfqFKopiQqu20eSWu1RrxSVR6734m0dNX+sItBoRIq 0gc7oF8cpSBFodFhhaEKPpvEBhJQ3TqroE+K7eROeBIR94XA57oUIwoUZ3jF8R2q3TiC JOTSibwRXO4TCXxi+pyo+CUrxx9ZkNU+lJR1bOUZlss/sXuZM/SYn7I99Afod80WotMb 8NhC0DBd2g8/Eoue/UIhLbhnXdDNuyPqK4PEF7JLuuxJVCGhzYYbU5ZteUy136k7o3ju ip8dDMnp6/mk9MRb7sEKZ/n1+3vYaGcAMpVL02A9LCaRyDoLMPebUGJ2JFcS0XqFqsD9 d/ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=xTI6+GkcETTpHWIvvBypzVxQQpyEAhXbsVHo/bIanMg=; b=K/HUsCMOz/ouvLJ5G36hmlzOo3L7GAsCXk4lWc+Bnz28YpmmSrfWb2iq8IkN7Ml7X9 MsrBJ78lG4eT6MQOY68ZIbIcz6vzjKJHaPz2xeG/uV/j4AzPe6ZB2FmJ6E1Av2hn/wNb lEQp3dFpKw0slnJZXgW11jLOOkSIdiH9UOnHog7rzBNSkpQdyZK1zVRlIH/nub7K5Tub IcnG3WgD2EiQLvB2cUnQAyxkSZ/0fP36D2hwHifOPu3EWU62v1aXKTbpKViNoQi+4aMW u1nhxs/T+1o1uCr2pKPm5iqWkoFApg0kHOvOj5US1HpN/lNVkPU58L6JH25iRHw/rlqt t+Cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=N8KwPRQV; 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 w1si747944ejc.440.2020.08.28.07.25.18; Fri, 28 Aug 2020 07:25:42 -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=@ziepe.ca header.s=google header.b=N8KwPRQV; 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 S1727995AbgH1OVm (ORCPT + 99 others); Fri, 28 Aug 2020 10:21:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726791AbgH1OVj (ORCPT ); Fri, 28 Aug 2020 10:21:39 -0400 Received: from mail-qv1-xf44.google.com (mail-qv1-xf44.google.com [IPv6:2607:f8b0:4864:20::f44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90D0CC06121B for ; Fri, 28 Aug 2020 07:21:39 -0700 (PDT) Received: by mail-qv1-xf44.google.com with SMTP id l13so449443qvt.10 for ; Fri, 28 Aug 2020 07:21:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=xTI6+GkcETTpHWIvvBypzVxQQpyEAhXbsVHo/bIanMg=; b=N8KwPRQVWfqwX32CjhM1MWZNedWHxDfw6QHu2eKgwvj9vZXqN5mcjL5D9YkLqZDqct qVdRY6y2fQd5JqyhniJ/tWcO1kt9vPsrCbbIbQXo+iG2GLNyJPMdkKtsmiuk9BxGJtim sYY782s/qFCyOcqJnIfqSkt3Mey4xuCjGbAzCME0dqtOf9yt+Oh3qnkDrmC2ueY6rOxF W9/Ocv6Pq7/EYz8n7ZAcDH/9kMa9jBAWYr0uJcvBCbv9K3HdEAlny7to5qpZ6rD9BmS+ aeSPb8vfkGvF2XTgF18OVl35YbtXeH/Z5hi33XQem9U/qSlsPnsyh8Mw6NQ/8rFoA4iI qCtw== 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; bh=xTI6+GkcETTpHWIvvBypzVxQQpyEAhXbsVHo/bIanMg=; b=juueA/FAO/wYOF10AEpPySC75QWU836lleuyngZxbeMVnuqdh5gd3Optk1mZZtQLgz LRovyJqhjZyeSxnRL2EHcK9Lc3RQuRPS0UKfZ8eW7Ejfe6/gmej9NXWQLTUWgB7anAMc QAKynjPoHztAqa52YeiyK2V3kdbeBrWNOfJtRqc8ByxgrCE8D1Epj2F1wdfcrvqtrE8T 9JJrZQdH1J9lbYV/7pt9amw9MR2pZfIOc2Oub90zUASm1Y5fA1B15fpf67ZWvIXv1KV3 0nwhtC9AmYjz1vCku7RK9WmNyhkKxaRZCZe7V2dRsC/OS5wW/q2jAS1TeynmL6Xh9LSO Xuyg== X-Gm-Message-State: AOAM533vLXwKDScGQB4p0GrgvvBZId/bhwlerCLBMZLLpeZ65S21JzJA 02puvY8MM69+xz3tYEsU0XF1XepcuZMOTg== X-Received: by 2002:a05:6214:184a:: with SMTP id d10mr1927526qvy.190.1598624498625; Fri, 28 Aug 2020 07:21:38 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-156-34-48-30.dhcp-dynamic.fibreop.ns.bellaliant.net. [156.34.48.30]) by smtp.gmail.com with ESMTPSA id m17sm931967qkn.45.2020.08.28.07.21.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 07:21:37 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1kBfG5-000hDT-3F; Fri, 28 Aug 2020 11:21:37 -0300 Date: Fri, 28 Aug 2020 11:21:37 -0300 From: Jason Gunthorpe To: Gerald Schaefer Cc: Linus Torvalds , Andrew Morton , linux-mm , LKML , Vasily Gorbik , Alexander Gordeev , linux-s390@vger.kernel.org, Heiko Carstens , Claudio Imbrenda , Christian Borntraeger Subject: Re: [RFC PATCH 0/2] mm/gup: fix gup_fast with dynamic page table folding Message-ID: <20200828142137.GX24045@ziepe.ca> References: <20200828140314.8556-1-gerald.schaefer@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200828140314.8556-1-gerald.schaefer@linux.ibm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 28, 2020 at 04:03:12PM +0200, Gerald Schaefer wrote: > Commit 1a42010cdc26 ("s390/mm: convert to the generic get_user_pages_fast > code") introduced a subtle but severe bug on s390 with gup_fast, due to > dynamic page table folding. I think the page walk code in mm/pagewalk.c has similar issues to GUP. I've been noodling on some patches to add the missing stack copies to pagewalk.c as they are clearly missing.. It would be good if this could be less GUP specific? Generically this is about walking the page table without holding the page table spinlocks using READ_ONCE. Jason