Re: [PATCH v2 5/5] arm64: add KASan support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andrey Ryabinin <a.ryabinin <at> samsung.com> writes:

> +#if defined(CONFIG_KASAN) && !defined(__SANITIZE_ADDRESS__)
> +
> +/*
> + * For files that not instrumented (e.g. mm/slub.c) we
> + * should use not instrumented version of mem* functions.
> + */
> +
> +#define memcpy(dst, src, len) __memcpy(dst, src, len)
> +#define memmove(dst, src, len) __memmove(dst, src, len)
> +#define memset(s, c, n) __memset(s, c, n)
> +#endif


In arch/arm64/kernel/arm64ksyms.c, the memcpy, memmove, and memset functions
are exported via EXPORT_SYMBOL().
In this patch you add __memcpy etc, which will be used directly by modules
if the above #if condition is met.
I believe that EXPORT_SYMBOL() is necessary for __memcpy etc as well.

One test for this would be compiling test_kasan.c as a module with
KASAN_SANITIZE_test_kasan.o := n
CONFIG_KASAN = y

Patrick Daly

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]