linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mips: export icache_flush_range
@ 2014-03-22 15:47 Kees Cook
  2014-03-22 19:05 ` Kees Cook
  2014-03-22 21:45 ` Sergei Shtylyov
  0 siblings, 2 replies; 9+ messages in thread
From: Kees Cook @ 2014-03-22 15:47 UTC (permalink / raw)
  To: Paul Gortmaker
  Cc: Ralf Baechle, Sanjay Lal, John Crispin, linux-mips, linux-kernel

The lkdtm module performs tests against executable memory ranges, so
it needs to flush the icache for proper behaviors. Other architectures
already export this, so do the same for MIPS.

Signed-off-by: Kees Cook <keescook@chromium.org>
---
This is currently untested! I'm building a MIPS cross-compiler now...
If someone can validate this fixes the build when lkdtm is a module,
that would be appreciated. :)
---
 arch/mips/mm/cache.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c
index fde7e56d13fe..b3f1df13d9f6 100644
--- a/arch/mips/mm/cache.c
+++ b/arch/mips/mm/cache.c
@@ -38,6 +38,7 @@ void (*__flush_kernel_vmap_range)(unsigned long vaddr, int size);
 void (*__invalidate_kernel_vmap_range)(unsigned long vaddr, int size);
 
 EXPORT_SYMBOL_GPL(__flush_kernel_vmap_range);
+EXPORT_SYMBOL_GPL(flush_icache_range);
 
 /* MIPS specific cache operations */
 void (*flush_cache_sigtramp)(unsigned long addr);
-- 
1.7.9.5


-- 
Kees Cook
Chrome OS Security

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-04-09 19:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-22 15:47 [PATCH] mips: export icache_flush_range Kees Cook
2014-03-22 19:05 ` Kees Cook
2014-04-07 13:58   ` Paul Gortmaker
2014-04-09 19:43     ` Kees Cook
2014-03-22 21:45 ` Sergei Shtylyov
2014-03-22 21:48   ` Sergei Shtylyov
2014-03-22 21:54     ` Sergei Shtylyov
2014-03-22 21:05       ` Kees Cook
2014-03-22 23:41         ` Sergei Shtylyov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).