Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2385424ybi; Mon, 17 Jun 2019 04:02:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqxLlTvy1MN9LYdzg0Cjswbjj6TtdQcRCLUkczWsjSnalPH/mRE0xajBNmSW7Sgi6bzp9+WN X-Received: by 2002:a17:902:7e0e:: with SMTP id b14mr83007666plm.257.1560769342981; Mon, 17 Jun 2019 04:02:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560769342; cv=none; d=google.com; s=arc-20160816; b=N/bCwfUteJlce4MRRrNVR+o1SIS2Bsn2n9GeR8hzHOaQFgwn3rql8yj3AIoNtTNuIU EU+5jqYg8xXV6tVZCVB9hxgOGPx+HK8kCtZ40MnI2l+HGTROQ6ExS/oH1FwLT46QAM6S sZjm/vurUxlOZCGHlseKbQPxyeR5aE5FNT9tJX8u/v+oy6f0/Li29V7V83bf7WMoQuQn P4AKXmvc8dwNy4DDsfg2Rj37Xkn00XYScyiSk9WKyXheMpc6A9lPqSPpi7ktP8/5NPY9 mGoJlxaF3Kwh5FHcZW5RmmkYZ8yQBdNO8yl7uV7Es70hlCA4ccYnXrdn5W2hJ48uJVPR YnTQ== 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 :references:in-reply-to:date:cc:to:from:subject:message-id; bh=Qaf+B9Yr7ALXcLt671oylbmPh3oUBy5ZfluH2fNwOPs=; b=LtU0OICFhPmpkhUIkznGRKvt1HUhL8Z84eaJOkhkAnwtnZuR3CGaSkL631QWctXeiF FKIh7yJw3mzW1OzOTyeiuvi7r4Xz+2G4ev/nkxY0lwn4T+6kFxGrfbDqEu7W7NdtDpOO 3CQIFSXlb1NVy5EfeKXvJmdpIbGNTCi9kRCDgMOufyjH42ZKupzkM+1UbTeLcrLao9y6 ZWLNRhBrLKcDUjSitV44yrLIH6SQ+870Cm/k7hN4p42HkBU0B2VlZwAytBMZqmlw/AM7 aYkhIq0Zf9K4f2ePQvfKxjx19pU8vXgiMJ8UoNbSWvaYmGV9MrZvHCN0gB59V6djm0uU gMKA== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v3si8652120pfv.167.2019.06.17.04.02.05; Mon, 17 Jun 2019 04:02:22 -0700 (PDT) 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727802AbfFQLBo (ORCPT + 99 others); Mon, 17 Jun 2019 07:01:44 -0400 Received: from mga04.intel.com ([192.55.52.120]:11211 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727376AbfFQLBo (ORCPT ); Mon, 17 Jun 2019 07:01:44 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jun 2019 04:01:43 -0700 X-ExtLoop1: 1 Received: from khuang2-desk.gar.corp.intel.com ([10.255.91.82]) by fmsmga006.fm.intel.com with ESMTP; 17 Jun 2019 04:01:39 -0700 Message-ID: <1560769298.5187.16.camel@linux.intel.com> Subject: Re: [PATCH, RFC 20/62] mm/page_ext: Export lookup_page_ext() symbol From: Kai Huang To: Peter Zijlstra , "Kirill A. Shutemov" Cc: "Kirill A. Shutemov" , Andrew Morton , x86@kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Borislav Petkov , Andy Lutomirski , David Howells , Kees Cook , Dave Hansen , Jacob Pan , Alison Schofield , linux-mm@kvack.org, kvm@vger.kernel.org, keyrings@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 17 Jun 2019 23:01:38 +1200 In-Reply-To: <20190617093054.GB3419@hirez.programming.kicks-ass.net> References: <20190508144422.13171-1-kirill.shutemov@linux.intel.com> <20190508144422.13171-21-kirill.shutemov@linux.intel.com> <20190614111259.GA3436@hirez.programming.kicks-ass.net> <20190614224443.qmqolaigu5wnf75p@box> <20190617093054.GB3419@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.24.6 (3.24.6-1.fc26) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2019-06-17 at 11:30 +0200, Peter Zijlstra wrote: > On Sat, Jun 15, 2019 at 01:44:43AM +0300, Kirill A. Shutemov wrote: > > On Fri, Jun 14, 2019 at 01:12:59PM +0200, Peter Zijlstra wrote: > > > On Wed, May 08, 2019 at 05:43:40PM +0300, Kirill A. Shutemov wrote: > > > > page_keyid() is inline funcation that uses lookup_page_ext(). KVM is > > > > going to use page_keyid() and since KVM can be built as a module > > > > lookup_page_ext() has to be exported. > > > > > > I _really_ hate having to export world+dog for KVM. This one might not > > > be a real issue, but I itch every time I see an export for KVM these > > > days. > > > > Is there any better way? Do we need to invent EXPORT_SYMBOL_KVM()? :P > > Or disallow KVM (or parts thereof) from being a module anymore. For this particular symbol expose, I don't think its fair to blame KVM since the fundamental reason is because page_keyid() (which calls lookup_page_ext()) being implemented as static inline function in header file, so essentially having any other module who calls page_keyid() will trigger this problem -- in fact IOMMU driver calls page_keyid() too so even w/o KVM lookup_page_ext() needs to be exposed. Thanks, -Kai