Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp874505ybi; Fri, 14 Jun 2019 04:57:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqx7sU66AsZMZpm4b2mmRO8iRdrYf48zLtj37+KlAJRshMgXU8RYE3H1iFYnMtN7Qpa8RsEL X-Received: by 2002:a17:90a:2023:: with SMTP id n32mr7191282pjc.3.1560513444326; Fri, 14 Jun 2019 04:57:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560513444; cv=none; d=google.com; s=arc-20160816; b=EqyNUIRBpuB7fueQNS1bi4MKC9NFpFqk9PswH2qdQO201qNf3BamX8wiKTJXWJz0xh z0p86jJGOfHM2vk0QLiibHnxsPmwSC14o8/tGkcxFYSniSC8XKmQj96b5ku4TWVMOwB7 uxkqNjgFuZEMG2er2s5g0XYMvtYlADCWOPAy2D3KgUltUHo8cZh/GjtGvFUEYS0kjiVT XvcNomzIMryc/ZbVoPssUDlNScJlRvzhV6osvbKtyGMcMRbGsF7heupLJIsXhz56Tb3e nQ1smpy7VZcKhHbtwX4hQbJNpc3uXRf27pI9nLXp/c8MYKZGJ8Iq8hj+O2F32nd9q4Zv YGfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=sguVOcCD8xzkuKBxAXbNwLoTIO2Bzo3Eiksza5G7pQs=; b=nVNgIPxeojQn9PAmU1D+vIXQxjFwBJVOfyjA9hYhXcNDjs8Cr6FkN+8+0qXxydirsE FENwZr7arXjd56jLy2QRomhAK1VztrDrKJUa4pp6c1tA8Oi5INIwaV8lWoGWCyDbjcWT UEx/yLjKVNkvG5o9vYpnV3PYcTlSYQWdvmlarjIy3WPBe7wwyTCJEDm6MRXMLfdvuHex 6WOHsdB+2TPvQJUIBoDB0nh3kGchyiwIG/7MI0qRtJqmzSirVtmEgmZ0aHdwrJbnA07c Vow5ju+DhUWwyYoncdX4vDxvdFIh24MQoFEfZFfd01VXlh/oNb4nIqzzJupUz1B82I+8 oPaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=cSm5PBNC; 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 i8si2352851pfk.189.2019.06.14.04.57.08; Fri, 14 Jun 2019 04:57:24 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=cSm5PBNC; 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 S1727629AbfFNL5B (ORCPT + 99 others); Fri, 14 Jun 2019 07:57:01 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:33744 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727164AbfFNL5B (ORCPT ); Fri, 14 Jun 2019 07:57:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=sguVOcCD8xzkuKBxAXbNwLoTIO2Bzo3Eiksza5G7pQs=; b=cSm5PBNCt4M8uJZY1qjBxCUXr H5O87c2TUu73yBZbv+rbeId9QKYO7rcOoardZx9weKhgS+3hIMIFgLL4gq0VjjQ41UCQ0DZTJEvBE v9L26qxOd+/i6m3ddYrH901cECMuXIRsttSXQbJ/ac3UCFB6SWlLjHy/J0weQblA0TThiRJPQeWkB rU+VGSfcBuXDneU9uteMmYGcC+aTCn5DvWUt2neAkStNKIfgqTFlWpBFp4a4oUAtJ7MonQrarCOB8 l1CAdU/xZhFdBlq06gHnV/SuU6BN5256YqvNgiiialsn3ZXhyRUV73I2u1viT0U+EGpE+8IZxyp4+ NfcckPLsg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hbkp7-0003dw-4X; Fri, 14 Jun 2019 11:56:49 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id A68CE20A29B4F; Fri, 14 Jun 2019 13:56:47 +0200 (CEST) Date: Fri, 14 Jun 2019 13:56:47 +0200 From: Peter Zijlstra To: "Kirill A. Shutemov" Cc: Andrew Morton , x86@kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Borislav Petkov , Andy Lutomirski , David Howells , Kees Cook , Dave Hansen , Kai Huang , Jacob Pan , Alison Schofield , linux-mm@kvack.org, kvm@vger.kernel.org, keyrings@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH, RFC 49/62] mm, x86: export several MKTME variables Message-ID: <20190614115647.GI3436@hirez.programming.kicks-ass.net> References: <20190508144422.13171-1-kirill.shutemov@linux.intel.com> <20190508144422.13171-50-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190508144422.13171-50-kirill.shutemov@linux.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 08, 2019 at 05:44:09PM +0300, Kirill A. Shutemov wrote: > From: Kai Huang > > KVM needs those variables to get/set memory encryption mask. > > Signed-off-by: Kai Huang > Signed-off-by: Kirill A. Shutemov > --- > arch/x86/mm/mktme.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/arch/x86/mm/mktme.c b/arch/x86/mm/mktme.c > index df70651816a1..12f4266cf7ea 100644 > --- a/arch/x86/mm/mktme.c > +++ b/arch/x86/mm/mktme.c > @@ -7,13 +7,16 @@ > > /* Mask to extract KeyID from physical address. */ > phys_addr_t mktme_keyid_mask; > +EXPORT_SYMBOL_GPL(mktme_keyid_mask); > /* > * Number of KeyIDs available for MKTME. > * Excludes KeyID-0 which used by TME. MKTME KeyIDs start from 1. > */ > int mktme_nr_keyids; > +EXPORT_SYMBOL_GPL(mktme_nr_keyids); > /* Shift of KeyID within physical address. */ > int mktme_keyid_shift; > +EXPORT_SYMBOL_GPL(mktme_keyid_shift); > > DEFINE_STATIC_KEY_FALSE(mktme_enabled_key); > EXPORT_SYMBOL_GPL(mktme_enabled_key); NAK, don't export variables. Who owns the values, who enforces this?