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
| ||
|
Message-ID: <20170914102444.qki2okelkg3tbsdb@pd.tnic> Date: Thu, 14 Sep 2017 12:24:44 +0200 From: Borislav Petkov <bp@...e.de> To: Brijesh Singh <brijesh.singh@....com> Cc: linux-kernel@...r.kernel.org, x86@...nel.org, kvm@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>, Joerg Roedel <joro@...tes.org>, "Michael S . Tsirkin" <mst@...hat.com>, Paolo Bonzini <pbonzini@...hat.com>, \"Radim Krčmář\" <rkrcmar@...hat.com>, Tom Lendacky <thomas.lendacky@....com> Subject: Re: [RFC Part2 PATCH v3 18/26] KVM: SVM: Add support for SEV LAUNCH_FINISH command On Mon, Jul 24, 2017 at 03:02:55PM -0500, Brijesh Singh wrote: > The command is used for finializing the SEV guest launch process. > > Signed-off-by: Brijesh Singh <brijesh.singh@....com> > --- > arch/x86/kvm/svm.c | 23 +++++++++++++++++++++++ > 1 file changed, 23 insertions(+) > > diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c > index 9b672eb..7a77197 100644 > --- a/arch/x86/kvm/svm.c > +++ b/arch/x86/kvm/svm.c > @@ -6005,6 +6005,25 @@ static int sev_launch_measure(struct kvm *kvm, struct kvm_sev_cmd *argp) > return ret; > } > > +static int sev_launch_finish(struct kvm *kvm, struct kvm_sev_cmd *argp) > +{ > + struct sev_data_launch_finish *data; This one is a very good example why you should do this on the stack: this struct has a single u32 handle; member. The amount of operations to do kzalloc and kfree for a single u32 are simply not justified. -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --
Powered by blists - more mailing lists