Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755303AbbB0Tyn (ORCPT ); Fri, 27 Feb 2015 14:54:43 -0500 Received: from foss.arm.com ([217.140.101.70]:44112 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751693AbbB0Tym (ORCPT ); Fri, 27 Feb 2015 14:54:42 -0500 Date: Fri, 27 Feb 2015 19:54:43 +0000 From: Will Deacon To: Daniel Borkmann Cc: "davem@davemloft.net" , "ast@plumgrid.com" , "netdev@vger.kernel.org" , Laura Abbott , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH net-next 09/10] arm64: unexport set_memory_ro and set_memory_rw Message-ID: <20150227195443.GD24818@arm.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1844 Lines: 50 On Fri, Feb 27, 2015 at 02:55:41PM +0000, Daniel Borkmann wrote: > This effectively unexports set_memory_ro and set_memory_rw functions from > commit 11d91a770f1f ("arm64: Add CONFIG_DEBUG_SET_MODULE_RONX support"). > > No module user of those is in mainline kernel and we explicitly do not want > modules to use these functions, as they i.e. protect eBPF (interpreted and > JIT'ed) images from malicious modifications or bugs. > > Outside of eBPF scope, I believe also other set_memory_* functions should > be unexported on arm64 for modules. > > Signed-off-by: Daniel Borkmann > Cc: Laura Abbott > Cc: Will Deacon > Cc: linux-kernel@vger.kernel.org > Acked-by: Alexei Starovoitov > --- > arch/arm64/mm/pageattr.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/arch/arm64/mm/pageattr.c b/arch/arm64/mm/pageattr.c > index bb0ea94..8659357 100644 > --- a/arch/arm64/mm/pageattr.c > +++ b/arch/arm64/mm/pageattr.c > @@ -70,7 +70,6 @@ int set_memory_ro(unsigned long addr, int numpages) > __pgprot(PTE_RDONLY), > __pgprot(PTE_WRITE)); > } > -EXPORT_SYMBOL_GPL(set_memory_ro); > > int set_memory_rw(unsigned long addr, int numpages) > { > @@ -78,7 +77,6 @@ int set_memory_rw(unsigned long addr, int numpages) > __pgprot(PTE_WRITE), > __pgprot(PTE_RDONLY)); > } > -EXPORT_SYMBOL_GPL(set_memory_rw); > > int set_memory_nx(unsigned long addr, int numpages) > { Looks good to me. Can this be applied independently, or does it need to remain part of your series? Will -- 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/