From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752591AbdKHUsB (ORCPT ); Wed, 8 Nov 2017 15:48:01 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:48411 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751728AbdKHUsA (ORCPT ); Wed, 8 Nov 2017 15:48:00 -0500 Date: Wed, 8 Nov 2017 21:47:45 +0100 (CET) From: Thomas Gleixner To: Jiri Kosina cc: Ingo Molnar , "H. Peter Anvin" , Tom Lendacky , Borislav Petkov , Linus Torvalds , LKML , linux-mm@kvack.org, x86@kernel.org, Greg KH Subject: Re: [PATCH] x86/mm: Unbreak modules that rely on external PAGE_KERNEL availability In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 8 Nov 2017, Jiri Kosina wrote: > From: Jiri Kosina > > Commit > > 7744ccdbc16f0 ("x86/mm: Add Secure Memory Encryption (SME) support") > > as a side-effect made PAGE_KERNEL all of a sudden unavailable to modules > which can't make use of EXPORT_SYMBOL_GPL() symbols. > > This is because once SME is enabled, sme_me_mask (which is introduced as > EXPORT_SYMBOL_GPL) makes its way to PAGE_KERNEL through _PAGE_ENC, causing > imminent build failure for all the modules which make use of all the > EXPORT-SYMBOL()-exported API (such as vmap(), __vmalloc(), > remap_pfn_range(), ...). > > Exporting (as EXPORT_SYMBOL()) interfaces (and having done so for ages) > that take pgprot_t argument, while making it impossible to -- all of a > sudden -- pass PAGE_KERNEL to it, feels rather incosistent. > > Restore the original behavior and make it possible to pass PAGE_KERNEL to > all its EXPORT_SYMBOL() consumers. To be honest, I fundamentaly hate this, because proprietary crap out there more or less holds the kernel hostage in its decisions of marking new functionality GPL only. You have already a choice by disabling SME, but sure you want to get everything: new features and proprietary stuff. I fear, that I can't prevent this from being applied, but whoever picks up that patch, please add: Despised-by: Thomas Gleixner