lkml.org 
[lkml]   [2014]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] mips: export icache_flush_range
From
On Sat, Mar 22, 2014 at 9:47 AM, Kees Cook <keescook@chromium.org> wrote:
> 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. :)

Okay, now tested. I reproduced the failure and this patch fixes it. :)

-Kees

> ---
> 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



--
Kees Cook
Chrome OS Security


\
 
 \ /
  Last update: 2014-03-22 20:41    [W:0.067 / U:0.836 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site