linux-stable/arch/arm/boot/compressed
Arnd Bergmann eaf6cc7165 ARM: 9134/1: remove duplicate memcpy() definition
Both the decompressor code and the kasan logic try to override
the memcpy() and memmove()  definitions, which leading to a clash
in a KASAN-enabled kernel with XZ decompression:

arch/arm/boot/compressed/decompress.c:50:9: error: 'memmove' macro redefined [-Werror,-Wmacro-redefined]
 #define memmove memmove
        ^
arch/arm/include/asm/string.h:59:9: note: previous definition is here
 #define memmove(dst, src, len) __memmove(dst, src, len)
        ^
arch/arm/boot/compressed/decompress.c:51:9: error: 'memcpy' macro redefined [-Werror,-Wmacro-redefined]
 #define memcpy memcpy
        ^
arch/arm/include/asm/string.h:58:9: note: previous definition is here
 #define memcpy(dst, src, len) __memcpy(dst, src, len)
        ^

Here we want the set of functions from the decompressor, so undefine
the other macros before the override.

Link: https://lore.kernel.org/linux-arm-kernel/CACRpkdZYJogU_SN3H9oeVq=zJkRgRT1gDz3xp59gdqWXxw-B=w@mail.gmail.com/
Link: https://lore.kernel.org/lkml/202105091112.F5rmd4By-lkp@intel.com/

Fixes: d6d51a96c7 ("ARM: 9014/2: Replace string mem* functions for KASan")
Fixes: a7f464f3db ("ARM: 7001/2: Wire up support for the XZ decompressor")
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
2021-10-19 10:37:36 +01:00
..
.gitignore ARM: 8969/1: decompressor: simplify libfdt builds 2020-04-29 13:28:59 +01:00
atags_to_fdt.c ARM: 9083/1: uncompress: atags_to_fdt: Spelling s/REturn/Return/ 2021-06-07 12:56:21 +01:00
big-endian.S ARM: 8933/1: replace Sun/Solaris style flag on section directive 2019-11-15 22:21:19 +00:00
debug.S ARM: 9005/1: debug: Select flow control for all debug UARTs 2020-09-15 14:35:28 +01:00
decompress.c ARM: 9134/1: remove duplicate memcpy() definition 2021-10-19 10:37:36 +01:00
efi-header.S efi/libstub: Add missing prototype for PE/COFF entry point 2020-05-23 11:01:57 +02:00
fdt.c ARM: 8969/1: decompressor: simplify libfdt builds 2020-04-29 13:28:59 +01:00
fdt_check_mem_start.c ARM: 9045/1: uncompress: Validate start of physical memory against passed DTB 2021-02-01 19:42:13 +00:00
fdt_ro.c ARM: 8969/1: decompressor: simplify libfdt builds 2020-04-29 13:28:59 +01:00
fdt_rw.c ARM: 8969/1: decompressor: simplify libfdt builds 2020-04-29 13:28:59 +01:00
fdt_wip.c ARM: 8969/1: decompressor: simplify libfdt builds 2020-04-29 13:28:59 +01:00
head-sa1100.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
head-sharpsl.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
head-xscale.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
head.S ARM: 9046/1: decompressor: Do not clear SCTLR.nTLSMD for ARMv7+ cores 2021-02-01 19:42:13 +00:00
ll_char_wr.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
Makefile ARM: 9105/1: atags_to_fdt: don't warn about stack size 2021-08-10 12:17:42 +01:00
misc.c Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm 2018-04-09 09:19:30 -07:00
misc.h ARM: decompressor: fix warning introduced in fortify patch 2018-04-05 23:56:40 +01:00
piggy.S ARM: 8933/1: replace Sun/Solaris style flag on section directive 2019-11-15 22:21:19 +00:00
string.c ARM: 9014/2: Replace string mem* functions for KASan 2020-10-27 12:11:06 +00:00
vmlinux.lds.S ARM development for 5.10-rc1: 2020-10-20 09:18:31 -07:00