[PATCH] kfence: fix implicit function declaration

Alexander Potapenko glider at google.com
Fri Dec 4 07:29:01 EST 2020


On Fri, Dec 4, 2020 at 1:18 PM Anders Roxell <anders.roxell at linaro.org> wrote:
>
> When building kfence the following error shows up:
>
> In file included from mm/kfence/report.c:13:
> arch/arm64/include/asm/kfence.h: In function ‘kfence_protect_page’:
> arch/arm64/include/asm/kfence.h:12:2: error: implicit declaration of function ‘set_memory_valid’ [-Werror=implicit-function-declaration]
>    12 |  set_memory_valid(addr, 1, !protect);
>       |  ^~~~~~~~~~~~~~~~
>
> Use the correct include both
> f2b7c491916d ("set_memory: allow querying whether set_direct_map_*() is actually enabled")
> and 4c4c75881536 ("arm64, kfence: enable KFENCE for ARM64") went in the
> same day via different trees.
>
> Signed-off-by: Anders Roxell <anders.roxell at linaro.org>
Reviewed-by: Alexander Potapenko <glider at google.com>


Thanks!

> ---
>
> I got this build error in todays next-20201204.
> Andrew, since both patches are in your -mm tree, I think this can be
> folded into 4c4c75881536 ("arm64, kfence: enable KFENCE for ARM64")
>
>  arch/arm64/include/asm/kfence.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/include/asm/kfence.h b/arch/arm64/include/asm/kfence.h
> index 6c0afeeab635..c44bb368a810 100644
> --- a/arch/arm64/include/asm/kfence.h
> +++ b/arch/arm64/include/asm/kfence.h
> @@ -3,7 +3,7 @@
>  #ifndef __ASM_KFENCE_H
>  #define __ASM_KFENCE_H
>
> -#include <asm/cacheflush.h>
> +#include <asm/set_memory.h>
>
>  static inline bool arch_kfence_init_pool(void) { return true; }
>
> --
> 2.29.2
>


-- 
Alexander Potapenko
Software Engineer

Google Germany GmbH
Erika-Mann-Straße, 33
80636 München

Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg



More information about the linux-arm-kernel mailing list