linux/drivers/crypto/ccp
Brijesh Singh ec310caf13 crypto: ccp - add SEV command privilege separation
Currently, there is no privilege separation of the SEV command; you can
run them all or none of them. This is less than ideal because it means
that a compromise of the code which launches VMs could make permanent
change to the SEV certifcate chain which will affect others.

These commands are required to attest the VM environment:
 - SEV_PDH_CERT_EXPORT
 - SEV_PLATFORM_STATUS
 - SEV_GET_{ID,ID2}

These commands manage the SEV certificate chain:
 - SEV_PEK_CERR_IMPORT
 - SEV_FACTORY_RESET
 - SEV_PEK_GEN
 - SEV_PEK_CSR
 - SEV_PDH_GEN

Lets add the CAP_SYS_ADMIN check for the group of the commands which alters
the SEV certificate chain to provide some level of privilege separation.

Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Gary Hook <gary.hook@amd.com>
Cc: Erdem Aktas <erdemaktas@google.com>
Cc: Tom Lendacky <Thomas.Lendacky@amd.com>
Tested-by: David Rientjes <rientjes@google.com>
Co-developed-by: David Rientjes <rientjes@google.com>
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2019-11-22 18:48:35 +08:00
..
ccp-crypto-aes-cmac.c crypto: ccp - move to AES library for CMAC key derivation 2019-07-26 14:58:13 +10:00
ccp-crypto-aes-galois.c crypto: ccp - switch from ablkcipher to skcipher 2019-11-17 09:02:45 +08:00
ccp-crypto-aes-xts.c crypto: ccp - switch from ablkcipher to skcipher 2019-11-17 09:02:45 +08:00
ccp-crypto-aes.c crypto: ccp - switch from ablkcipher to skcipher 2019-11-17 09:02:45 +08:00
ccp-crypto-des3.c crypto: ccp - switch from ablkcipher to skcipher 2019-11-17 09:02:45 +08:00
ccp-crypto-main.c crypto: ccp - switch from ablkcipher to skcipher 2019-11-17 09:02:45 +08:00
ccp-crypto-rsa.c crypto: ccp - Switch to SPDX license identifiers 2019-07-03 22:13:12 +08:00
ccp-crypto-sha.c crypto: ccp - Switch to SPDX license identifiers 2019-07-03 22:13:12 +08:00
ccp-crypto.h crypto: ccp - switch from ablkcipher to skcipher 2019-11-17 09:02:45 +08:00
ccp-debugfs.c crypto: ccp - Switch to SPDX license identifiers 2019-07-03 22:13:12 +08:00
ccp-dev-v3.c crypto: ccp - Remove unnecessary linux/pci.h include 2019-08-09 15:12:30 +10:00
ccp-dev-v5.c crypto: ccp - Verify access to device registers before initializing 2019-10-26 02:09:59 +11:00
ccp-dev.c crypto: ccp - Change a message to reflect status instead of failure 2019-10-26 02:09:59 +11:00
ccp-dev.h crypto: ccp - Remove unnecessary linux/pci.h include 2019-08-09 15:12:30 +10:00
ccp-dmaengine.c crypto: ccp - fix uninitialized list head 2019-10-26 02:10:00 +11:00
ccp-ops.c crypto: ccp - Release all allocated memory if sha type is invalid 2019-10-05 01:06:20 +10:00
Kconfig crypto: skcipher - rename the crypto_blkcipher module and kconfig option 2019-11-01 13:42:47 +08:00
Makefile crypto: ccp - Make CCP debugfs support optional 2019-07-26 22:08:03 +10:00
psp-dev.c crypto: ccp - add SEV command privilege separation 2019-11-22 18:48:35 +08:00
psp-dev.h crypto: ccp - add SEV command privilege separation 2019-11-22 18:48:35 +08:00
sp-dev.c crypto: ccp - Switch to SPDX license identifiers 2019-07-03 22:13:12 +08:00
sp-dev.h crypto: ccp - Remove unnecessary linux/pci.h include 2019-08-09 15:12:30 +10:00
sp-pci.c crypto: ccp - Switch to SPDX license identifiers 2019-07-03 22:13:12 +08:00
sp-platform.c crypto: ccp - use devm_platform_ioremap_resource() to simplify code 2019-08-09 15:11:59 +10:00