virt/sev-guest: Return -EIO if certificate buffer is not large enough
47894e0fa6a5 ("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: 47894e0fa6a5 ("virt/sev-guest: Prevent IV reuse in the SNP guest driver")
Reported-by: Larry Dewey <email@example.com>
Signed-off-by: Tom Lendacky <firstname.lastname@example.org>
Signed-off-by: Borislav Petkov (AMD) <email@example.com>
Tested-by: Larry Dewey <firstname.lastname@example.org>
1 file changed