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=-5.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 8370EC0650E for ; Mon, 1 Jul 2019 09:58:32 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4023720881 for ; Mon, 1 Jul 2019 09:58:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="baq3AW+H" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4023720881 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Vt7ASUGaj0U2GCA7V2UvIEoHOdeYq285QshSTJoKneI=; b=baq3AW+HYAMDd6 kyHxeSSclO7aZlG7++a5GLAWcd9h67ANt1CVhX5N1nCfBJP2PHOLllj6MlRut+L+c7RcM0XAPg9zG 9jvwjN5nw09LVaIUNXcGxatvBgJikOeORONYD/jqfXOa7MYVbb7j8ncCQ/HA/KFqK5q/+U2UeUDUL 3CBiDHbfR6fq+kjHAtn8HxekU6ZWUfBKv4KQcws6J5CaNYu5Mw/LhgBEwOPzt4sD0LLSy9KXUFIHS H09+baXSxwBwtmMLNDnnMJNsRRq+viVDJ6SmyK6o1F7K85qg7sNwf7sIY2fbZrSnu0E+VBdUlLdvc vGQ10VRodYjo/PFioAnA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hht4y-0002Um-0o; Mon, 01 Jul 2019 09:58:32 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hht4v-0002U7-Hr for linux-arm-kernel@lists.infradead.org; Mon, 01 Jul 2019 09:58:30 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F2FB82B; Mon, 1 Jul 2019 02:58:26 -0700 (PDT) Received: from [10.162.42.133] (p8cg001049571a15.blr.arm.com [10.162.42.133]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C5EAF3F718; Mon, 1 Jul 2019 02:58:24 -0700 (PDT) Subject: Re: [PATCH v2 3/3] mm/vmalloc: fix vmalloc_to_page for huge vmap mappings To: Nicholas Piggin , "linux-mm @ kvack . org" References: <20190701064026.970-1-npiggin@gmail.com> <20190701064026.970-4-npiggin@gmail.com> From: Anshuman Khandual Message-ID: <8369ca48-ebab-fe2d-363d-00769827fd0b@arm.com> Date: Mon, 1 Jul 2019 15:28:51 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190701064026.970-4-npiggin@gmail.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190701_025829_637927_DD367C46 X-CRM114-Status: GOOD ( 13.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christophe Leroy , Mark Rutland , Ard Biesheuvel , Andrew Morton , "linuxppc-dev @ lists . ozlabs . org" , "linux-arm-kernel @ lists . infradead . org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 07/01/2019 12:10 PM, Nicholas Piggin wrote: > vmalloc_to_page returns NULL for addresses mapped by larger pages[*]. > Whether or not a vmap is huge depends on the architecture details, > alignments, boot options, etc., which the caller can not be expected > to know. Therefore HUGE_VMAP is a regression for vmalloc_to_page. > > This change teaches vmalloc_to_page about larger pages, and returns > the struct page that corresponds to the offset within the large page. > This makes the API agnostic to mapping implementation details. > > [*] As explained by commit 029c54b095995 ("mm/vmalloc.c: huge-vmap: > fail gracefully on unexpected huge vmap mappings") > > Signed-off-by: Nicholas Piggin Reviewed-by: Anshuman Khandual _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel