As reported by @vegard (and confirmed by myself), KMSAN-enable kernel doesn't link if built with CONFIG_EFI_STUB:
efi-stub-helper.c:(.text+0x1494): undefined reference to `__memcpy'
ld: drivers/firmware/efi/libstub/tpm.o: in function `efi_retrieve_tpm2_eventlog':
tpm.c:(.text+0x19c): undefined reference to `__memcpy'
ld: tpm.c:(.text+0x34e): undefined reference to `__memcpy'
ld: tpm.c:(.text+0x3c5): undefined reference to `__memset'
ld: tpm.c:(.text+0x3f3): undefined reference to `__memcpy'
As reported by @vegard (and confirmed by myself), KMSAN-enable kernel doesn't link if built with
CONFIG_EFI_STUB
: