WSL2-Linux-Kernel/include
Ard Biesheuvel 494c704f9a efi: Use 32-bit alignment for efi_guid_t
The UEFI spec and EDK2 reference implementation both define EFI_GUID as
struct { u32 a; u16; b; u16 c; u8 d[8]; }; and so the implied alignment
is 32 bits not 8 bits like our guid_t. In some cases (i.e., on 32-bit ARM),
this means that firmware services invoked by the kernel may assume that
efi_guid_t* arguments are 32-bit aligned, and use memory accessors that
do not tolerate misalignment. So let's set the minimum alignment to 32 bits.

Note that the UEFI spec as well as some comments in the EDK2 code base
suggest that EFI_GUID should be 64-bit aligned, but this appears to be
a mistake, given that no code seems to exist that actually enforces that
or relies on it.

Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Cc: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Alexander Graf <agraf@suse.de>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Jeffrey Hugo <jhugo@codeaurora.org>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Peter Jones <pjones@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sai Praneeth Prakhya <sai.praneeth.prakhya@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20190202094119.13230-5-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2019-02-04 08:26:35 +01:00
..
acpi Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-12-26 17:03:51 -08:00
asm-generic Merge branch 'akpm' (patches from Andrew) 2019-01-05 09:16:18 -08:00
clocksource
crypto crypto: skcipher - remove remnants of internal IV generators 2018-12-23 11:52:45 +08:00
drm Merge tag 'drm-intel-fixes-2019-01-11' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes 2019-01-11 10:26:21 +01:00
dt-bindings Mostly driver fixes, but there's a core framework fix in here too. 2019-01-31 23:22:57 -08:00
keys
kvm KVM: arm/arm64: Remove arch timer workqueue 2018-12-19 17:47:07 +00:00
linux efi: Use 32-bit alignment for efi_guid_t 2019-02-04 08:26:35 +01:00
math-emu
media media fixes for v4.20-rc8 2018-12-25 13:11:30 -08:00
memory
misc
net net: tls: Save iv in tls_rec for async crypto requests 2019-01-28 23:05:55 -08:00
pcmcia
ras
rdma RDMA/device: Expose ib_device_try_get(() 2019-01-21 14:33:08 -07:00
scsi 4.21 merge window pull request 2018-12-28 14:57:10 -08:00
soc ARM: SoC driver updates 2018-12-31 17:32:35 -08:00
sound ASoC: Fixes for v5.0 2019-01-18 15:17:17 +01:00
target
trace afs: Fix race in async call refcounting 2019-01-17 15:17:28 +00:00
uapi Second 5.0 rc pull request 2019-02-01 10:39:24 -08:00
video drm/exynos: fimd: Make pixel blend mode configurable 2018-12-14 15:46:15 +09:00
xen arm64/xen: fix xen-swiotlb cache flushing 2019-01-23 22:14:56 +01:00