mirror-linux/drivers/virt/coco
Carlos López fd948c3f96 virt: sev-guest: Explicitly leak pages in unknown state
When set_memory_{encrypted,decrypted}() fail, the user cannot know at which
point the function failed, meaning that the pages are left in an unknown state
from the point of view of the caller.

Since the pages may be left in an unencrypted state, they are not suitable for
general use, and cannot be returned safely to the buddy allocator. Avoid the
issue by never freeing the pages, and then do the proper accounting by calling
snp_leak_pages().

Fixes: 3e385c0d6c ("virt: sev-guest: Move SNP Guest Request data pages handling under snp_cmd_mutex")
Signed-off-by: Carlos López <clopez@suse.de>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Cc: stable@kernel.org
2026-05-20 18:03:17 -07:00
..
arm-cca-guest virt: arm-cca-guest: fix error check for RSI_INCOMPLETE 2026-04-14 16:26:08 +01:00
efi_secret arm64: Enable EFI secret area Securityfs support 2025-09-19 10:12:01 +01:00
guest coco/guest: Remove unneeded selection of CRYPTO 2026-03-19 10:57:22 -07:00
pkvm-guest drivers/virt: pkvm: Add Kconfig dependency on DMA_RESTRICTED_POOL 2026-03-30 16:58:09 +01:00
sev-guest virt: sev-guest: Explicitly leak pages in unknown state 2026-05-20 18:03:17 -07:00
tdx-guest - Print TDX module version during boot 2026-04-14 14:42:55 -07:00
Kconfig virt: Fix Kconfig warning when selecting TSM without VIRT_DRIVERS 2025-12-04 17:34:16 -08:00
Makefile coco/tsm: Introduce a core device for TEE Security Managers 2025-11-03 19:27:40 -08:00
tsm-core.c virt: coco: change tsm_class to a const struct 2026-04-02 15:45:18 -07:00