2014-02-27 13:41:18

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH -next] xtensa: Export __invalidate_icache_range

When modular code calls flush_icache_range():

ERROR: "__invalidate_icache_range" [drivers/misc/lkdtm.ko] undefined!
make[1]: *** [__modpost] Error 1

Signed-off-by: Geert Uytterhoeven <[email protected]>
---
http://kisskb.ellerman.id.au/kisskb/buildresult/10663772/

arch/xtensa/kernel/xtensa_ksyms.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/xtensa/kernel/xtensa_ksyms.c b/arch/xtensa/kernel/xtensa_ksyms.c
index 80b33ed51f31..88eab32be29e 100644
--- a/arch/xtensa/kernel/xtensa_ksyms.c
+++ b/arch/xtensa/kernel/xtensa_ksyms.c
@@ -105,6 +105,7 @@ EXPORT_SYMBOL(csum_partial_copy_generic);
* Architecture-specific symbols
*/
EXPORT_SYMBOL(__xtensa_copy_user);
+EXPORT_SYMBOL(__invalidate_icache_range);

/*
* Kernel hacking ...
--
1.7.9.5


2014-02-27 18:40:18

by Kees Cook

[permalink] [raw]
Subject: Re: [PATCH -next] xtensa: Export __invalidate_icache_range

On Thu, Feb 27, 2014 at 5:41 AM, Geert Uytterhoeven
<[email protected]> wrote:
> When modular code calls flush_icache_range():
>
> ERROR: "__invalidate_icache_range" [drivers/misc/lkdtm.ko] undefined!
> make[1]: *** [__modpost] Error 1
>
> Signed-off-by: Geert Uytterhoeven <[email protected]>

Ah, good catch!

Reviewed-by: Kees Cook <[email protected]>

-Kees

> ---
> http://kisskb.ellerman.id.au/kisskb/buildresult/10663772/
>
> arch/xtensa/kernel/xtensa_ksyms.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/xtensa/kernel/xtensa_ksyms.c b/arch/xtensa/kernel/xtensa_ksyms.c
> index 80b33ed51f31..88eab32be29e 100644
> --- a/arch/xtensa/kernel/xtensa_ksyms.c
> +++ b/arch/xtensa/kernel/xtensa_ksyms.c
> @@ -105,6 +105,7 @@ EXPORT_SYMBOL(csum_partial_copy_generic);
> * Architecture-specific symbols
> */
> EXPORT_SYMBOL(__xtensa_copy_user);
> +EXPORT_SYMBOL(__invalidate_icache_range);
>
> /*
> * Kernel hacking ...
> --
> 1.7.9.5
>



--
Kees Cook
Chrome OS Security

2014-02-27 21:52:29

by Max Filippov

[permalink] [raw]
Subject: Re: [PATCH -next] xtensa: Export __invalidate_icache_range

On Thu, Feb 27, 2014 at 5:41 PM, Geert Uytterhoeven
<[email protected]> wrote:
> When modular code calls flush_icache_range():
>
> ERROR: "__invalidate_icache_range" [drivers/misc/lkdtm.ko] undefined!
> make[1]: *** [__modpost] Error 1
>
> Signed-off-by: Geert Uytterhoeven <[email protected]>
> ---
> http://kisskb.ellerman.id.au/kisskb/buildresult/10663772/
>
> arch/xtensa/kernel/xtensa_ksyms.c | 1 +
> 1 file changed, 1 insertion(+)

Thanks, applied to my xtensa tree.

-- Max