mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 21:21:09 -04:00
Commit47894e0fa6("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 <[email protected]> Signed-off-by: Tom Lendacky <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Tested-by: Larry Dewey <[email protected]> Cc: <[email protected]> Link: https://lore.kernel.org/r/2afbcae6daf13f7ad5a4296692e0a0fe1bc1e4ee.1677083979.git.thomas.lendacky@amd.com