summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMasahisa Kojima <masahisa.kojima@linaro.org>2021-11-03 11:04:09 +0900
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2021-11-07 18:36:55 +0100
commit14cbb330fe8e2723871926a3806954393da83cce (patch)
tree78d18784419b44ae18a6a443229073dc580f8b00 /lib
parent50b05eb6060a67d2cdf9b5114c4575e3f803551e (diff)
downloadu-boot-14cbb330fe8e2723871926a3806954393da83cce.tar.gz
u-boot-14cbb330fe8e2723871926a3806954393da83cce.tar.bz2
u-boot-14cbb330fe8e2723871926a3806954393da83cce.zip
efi_loader: use byteshift unaligned access helper
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.365382-8-arnd@kernel.org/ Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/efi_loader/efi_tcg2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/efi_loader/efi_tcg2.c b/lib/efi_loader/efi_tcg2.c
index ec20530b6b..64d3d32679 100644
--- a/lib/efi_loader/efi_tcg2.c
+++ b/lib/efi_loader/efi_tcg2.c
@@ -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>