Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1461021ybl; Fri, 6 Dec 2019 18:20:58 -0800 (PST) X-Google-Smtp-Source: APXvYqynKwmRFlMEr8duFv/0/cLMfuz0poWn54g+6b26C+zKjkBakWvpBD3lY9mi9XOCykAHbVYL X-Received: by 2002:a9d:5d1a:: with SMTP id b26mr13872162oti.139.1575685258252; Fri, 06 Dec 2019 18:20:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575685258; cv=none; d=google.com; s=arc-20160816; b=SMuUvrooANL9jV9XxO6xMzXnrbKmc1MZz4wtuQ9WamCdeZzegcSnAiSXasecOfeRhJ Pr76B6EQm+jdKjn1RjtXAenPw5gM1/ipitWj101QD6QMuG/un/wh7LaWVbxxrc4ZgYGx Goy/HRmRB/vrvzCFYD+3kr1H0ukB1jHwQ6oUiu0V6n+tsBBdMZ7FRmf1ptnUEOjWHXaH o9aQz8COrAe60rWx9p5vkh6IvwfxQpmxEK7nEF84lNn3esksMd3bDp8ChWc06EbaKL93 Tz4vLJNWrp71ccmWGiUR7q82m0VXhpPiCcDvneiITA3yE/QQ255seP3yGc4kPOySghQE vggQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=RvSWSXXOJHTsbagyrlqXQzUh6ihQzraXoeMeWUbMh9I=; b=uYoTkEcsmodgouqqOMuQkkoYFwuwxol7JWbNcx+nTVXzO6o4NtBPYKaLXYYI/KhyNR DM5NufGkCIhc+/fkukPsx+ABGHSQYzykUmyl4XjhAm44hSTmWgfYgFJlayAcntI7T4mM EqqlPL8fS1VbSjsgs+xiZV5am4M13ZClSaBnSyHAkQ7Ht+VqwFEUJgMdAcHqgWl+k901 c6Ab+lxBbfdpS7Z3i1q1PlKG8a6RyXH9NXFDiYyC9uxzIE/MYcBRKKhNsAQHkewL5e3a AgDKWg3ZJVKg8U3/dk/sMhrVw4vVbkOrtQIOzcSymYJTFXQP4OxbLSsaFL3WePNjXNhK iZGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@axtens.net header.s=google header.b="L4n3r/SK"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y130si8419087oiy.28.2019.12.06.18.20.47; Fri, 06 Dec 2019 18:20:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@axtens.net header.s=google header.b="L4n3r/SK"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726472AbfLGCQI (ORCPT + 99 others); Fri, 6 Dec 2019 21:16:08 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:38890 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726371AbfLGCQI (ORCPT ); Fri, 6 Dec 2019 21:16:08 -0500 Received: by mail-pl1-f195.google.com with SMTP id o8so3481845pls.5 for ; Fri, 06 Dec 2019 18:16:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axtens.net; s=google; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=RvSWSXXOJHTsbagyrlqXQzUh6ihQzraXoeMeWUbMh9I=; b=L4n3r/SKDbirhlxphXZ3Qlvdqppwt0kQHNEDpFm9YigZHlC7xxTSFkbUQabywTx6kZ cJoPh+w8NtyX8nVl6j1S7oV7jhsR5mWdPAhY/XG5r9KxtE63XfcsoUUS1ZXDfRkvvRvK /4bzIkaUN7ixuWBg0YE8VlGaUB6+6BGSuwttA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=RvSWSXXOJHTsbagyrlqXQzUh6ihQzraXoeMeWUbMh9I=; b=R52BFEMVyN3VpctcjxdaOK9SnGe3E4r+yqcEhnds96KVwI5Nefo9EM5WVD9YMpHsfG sMd85iuc2GbZM3vDO9zx3Z4KYoPP7Ili5iBsem3O/vexndoPVoTPUVlME8AEDXMt0bF6 EiU+iELeSJx8Qj/srVYWCIkGc8n/IpOh4laIETdSZv1T9vnFDwh3VEOfUMJ8WqRCAsiB O6Rc6TiRtzrUBzFiS/bSwOjiQ2a6HtL0gmlfU6X1s/svMSJ9TYkJg6mrhmxK6FcUWm1v zjSxFFyUgO30bn3aq591IN83SkqK3JRCVJcGaDHWj+Ag4eSSYW5CKFS4fVOv555oWbve /A9Q== X-Gm-Message-State: APjAAAUOaMWESDqDG1A0fNPnSL6KYJzsyVnzTI0OVYOHJ363Eapy8voR fnKn8ZYm+nECHEZUV+1yk7X/DQ== X-Received: by 2002:a17:902:d915:: with SMTP id c21mr4588859plz.295.1575684967444; Fri, 06 Dec 2019 18:16:07 -0800 (PST) Received: from localhost (2001-44b8-1113-6700-ac4e-75f4-122e-fbe0.static.ipv6.internode.on.net. [2001:44b8:1113:6700:ac4e:75f4:122e:fbe0]) by smtp.gmail.com with ESMTPSA id r68sm18641871pfr.78.2019.12.06.18.16.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Dec 2019 18:16:06 -0800 (PST) From: Daniel Axtens To: Andrew Morton Cc: kasan-dev@googlegroups.com, linux-mm@kvack.org, aryabinin@virtuozzo.com, glider@google.com, linux-kernel@vger.kernel.org, dvyukov@google.com, daniel@iogearbox.net, cai@lca.pw Subject: Re: [PATCH 1/3] mm: add apply_to_existing_pages helper In-Reply-To: <20191206163853.cdeb5dc80a8622fb6323a8d2@linux-foundation.org> References: <20191205140407.1874-1-dja@axtens.net> <20191206163853.cdeb5dc80a8622fb6323a8d2@linux-foundation.org> Date: Sat, 07 Dec 2019 13:16:02 +1100 Message-ID: <87r21gdgnx.fsf@dja-thinkpad.axtens.net> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > Wouldn't apply_to_existing_page_range() be a better name? I agree with both of those fixups, thanks! Regards, Daniel > > --- a/include/linux/mm.h~mm-add-apply_to_existing_pages-helper-fix-fix > +++ a/include/linux/mm.h > @@ -2621,9 +2621,9 @@ static inline int vm_fault_to_errno(vm_f > typedef int (*pte_fn_t)(pte_t *pte, unsigned long addr, void *data); > extern int apply_to_page_range(struct mm_struct *mm, unsigned long address, > unsigned long size, pte_fn_t fn, void *data); > -extern int apply_to_existing_pages(struct mm_struct *mm, unsigned long address, > - unsigned long size, pte_fn_t fn, > - void *data); > +extern int apply_to_existing_page_range(struct mm_struct *mm, > + unsigned long address, unsigned long size, > + pte_fn_t fn, void *data); > > #ifdef CONFIG_PAGE_POISONING > extern bool page_poisoning_enabled(void); > --- a/mm/memory.c~mm-add-apply_to_existing_pages-helper-fix-fix > +++ a/mm/memory.c > @@ -2184,12 +2184,12 @@ EXPORT_SYMBOL_GPL(apply_to_page_range); > * Unlike apply_to_page_range, this does _not_ fill in page tables > * where they are absent. > */ > -int apply_to_existing_pages(struct mm_struct *mm, unsigned long addr, > - unsigned long size, pte_fn_t fn, void *data) > +int apply_to_existing_page_range(struct mm_struct *mm, unsigned long addr, > + unsigned long size, pte_fn_t fn, void *data) > { > return __apply_to_page_range(mm, addr, size, fn, data, false); > } > -EXPORT_SYMBOL_GPL(apply_to_existing_pages); > +EXPORT_SYMBOL_GPL(apply_to_existing_page_range); > > /* > * handle_pte_fault chooses page fault handler according to an entry which was > _