]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: ccp - Fail the PSP initialization when writing psp data file failed
authorJacky Li <jackyli@google.com>
Tue, 16 Aug 2022 19:32:09 +0000 (19:32 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 26 Aug 2022 10:50:07 +0000 (18:50 +0800)
commit60ac438d820657160a9ef780c603a188e1a41475
tree38be91d35b403f1421c6db06fb5d4589a89f6302
parentbd91c4930d7ccc8e1f4b169e8c8fbcfc4d809443
crypto: ccp - Fail the PSP initialization when writing psp data file failed

Currently the OS continues the PSP initialization when there is a write
failure to the init_ex_file. Therefore, the userspace would be told that
SEV is properly INIT'd even though the psp data file is not updated.
This is problematic because later when asked for the SEV data, the OS
won't be able to provide it.

Fixes: aeb89e5549e6 ("crypto: ccp - Add SEV_INIT_EX support")
Reported-by: Peter Gonda <pgonda@google.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Jacky Li <jackyli@google.com>
Acked-by: David Rientjes <rientjes@google.com>
Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccp/sev-dev.c