aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/mm
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2015-03-01 05:14:39 -0500
committerWill Deacon <will.deacon@arm.com>2015-03-19 06:43:56 -0400
commite6a2e1b6c24a3993ffbb69a05dda202d2830ad90 (patch)
treee966e4a334395baec1fa3b9e98c4a5f8e6925803 /arch/arm64/mm
parenta8fcd8b192bb15debe1db276e073c6ba9a3fc953 (diff)
arm64: mm: unexport set_memory_ro and set_memory_rw
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. RO-protect eBPF (interpreted and JIT'ed) images from malicious modifications/bugs. Outside of eBPF scope, I believe also other set_memory_* functions should be unexported on arm64 due to non-existant mainline module user. Laura mentioned that they have some uses for modules doing set_memory_*, but none that are in mainline and it's unclear if they would ever get there. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@plumgrid.com> Acked-by: Laura Abbott <lauraa@codeaurora.org> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/mm')
-rw-r--r--arch/arm64/mm/pageattr.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/arm64/mm/pageattr.c b/arch/arm64/mm/pageattr.c
index 1d3ec3ddd84b..e47ed1c5dce1 100644
--- a/arch/arm64/mm/pageattr.c
+++ b/arch/arm64/mm/pageattr.c
@@ -73,7 +73,6 @@ int set_memory_ro(unsigned long addr, int numpages)
73 __pgprot(PTE_RDONLY), 73 __pgprot(PTE_RDONLY),
74 __pgprot(PTE_WRITE)); 74 __pgprot(PTE_WRITE));
75} 75}
76EXPORT_SYMBOL_GPL(set_memory_ro);
77 76
78int set_memory_rw(unsigned long addr, int numpages) 77int set_memory_rw(unsigned long addr, int numpages)
79{ 78{
@@ -81,7 +80,6 @@ int set_memory_rw(unsigned long addr, int numpages)
81 __pgprot(PTE_WRITE), 80 __pgprot(PTE_WRITE),
82 __pgprot(PTE_RDONLY)); 81 __pgprot(PTE_RDONLY));
83} 82}
84EXPORT_SYMBOL_GPL(set_memory_rw);
85 83
86int set_memory_nx(unsigned long addr, int numpages) 84int set_memory_nx(unsigned long addr, int numpages)
87{ 85{