shadow.c:(.text+0x80): multiple definition of `memset'; arch/x86/lib/memset_64.o:(.noinstr.text+0x0): first defined here

From: kernel test robot
Date: Mon Aug 21 2023 - 11:47:57 EST


Hi Peter,

First bad commit (maybe != root cause):

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f7757129e3dea336c407551c98f50057c22bb266
commit: 69d4c0d3218692ffa56b0e1b9c76c50c699d7044 entry, kasan, x86: Disallow overriding mem*() functions
date: 7 months ago
config: um-randconfig-r036-20230821 (https://download.01.org/0day-ci/archive/20230821/202308212351.kgRGqTiM-lkp@xxxxxxxxx/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230821/202308212351.kgRGqTiM-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308212351.kgRGqTiM-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

ld: mm/kasan/shadow.o: in function `memset':
>> shadow.c:(.text+0x80): multiple definition of `memset'; arch/x86/lib/memset_64.o:(.noinstr.text+0x0): first defined here
ld: mm/kasan/shadow.o: in function `memmove':
>> shadow.c:(.text+0x100): multiple definition of `memmove'; arch/x86/lib/memmove_64.o:(.noinstr.text+0x0): first defined here
ld: mm/kasan/shadow.o: in function `memcpy':
>> shadow.c:(.text+0x180): multiple definition of `memcpy'; arch/x86/lib/memcpy_64.o:(.noinstr.text+0x0): first defined here

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki