769a8089c1fd2 (x86, efi, kasan: #undef memset/memcpy/memmove per arch) disables the KASAN version of certain memory calls in the EFI boot stub. tpm_eventlog.h references memcpy, so must be included after asm/efi.h in order to allow 769a8089c1fd2 to take effect on its declarations. Signed-off-by: Matthew Garrett <mjg59@xxxxxxxxxx> --- drivers/firmware/efi/libstub/tpm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/firmware/efi/libstub/tpm.c b/drivers/firmware/efi/libstub/tpm.c index b6e93e14fcf1..777c1e82495a 100644 --- a/drivers/firmware/efi/libstub/tpm.c +++ b/drivers/firmware/efi/libstub/tpm.c @@ -8,9 +8,11 @@ * Thiebaud Weksteen <tweek@xxxxxxxxxx> */ #include <linux/efi.h> -#include <linux/tpm_eventlog.h> #include <asm/efi.h> +/* Must be included after asm/efi.h in order to avoid using the wrong memcpy */ +#include <linux/tpm_eventlog.h> + #include "efistub.h" #ifdef CONFIG_RESET_ATTACK_MITIGATION -- 2.21.0.392.gf8f6787159e-goog