mirror-linux/drivers/virt
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
..
acrn Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
coco virt: sev-guest: Explicitly leak pages in unknown state 2026-05-20 18:03:17 -07:00
nitro_enclaves Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
vboxguest Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
Kconfig virt: Fix Kconfig warning when selecting TSM without VIRT_DRIVERS 2025-12-04 17:34:16 -08:00
Makefile virt: coco: Add a coco/Makefile and coco/Kconfig 2023-10-19 18:11:38 -07:00
fsl_hypervisor.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
vmgenid.c Merge branch 'acpi-bus' 2024-05-13 19:15:14 +02:00