Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp897784imu; Fri, 11 Jan 2019 11:01:33 -0800 (PST) X-Google-Smtp-Source: ALg8bN7JKM6CwbW8QDW944Q0DTqgA5oYJ8zvpDmtNcPZtejVNIcVgPmLxVh+br+q4TRFKg5rnoIz X-Received: by 2002:a62:442:: with SMTP id 63mr15421034pfe.156.1547233293670; Fri, 11 Jan 2019 11:01:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547233293; cv=none; d=google.com; s=arc-20160816; b=qaJBlV4CFi4X2h3aXmN7mU3gXXrxZqwjtz/SH97t7RhhRrWMmdPWjogvRBjQiZTD26 uavgEU/0MOInhAGdOgt6JQHGS88KqVqni6a/2F0iK109V+3gtjidbnVsTB6p5kLCinNi FZliUL9blapXoBFN3iZHYH7HaPddRIZ2dzT55sfAyzONzJT8N7rlZhWHg40PGPVRrnFj C2+iiSxdAbJD1DNWKGunUmkXq0D3LByTfFDyfzDrlVANtjcW2OgShrIiI99+kUkAxa2a IMo+/uO8KlFwdWHJ6Nfag73/Pj9Q3Fu8ac5qYDevtJWfhDioRv6hjdKmmAxoWuTX2BwG CFNw== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Q2rra4A+/Q5Sy9BkMasx0VIpHJ3wvp5zf8U8/LD4zRY=; b=nteGhHkUXxdhzaYWgEI+GJx4VsLgWGIoCgBHRnv0RtIfJoxvmGcI7FNH5PHvKtvSaV Ce3F4Nre3c1XyUGiy5AwJTf7qjU5Q0FJvSBZD44OMVt4aIH3ob681hE7QfWAeod4iNsL zKhwi1f076qHr3CdIb9baatnBsdlPx6qJr2YT3M8YgJ9qYOufgyj0cvDu/okndFGH5lX qfeD/Kh1yX2HUWvhZD+cfZJdVFt3ZXrWWcEZkJdkikg8pIXNYaAkRXeJ5uZs1GgeaHUp /ACWxwIvb/9/7lHEDFZPp28XTAqtM+82esZ3vptgf0d3EIui+aVfjpX9er9OJ+lQNDaQ awsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RDSNWLax; 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 y1si16730912pgy.174.2019.01.11.11.01.17; Fri, 11 Jan 2019 11:01:33 -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=@kernel.org header.s=default header.b=RDSNWLax; 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 S1733012AbfAKOW5 (ORCPT + 99 others); Fri, 11 Jan 2019 09:22:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:35784 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730832AbfAKOTG (ORCPT ); Fri, 11 Jan 2019 09:19:06 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0E2EB2177B; Fri, 11 Jan 2019 14:19:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547216345; bh=ObGw4xElizEXEUkPdzBo4x/1vip3i5Y7b8VteIiXv5s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RDSNWLaxIDZndWjfTKhoF7LzQV4h66jhVJ8qycwQo424NkGv7H/DRF3+b9gSekCKy qrwVQhEsBGEREdrBJLqDZkUBxOFDgSb/Hv+faSHriNCxA1RG40Z1I3XdQmgCJi1fol U1Q/kwbds0vO93gyrf1+x3kqVj2m88NFCbIGvX2E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Williams , Christoph Hellwig , Michal Hocko , =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= , Balbir Singh , Logan Gunthorpe , Andrew Morton , Linus Torvalds Subject: [PATCH 4.4 66/88] mm, devm_memremap_pages: mark devm_memremap_pages() EXPORT_SYMBOL_GPL Date: Fri, 11 Jan 2019 15:08:35 +0100 Message-Id: <20190111131057.064559895@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190111131045.137499039@linuxfoundation.org> References: <20190111131045.137499039@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dan Williams commit 808153e1187fa77ac7d7dad261ff476888dcf398 upstream. devm_memremap_pages() is a facility that can create struct page entries for any arbitrary range and give drivers the ability to subvert core aspects of page management. Specifically the facility is tightly integrated with the kernel's memory hotplug functionality. It injects an altmap argument deep into the architecture specific vmemmap implementation to allow allocating from specific reserved pages, and it has Linux specific assumptions about page structure reference counting relative to get_user_pages() and get_user_pages_fast(). It was an oversight and a mistake that this was not marked EXPORT_SYMBOL_GPL from the outset. Again, devm_memremap_pagex() exposes and relies upon core kernel internal assumptions and will continue to evolve along with 'struct page', memory hotplug, and support for new memory types / topologies. Only an in-kernel GPL-only driver is expected to keep up with this ongoing evolution. This interface, and functionality derived from this interface, is not suitable for kernel-external drivers. Link: http://lkml.kernel.org/r/154275557457.76910.16923571232582744134.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Reviewed-by: Christoph Hellwig Acked-by: Michal Hocko Cc: "Jérôme Glisse" Cc: Balbir Singh Cc: Logan Gunthorpe Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- kernel/memremap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/memremap.c +++ b/kernel/memremap.c @@ -202,5 +202,5 @@ void *devm_memremap_pages(struct device devres_add(dev, page_map); return __va(res->start); } -EXPORT_SYMBOL(devm_memremap_pages); +EXPORT_SYMBOL_GPL(devm_memremap_pages); #endif /* CONFIG_ZONE_DEVICE */