Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp927728ybl; Fri, 6 Dec 2019 08:26:52 -0800 (PST) X-Google-Smtp-Source: APXvYqyY+DNElYFuww5Zy1ePvfAIzh+0yKv+GkZLyEov6QClupdgGjTUmVv7jkuQOmJsN5oK3EdB X-Received: by 2002:a05:6808:117:: with SMTP id b23mr12378257oie.8.1575649612464; Fri, 06 Dec 2019 08:26:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575649612; cv=none; d=google.com; s=arc-20160816; b=jyZfkqO6oTCId12f2fsqjOOHcyND6iXUO5+A3LgOKsqhEeATm992m3Y5tExM40oQns qQoQDYM1OBq5Mu7PYiamE7IexIossrZNcvk+7I6wdowt5QwZ1cuH8d1onkNQbZYS92a+ W/twVwiUVF+rDnj12j+RcW9zv7+HikBJyC+tBEfDEOSXWAw87iOzluG8HT6svbx+ttM0 1I6wCItdNmrsaLikeiQ0x5Mjz3ez4JBW2L/HNoEHsQeY+4JjiqbaADztDCBFkJ3MVbNQ sL3MtSyKPeXoFWC0+uzWN5aMP2etFSyI0cV2cAuKQdyn/j8lHleunnfEH/wn600zOO7g e/tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=aaKOwGMmzy/zjiCCtxiebboL7YJc6Xa9oaUziJ7LZ2Y=; b=kUDfHCAjWVp2Eaea3HGPolxOEguGN4bmyHzB/dcO13CQU6GRn84K49/Gsz09kJ7sYt XXBHuUloPR8Yp8uvVYPYavr4oSN5RTyPyzjCqAxMoZCPJl/6crpGKUj+Wkpm+fKESj7Y h/HRtSoo3RMuzPGbN4JaOnteNdlj3gYPibaecQFPEYISJD/MTmcRnfxaRoirHyw3WBdJ TeLMAczowkwE0olG4FWVNWRUIHZFadjSjir1yfUs8hBXn9+rnVEKB+K0BukqplSOOHjA qQ+191x5g7mdIRW+wfKldaEt9xZymo29sAB4g3aMb5geWn7cIQyDyeiY7zEJms99Pn0v BdGw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z8si7213452oto.36.2019.12.06.08.26.39; Fri, 06 Dec 2019 08:26:52 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726584AbfLFQYx (ORCPT + 99 others); Fri, 6 Dec 2019 11:24:53 -0500 Received: from relay.sw.ru ([185.231.240.75]:51334 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726551AbfLFQYw (ORCPT ); Fri, 6 Dec 2019 11:24:52 -0500 Received: from dhcp-172-16-25-5.sw.ru ([172.16.25.5]) by relay.sw.ru with esmtp (Exim 4.92.3) (envelope-from ) id 1idGPK-00009T-Fv; Fri, 06 Dec 2019 19:24:42 +0300 Subject: Re: [PATCH 1/3] mm: add apply_to_existing_pages helper To: Daniel Axtens , kasan-dev@googlegroups.com, linux-mm@kvack.org, glider@google.com, linux-kernel@vger.kernel.org, dvyukov@google.com Cc: daniel@iogearbox.net, cai@lca.pw, Andrew Morton References: <20191205140407.1874-1-dja@axtens.net> From: Andrey Ryabinin Message-ID: Date: Fri, 6 Dec 2019 19:24:25 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0 MIME-Version: 1.0 In-Reply-To: <20191205140407.1874-1-dja@axtens.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/5/19 5:04 PM, Daniel Axtens wrote: > apply_to_page_range takes an address range, and if any parts of it > are not covered by the existing page table hierarchy, it allocates > memory to fill them in. > > In some use cases, this is not what we want - we want to be able to > operate exclusively on PTEs that are already in the tables. > > Add apply_to_existing_pages for this. Adjust the walker functions > for apply_to_page_range to take 'create', which switches them between > the old and new modes. > > This will be used in KASAN vmalloc. > > Signed-off-by: Daniel Axtens Reviewed-by: Andrey Ryabinin