linux-stable/drivers/firmware
Borislav Petkov 47e1e233e9 efi/mokvar: Reserve the table only if it is in boot services data
One of the SUSE QA tests triggered:

  localhost kernel: efi: Failed to lookup EFI memory descriptor for 0x000000003dcf8000

which comes from x86's version of efi_arch_mem_reserve() trying to
reserve a memory region. Usually, that function expects
EFI_BOOT_SERVICES_DATA memory descriptors but the above case is for the
MOKvar table which is allocated in the EFI shim as runtime services.

That lead to a fix changing the allocation of that table to boot services.

However, that fix broke booting SEV guests with that shim leading to
this kernel fix

  8d651ee9c7 ("x86/ioremap: Map EFI-reserved memory as encrypted for SEV")

which extended the ioremap hint to map reserved EFI boot services as
decrypted too.

However, all that wasn't needed, IMO, because that error message in
efi_arch_mem_reserve() was innocuous in this case - if the MOKvar table
is not in boot services, then it doesn't need to be reserved in the
first place because it is, well, in runtime services which *should* be
reserved anyway.

So do that reservation for the MOKvar table only if it is allocated
in boot services data. I couldn't find any requirement about where
that table should be allocated in, unlike the ESRT which allocation is
mandated to be done in boot services data by the UEFI spec.

Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2021-07-20 09:28:09 +02:00
..
arm_ffa firmware: arm_ffa: Add support for MEM_* interfaces 2021-05-26 22:38:43 +01:00
arm_scmi ARM SCMI updates for v5.14 2021-06-12 08:42:29 -07:00
broadcom firmware: bcm47xx_nvram: inline code checking NVRAM size 2021-03-12 15:53:07 +01:00
efi efi/mokvar: Reserve the table only if it is in boot services data 2021-07-20 09:28:09 +02:00
google kernel.h: split out panic and oops helpers 2021-07-01 11:06:04 -07:00
imx firmware: imx: scu-pd: add missed ADC1 pd 2021-03-29 09:34:37 +08:00
meson firmware: meson-sm: enable build as module 2020-10-26 13:36:05 -07:00
psci ARM development updates for 5.14-rc1: 2021-07-06 11:52:58 -07:00
smccc arm64: smccc: Support SMCCC v1.3 SVE register saving hint 2021-06-08 14:00:12 +01:00
tegra firmware: tegra: bpmp: Fix Tegra234-only builds 2021-06-11 13:31:51 +02:00
xilinx This is the bulk of the pin control changes for the v5.13 kernel cycle 2021-04-30 13:04:30 -07:00
arm_scpi.c ARM SCMI updates for v5.14 2021-06-12 08:42:29 -07:00
arm_sdei.c arm64: sdei: move uaccess logic to arch/arm64/ 2020-12-02 19:46:14 +00:00
dmi-id.c firmware/dmi: Include product_sku info to modalias 2020-10-28 09:51:50 +01:00
dmi-sysfs.c firmware: dmi-sysfs: Replace zero-length array with flexible-array member 2020-06-15 23:08:04 -05:00
dmi_scan.c ASoC: soc-core: fix DMI handling 2021-03-11 13:25:09 +00:00
edd.c
iscsi_ibft.c ibft: Replace zero-length array with flexible-array 2020-06-15 23:08:31 -05:00
iscsi_ibft_find.c
Kconfig Arm Firmware Framework for ARMv8-A(FFA) interface driver 2021-06-15 09:55:19 -07:00
Makefile firmware: arm_ffa: Add initial FFA bus support for device enumeration 2021-05-26 22:36:46 +01:00
memmap.c
pcdp.c
pcdp.h firmware: pcdp: Replace zero-length array with flexible-array 2020-06-15 23:08:32 -05:00
qcom_scm-legacy.c firmware: qcom_scm: Fix kernel-doc function names to match 2021-04-06 21:25:49 -05:00
qcom_scm-smc.c firmware: qcom_scm: Reduce locking section for __get_convention() 2021-04-06 21:25:23 -05:00
qcom_scm.c firmware: qcom_scm: Add MDM9607 compatible 2021-06-10 11:26:45 -05:00
qcom_scm.h firmware: qcom_scm: Reduce locking section for __get_convention() 2021-04-06 21:25:23 -05:00
qemu_fw_cfg.c qemu_fw_cfg: Make fw_cfg_rev_attr a proper kobj_attribute 2021-06-29 13:25:20 -07:00
raspberrypi.c firmware: raspberrypi: Introduce devm_rpi_firmware_get() 2021-03-22 17:59:51 +01:00
scpi_pm_domain.c
stratix10-rsu.c firmware: stratix10-rsu: fix warnings 2020-07-02 14:48:48 +02:00
stratix10-svc.c firmware: stratix10-svc: Fix a resource leak in an error handling path 2021-05-27 14:50:34 +02:00
ti_sci.c firmware: ti_sci: rm: Remove unused config() from ti_sci_rm_ringacc_ops 2020-11-01 19:38:04 -08:00
ti_sci.h firmware: ti_sci: rm: Add new ops for ring configuration 2020-11-01 19:38:02 -08:00
trusted_foundations.c firmware: tf: Different way of L2 cache enabling after LP2 suspend 2020-05-06 18:27:26 +02:00
turris-mox-rwtm.c mvebu drivers for 5.14 (part 1) 2021-06-23 18:57:40 -07:00