linux-stable/drivers/crypto
Brijesh Singh 5441a07a12 crypto: ccp - shutdown SEV firmware on kexec
The commit 97f9ac3db6 ("crypto: ccp - Add support for SEV-ES to the
PSP driver") added support to allocate Trusted Memory Region (TMR)
used during the SEV-ES firmware initialization. The TMR gets locked
during the firmware initialization and unlocked during the shutdown.
While the TMR is locked, access to it is disallowed.

Currently, the CCP driver does not shutdown the firmware during the
kexec reboot, leaving the TMR memory locked.

Register a callback to shutdown the SEV firmware on the kexec boot.

Fixes: 97f9ac3db6 ("crypto: ccp - Add support for SEV-ES to the PSP driver")
Reported-by: Lucas Nussbaum <lucas.nussbaum@inria.fr>
Tested-by: Lucas Nussbaum <lucas.nussbaum@inria.fr>
Cc: <stable@kernel.org>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Joerg Roedel <jroedel@suse.de>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Acked-by: Tom Lendacky <thomas.lendacky@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2021-08-06 19:45:25 +08:00
..
allwinner crypto: sun8i-ss - Use kfree_sensitive 2021-07-30 10:58:35 +08:00
amcc crypto: amcc - fix incorrect kernel-doc comment syntax in files 2021-03-26 20:15:58 +11:00
amlogic crypto: amlogic - Fix the parameter of dma_unmap_sg() 2021-03-26 20:02:34 +11:00
axis
bcm crypto: bcm - Fix a whole host of kernel-doc misdemeanours 2021-03-26 20:02:35 +11:00
caam crypto: caam - Provide the name of the function and provide missing descriptions 2021-03-26 20:02:36 +11:00
cavium crypto: cavium/nitrox - Fix an error rhandling path in 'nitrox_probe()' 2021-06-11 15:08:06 +08:00
ccp crypto: ccp - shutdown SEV firmware on kexec 2021-08-06 19:45:25 +08:00
ccree crypto: ccree - Remove redundant dev_err call in init_cc_resources() 2021-04-16 21:16:32 +10:00
chelsio crypto: chelsio/chcr - Remove useless MODULE_VERSION 2021-04-22 17:31:31 +10:00
gemini crypto: sl3516 - Typo s/Stormlink/Storlink/ 2021-06-28 11:28:08 +08:00
hisilicon crypto: hisilicon/sec - fix the process of disabling sva prefetching 2021-06-28 11:28:09 +08:00
inside-secure crypto: inside-secure - Minor typo fix in the file safexcel.c 2021-03-26 20:02:35 +11:00
keembay crypto: keembay - Remove redundant dev_err calls 2021-04-16 21:16:32 +10:00
marvell crypto: marvell/cesa - change FPGA indirect article to an 2021-06-17 15:07:30 +08:00
nx powerpc updates for 5.14 2021-07-02 12:54:34 -07:00
qat crypto: qat - ratelimit invalid ioctl message and print the invalid cmd 2021-06-28 11:28:08 +08:00
qce crypto: qce - fix error return code in qce_skcipher_async_req_handle() 2021-06-11 15:03:29 +08:00
rockchip crypto: rockchip - delete unneeded variable initialization 2021-04-09 17:45:13 +10:00
stm32 crypto: stm32/cryp - Fix PM reference leak on stm32-cryp.c 2021-04-16 21:16:33 +10:00
ux500 crypto: ux500 - Fix error return code in hash_hw_final() 2021-05-14 19:07:58 +08:00
virtio
vmx crypto: vmx - fix incorrect kernel-doc comment syntax in files 2021-03-26 20:15:58 +11:00
xilinx
atmel-aes-regs.h
atmel-aes.c crypto: atmel-aes - use swap() 2021-07-30 10:58:37 +08:00
atmel-authenc.h
atmel-ecc.c crypto: atmel-ecc - Struct headers need to start with keyword 'struct' 2021-03-26 20:02:36 +11:00
atmel-i2c.c crypto: atmel - use the correct print format 2021-04-16 21:16:33 +10:00
atmel-i2c.h
atmel-sha-regs.h
atmel-sha.c crypto: atmel - use the correct print format 2021-04-16 21:16:33 +10:00
atmel-sha204a.c
atmel-tdes-regs.h
atmel-tdes.c crypto: atmel - Set OFB's blocksize to 1 2021-07-30 10:58:34 +08:00
exynos-rng.c
geode-aes.c crypto: geode - use DEFINE_SPINLOCK() for spinlock 2021-04-16 21:16:31 +10:00
geode-aes.h
hifn_795x.c
img-hash.c crypto: img-hash - Remove redundant dev_err call in img_hash_probe() 2021-04-16 21:16:32 +10:00
ixp4xx_crypto.c ARM: SoC changes for 5.14 2021-07-10 09:22:44 -07:00
Kconfig crypto: sl3516 - Add dependency on ARCH_GEMINI 2021-06-28 11:28:08 +08:00
Makefile crypto: sl3516 - Add sl3516 crypto engine 2021-06-11 15:03:29 +08:00
mxs-dcp.c crypto: mxs-dcp - Use sg_mapping_iter to copy data 2021-07-16 15:49:34 +08:00
n2_asm.S
n2_core.c
n2_core.h
omap-aes-gcm.c
omap-aes.c crypto: omap-aes - Fix PM reference leak on omap-aes.c 2021-04-16 21:16:33 +10:00
omap-aes.h
omap-crypto.c crypto: omap - Drop obsolete PageSlab check 2021-06-28 11:28:08 +08:00
omap-crypto.h
omap-des.c crypto: omap-des - using pm_runtime_resume_and_get instead of pm_runtime_get_sync 2021-06-11 15:03:28 +08:00
omap-sham.c crypto: omap-sham - drop pm_runtime_irqsafe() usage 2021-08-06 19:45:24 +08:00
padlock-aes.c
padlock-sha.c
qcom-rng.c
s5p-sss.c crypto: s5p-sss - consistently use local 'dev' variable in probe() 2021-04-22 17:31:31 +10:00
sa2ul.c crypto: sa2ul - Remove unused auth_len variable 2021-06-24 14:51:34 +08:00
sa2ul.h crypto: sa2ul - Add support for AM64 2021-04-22 17:31:30 +10:00
sahara.c
talitos.c
talitos.h