aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/kvm/x86/nested_exceptions_test.c
diff options
context:
space:
mode:
authorNikunj A Dadhania <[email protected]>2025-03-06 08:17:21 +0000
committerBorislav Petkov (AMD) <[email protected]>2025-03-07 12:34:25 +0000
commitac7c06acaa3738b38e83815ac0f07140ad320f13 (patch)
tree26835ef7d2ce8d93503458fd13334586d86d0325 /tools/testing/selftests/kvm/x86/nested_exceptions_test.c
parentx86/amd_nb: Use rdmsr_safe() in amd_get_mmconfig_range() (diff)
downloadkernel-ac7c06acaa3738b38e83815ac0f07140ad320f13.tar.gz
kernel-ac7c06acaa3738b38e83815ac0f07140ad320f13.zip
virt: sev-guest: Allocate request data dynamically
Commit ae596615d93d ("virt: sev-guest: Reduce the scope of SNP command mutex") narrowed the command mutex scope to snp_send_guest_request(). However, GET_REPORT, GET_DERIVED_KEY, and GET_EXT_REPORT share the req structure in snp_guest_dev. Without the mutex protection, concurrent requests can overwrite each other's data. Fix it by dynamically allocating the request structure. Fixes: ae596615d93d ("virt: sev-guest: Reduce the scope of SNP command mutex") Closes: https://github.com/AMDESE/AMDSEV/issues/265 Reported-by: [email protected] Signed-off-by: Nikunj A Dadhania <[email protected]> Signed-off-by: Alexey Kardashevskiy <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/testing/selftests/kvm/x86/nested_exceptions_test.c')
0 files changed, 0 insertions, 0 deletions