Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754862AbbB0O4h (ORCPT ); Fri, 27 Feb 2015 09:56:37 -0500 Received: from www62.your-server.de ([213.133.104.62]:47857 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932106AbbB0Ozz (ORCPT ); Fri, 27 Feb 2015 09:55:55 -0500 From: Daniel Borkmann To: davem@davemloft.net Cc: ast@plumgrid.com, netdev@vger.kernel.org, Daniel Borkmann , Bruce Allan , Jesse Brandeburg , Ingo Molnar , linux-kernel@vger.kernel.org Subject: [PATCH net-next 08/10] x86: unexport set_memory_ro and set_memory_rw Date: Fri, 27 Feb 2015 15:55:40 +0100 Message-Id: X-Mailer: git-send-email 1.9.3 In-Reply-To: References: In-Reply-To: References: X-Authenticated-Sender: daniel@iogearbox.net Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1678 Lines: 47 This effectively unexports set_memory_ro and set_memory_rw functions, and thus reverts a03352d2c1dc ("x86: export set_memory_ro and set_memory_rw"). They have been introduced for debugging purposes in e1000e, but no module user is in mainline kernel (anymore?) and we explicitly do not want modules to use these functions, as they i.e. protect eBPF (interpreted & JIT'ed) images from malicious modifications or bugs. Outside of eBPF scope, I believe also other set_memory_* functions should be unexported on x86 for modules. Signed-off-by: Daniel Borkmann Cc: Bruce Allan Cc: Jesse Brandeburg Cc: Ingo Molnar Cc: linux-kernel@vger.kernel.org Acked-by: Alexei Starovoitov --- arch/x86/mm/pageattr.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index 536ea2f..81e8282 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c @@ -1654,13 +1654,11 @@ int set_memory_ro(unsigned long addr, int numpages) { return change_page_attr_clear(&addr, numpages, __pgprot(_PAGE_RW), 0); } -EXPORT_SYMBOL_GPL(set_memory_ro); int set_memory_rw(unsigned long addr, int numpages) { return change_page_attr_set(&addr, numpages, __pgprot(_PAGE_RW), 0); } -EXPORT_SYMBOL_GPL(set_memory_rw); int set_memory_np(unsigned long addr, int numpages) { -- 1.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/