From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 033E1C43603 for ; Sat, 7 Dec 2019 02:16:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7B5A42173E for ; Sat, 7 Dec 2019 02:16:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=axtens.net header.i=@axtens.net header.b="L4n3r/SK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7B5A42173E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=axtens.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B6A016B1902; Fri, 6 Dec 2019 21:16:09 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B197E6B1903; Fri, 6 Dec 2019 21:16:09 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A2F8A6B1904; Fri, 6 Dec 2019 21:16:09 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0093.hostedemail.com [216.40.44.93]) by kanga.kvack.org (Postfix) with ESMTP id 8CBC06B1902 for ; Fri, 6 Dec 2019 21:16:09 -0500 (EST) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 2BE0C8248041 for ; Sat, 7 Dec 2019 02:16:09 +0000 (UTC) X-FDA: 76236730458.11.wound07_8cf7fe0cafc51 X-HE-Tag: wound07_8cf7fe0cafc51 X-Filterd-Recvd-Size: 4562 Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by imf44.hostedemail.com (Postfix) with ESMTP for ; Sat, 7 Dec 2019 02:16:08 +0000 (UTC) Received: by mail-pl1-f196.google.com with SMTP id s10so3487218plp.2 for ; Fri, 06 Dec 2019 18:16:08 -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=Yvg9haVEPZGzFMq2NO2BbQ76lXcLseo/IX4TfsZXgYZP2mM8rrc2PQfjbq+XwdQBHO ObLdqDEnd8loRyIIR73dgQ/KMPyAnK8K8V1w2Hi6PAD490s8Z88i3WyO/ujFlPj5sGQi KLR/QCCWh/7OglygH7pT1kB8H/u6pKHsfIyWeIjfkg4IByql/cYJgDUunyRru75P4ibO y8ykH0TNroldeERZRXKfHL0DB4Hnr9P6t8HpAcZXy/BewWX6XN/saf/gpvp9M1jWwM6w 9OBKUhtuOxel4ruWGhUaGUXNgM6eeIl0C5qToBMDRGobhOGQJKas7fsQmXBTY5BcvDUy 2l+g== X-Gm-Message-State: APjAAAUgQowOHEpplyqocOZy1t/LrB/wViDO/rcUHXcAQyANBC1cosub MJa2t2NbpcZafq6p/MFZWdtO8g== X-Google-Smtp-Source: APXvYqzk7AcyhY9I486phyYFPGuUIWDZIdCoQq62Jt7NSsGDj53Z5nIQbPLR9OmJdVqQemtCoAbKfw== 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 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: > > 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 > _