linux-stable/drivers/virt
Tom Lendacky dd093fb08e virt/sev-guest: Return -EIO if certificate buffer is not large enough
Commit

  47894e0fa6 ("virt/sev-guest: Prevent IV reuse in the SNP guest driver")

changed the behavior associated with the return value when the caller
does not supply a large enough certificate buffer. Prior to the commit a
value of -EIO was returned. Now, 0 is returned.  This breaks the
established ABI with the user.

Change the code to detect the buffer size error and return -EIO.

Fixes: 47894e0fa6 ("virt/sev-guest: Prevent IV reuse in the SNP guest driver")
Reported-by: Larry Dewey <larry.dewey@amd.com>
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Tested-by: Larry Dewey <larry.dewey@amd.com>
Cc: <stable@kernel.org>
Link: https://lore.kernel.org/r/2afbcae6daf13f7ad5a4296692e0a0fe1bc1e4ee.1677083979.git.thomas.lendacky@amd.com
2023-03-01 10:17:46 +01:00
..
acrn virt: acrn: using for_each_set_bit to simplify the code 2022-07-08 15:42:10 +02:00
coco virt/sev-guest: Return -EIO if certificate buffer is not large enough 2023-03-01 10:17:46 +01:00
nitro_enclaves kunit: fix Kconfig for build-in tests USB4 and Nitro Enclaves 2022-09-01 13:00:48 -06:00
vboxguest virt: vbox: Remove unproper information 2022-09-09 10:19:18 +02:00
fsl_hypervisor.c virt: fsl_hypervisor: Replace NO_IRQ by 0 2022-11-10 18:37:37 +01:00
Kconfig virt: Add TDX guest driver 2022-11-17 11:04:23 -08:00
Makefile virt: Add TDX guest driver 2022-11-17 11:04:23 -08:00
vmgenid.c virt: vmgenid: recognize new CID added by Hyper-V 2022-03-25 08:49:40 -06:00