]> Git Repo - J-u-boot.git/commitdiff
efi_loader: use byteshift unaligned access helper
authorMasahisa Kojima <[email protected]>
Wed, 3 Nov 2021 02:04:09 +0000 (11:04 +0900)
committerHeinrich Schuchardt <[email protected]>
Sun, 7 Nov 2021 17:36:55 +0000 (18:36 +0100)
Calling unaligned/access-ok.h version of put_unaligned_le64()
causes data abort in arm 32-bit QEMU.

The similar issue also occurs in linux kernel,
unaligned/access-ok.h is no longer used in linux kernel[1].

This commit uses the unaligned/be_byteshift.h and
unaligned/le_byteshift.h helper instead of unaligned/access-ok.h.

[1]https://lore.kernel.org/all/20210507220813[email protected]/

Signed-off-by: Masahisa Kojima <[email protected]>
Reviewed-by: Ilias Apalodimas <[email protected]>
Reviewed-by: Heinrich Schuchardt <[email protected]>
lib/efi_loader/efi_tcg2.c

index ec20530b6b75fba94bc4419fc0c17731736c8dcf..64d3d326795210b4a72b131ddb9fe5490798c0c7 100644 (file)
@@ -22,7 +22,8 @@
 #include <u-boot/sha1.h>
 #include <u-boot/sha256.h>
 #include <u-boot/sha512.h>
-#include <linux/unaligned/access_ok.h>
+#include <linux/unaligned/be_byteshift.h>
+#include <linux/unaligned/le_byteshift.h>
 #include <linux/unaligned/generic.h>
 #include <hexdump.h>
 
This page took 0.045249 seconds and 4 git commands to generate.