Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3178393pxk; Tue, 15 Sep 2020 12:06:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzu7StiPhJQ+K9mpD0mOa+x9O0OLvSM2Aq8wXW1ly9JC/T63TOX3Mr1DiLlyawm9RYi5mI X-Received: by 2002:a17:906:33d8:: with SMTP id w24mr21308180eja.224.1600196795776; Tue, 15 Sep 2020 12:06:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600196795; cv=none; d=google.com; s=arc-20160816; b=G73CpqniV2qDuwMc3WQ1kcfL/nymsN/c+4lLmF5/HgD4p0PnuNzztsN5C6jUfPucwV 5ZFKESCAGu1pySO/Slsh0WIXayw5RwWdlYRoaVnuwgEhw+ssW8QdMrjfGren/VnfKY5z qxte2Bt0Wzq5aN5ub7BzfUBaYeyOnvuLXpOJye3oBsTVHVD4G5jzzKudjOvBvfCIblHo Rkd6QLQp2xfyCEA8v12e2MaFjGxOtMjxRWxBivGOWTAYAI+ap/wjNed/RhNSBjCdr+iN 3sOgRQK3QdemaqULrPFta5h8V8qzgNZY10h2beG1I25lq7ZGcri+Rs/Q+HvFtGlpHU01 8dNg== 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=0SwsWPJcQ8csUf8qT+IW5LyVsjYQaHYS00V7321t2GI=; b=vwUhPn5bdKL+zqE7NQesDTpoZv68Gwul+DdTl6g58u3MJeEWLoL5PfohjEXSwWddtG 9Nqp/DHIfqR/vi6ZMZFr4bxmish+JzLbm4dYD1QQeaSjBm0xu0sfqJYeNHIKyhGd9a/l VqBIIAVVK7D5A+6SHWso6/Yv211kidDU9YqTu0h93HnU19O9PWR/DNX4r19FFSmytyzh b0A3SawKZITKbl52p7LXqYnBa3Pdg5LEowvb0AD9mE4rngEkOo3VkhrPKn/ey73WZSfg +e6DW6PPBkAiCqw6VE4E3OW1bxBZWrwK8DTRE3XzqPz56WwEgBnm5rZKW51oGY3vNpFR zczg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b="Su2Y/VZR"; 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=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g20si11020169ejz.452.2020.09.15.12.06.12; Tue, 15 Sep 2020 12:06:35 -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=@ibm.com header.s=pp1 header.b="Su2Y/VZR"; 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=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727707AbgIOTC6 (ORCPT + 99 others); Tue, 15 Sep 2020 15:02:58 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:42634 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727430AbgIORLm (ORCPT ); Tue, 15 Sep 2020 13:11:42 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 08FH3pQx087775; Tue, 15 Sep 2020 13:09:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=pp1; bh=0SwsWPJcQ8csUf8qT+IW5LyVsjYQaHYS00V7321t2GI=; b=Su2Y/VZR9MFPTTe76itJJTC2PYOcVxxTPkTe16Z+dWUBxWmBnEEOPxMSKSiuSbIusBSD +muGOMobMoG+nNfYDxtE3jDvPkZxmtfg9tZiFjWrJvJlVTkTOGG7kqPJICVPKSZ5sKqg 1sgfp6wjddy3brhgYwS8mw+c051uWPXeODG2jP0bn4wv5m61YFrcNzu3+fiyCM6evgRY Jd+HFnGXgVXjnS8FVFh8m8RCd5qh08IOuyExBsRsnHUWAiOweYzGOvZYsdmjTYSKG4b1 7CerArw50uSE/wBNAL9yn7+mPPISXo8u+0b5hhswnVHoGWtYQzWCrj50oixD4qakn4LN 4w== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 33k1pdg5n5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Sep 2020 13:09:38 -0400 Received: from m0098410.ppops.net (m0098410.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 08FH49XR088681; Tue, 15 Sep 2020 13:09:37 -0400 Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0a-001b2d01.pphosted.com with ESMTP id 33k1pdg5ka-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Sep 2020 13:09:37 -0400 Received: from pps.filterd (ppma02fra.de.ibm.com [127.0.0.1]) by ppma02fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 08FH8Lnb026534; Tue, 15 Sep 2020 17:09:34 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma02fra.de.ibm.com with ESMTP id 33gny820bs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Sep 2020 17:09:34 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 08FH9VVo28901714 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Sep 2020 17:09:31 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A3DF152054; Tue, 15 Sep 2020 17:09:31 +0000 (GMT) Received: from localhost (unknown [9.145.80.96]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id 1BD555204E; Tue, 15 Sep 2020 17:09:29 +0000 (GMT) Date: Tue, 15 Sep 2020 19:09:27 +0200 From: Vasily Gorbik To: Andrew Morton , Jason Gunthorpe , John Hubbard Cc: Gerald Schaefer , Alexander Gordeev , Linus Torvalds , Peter Zijlstra , Dave Hansen , LKML , linux-mm , linux-arch , Russell King , Mike Rapoport , Catalin Marinas , Will Deacon , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Jeff Dike , Richard Weinberger , Dave Hansen , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Arnd Bergmann , Andrey Ryabinin , linux-x86 , linux-arm , linux-power , linux-sparc , linux-um , linux-s390 , Heiko Carstens , Christian Borntraeger , Claudio Imbrenda Subject: Re: [PATCH v2] mm/gup: fix gup_fast with dynamic page table folding Message-ID: References: <20200911200511.GC1221970@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-09-15_12:2020-09-15,2020-09-15 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 impostorscore=0 mlxscore=0 bulkscore=0 mlxlogscore=993 suspectscore=1 clxscore=1015 lowpriorityscore=0 spamscore=0 phishscore=0 priorityscore=1501 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150137 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 11, 2020 at 10:36:43PM +0200, Vasily Gorbik wrote: > Currently to make sure that every page table entry is read just once > gup_fast walks perform READ_ONCE and pass pXd value down to the next > gup_pXd_range function by value e.g.: ...snip... > --- > v2: added brackets &pgd -> &(pgd) > > arch/s390/include/asm/pgtable.h | 42 +++++++++++++++++++++++---------- > include/linux/pgtable.h | 10 ++++++++ > mm/gup.c | 18 +++++++------- > 3 files changed, 49 insertions(+), 21 deletions(-) Andrew, any chance you would pick this up? There is an Ack from Linus. And I haven't seen any objections from Jason or John. This seems to be as safe for other architectures as possible. @Jason and John Any acks/nacks? Thank you, Vasily