lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2db152db-2333-4aac-8d77-fa32f850df91@amd.com>
Date: Tue, 30 Dec 2025 15:30:09 +0100
From: "Gupta, Pankaj" <pankaj.gupta@....com>
To: Carlos López <clopez@...e.de>, kvm@...r.kernel.org,
 seanjc@...gle.com, pbonzini@...hat.com
Cc: tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
 dave.hansen@...ux.intel.com, x86@...nel.org, hpa@...or.com,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/6] KVM: SEV: use mutex guards for simpler error handling


> Replace several uses of mutex_lock() / mutex_unlock() pairs with mutex
> guards, which are less error-prone and help simplify error paths,
> allowing removal of all gotos in some functions. This removes around 40
> lines of code in total.
>
> This does not remove all uses of the manual lock APIs, only those that
> have their error handling improved by switching to the newer API.
>
> Changes are separated per-function for ease of review.
>
> Carlos López (6):
>    KVM: SEV: use mutex guard in snp_launch_update()
>    KVM: SEV: use mutex guard in sev_mem_enc_ioctl()
>    KVM: SEV: use mutex guard in sev_mem_enc_register_region()
>    KVM: SEV: use mutex guard in sev_mem_enc_unregister_region()
>    KVM: SEV: use mutex guard in snp_handle_guest_req()
>    KVM: SEV: use scoped mutex guard in sev_asid_new()
>
>   arch/x86/kvm/svm/sev.c | 135 ++++++++++++++---------------------------
>   1 file changed, 47 insertions(+), 88 deletions(-)


Did a basic boot test on SEV{ES & SNP} VM.

Thanks,

Pankaj

>
>
> base-commit: 0499add8efd72456514c6218c062911ccc922a99

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ