From: Borislav Petkov <bp@suse.de>
To: Peter Gonda <pgonda@google.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>,
Dionna Glaze <dionnaglaze@google.com>,
Michael Roth <michael.roth@amd.com>,
Haowen Bai <baihaowen@meizu.com>,
Yang Yingliang <yangyingliang@huawei.com>,
Marc Orr <marcorr@google.com>,
David Rientjes <rientjes@google.com>,
Ashish Kalra <Ashish.Kalra@amd.com>,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH V4] virt: sev: Prevent IV reuse in SNP guest driver
Date: Wed, 16 Nov 2022 18:28:38 +0100 [thread overview]
Message-ID: <Y3Udxru8Rivbxsui@zn.tnic> (raw)
In-Reply-To: <CAMkAt6rHTgJX1KTjYmbii6dyG7QMxXJxNy1E_eZ8vRWLK9Vc1g@mail.gmail.com>
On Wed, Nov 16, 2022 at 10:10:58AM -0700, Peter Gonda wrote:
> I think another comment above the first snp_issue_guest_request()
> could help too. Saying once we call this function we either need to
> increment the sequence number or wipe the VMPCK to ensure the
> encryption scheme is safe.
And make that explicit pls:
/*
* If the extended guest request fails due to having to small of a
* certificate data buffer retry the same guest request without the
* extended data request...
... in order to not have to reuse the IV.
I have to admit, the flow in that function is still not optimal but I
haven't stared at it long enough to have a better idea...
Thx.
--
Regards/Gruss,
Boris.
SUSE Software Solutions Germany GmbH
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Martje Boudien Moerman
(HRB 36809, AG Nürnberg)
next prev parent reply other threads:[~2022-11-16 17:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-03 15:23 [PATCH V4] virt: sev: Prevent IV reuse in SNP guest driver Peter Gonda
2022-11-04 17:39 ` Tom Lendacky
2022-11-11 16:46 ` Borislav Petkov
2022-11-14 21:11 ` Peter Gonda
2022-11-15 21:36 ` Borislav Petkov
2022-11-15 21:48 ` Peter Gonda
2022-11-15 21:47 ` Peter Gonda
2022-11-16 12:20 ` Borislav Petkov
2022-11-16 16:23 ` Peter Gonda
2022-11-16 16:58 ` Tom Lendacky
2022-11-16 17:10 ` Peter Gonda
2022-11-16 17:28 ` Borislav Petkov [this message]
2022-11-16 17:57 ` Peter Gonda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y3Udxru8Rivbxsui@zn.tnic \
--to=bp@suse.de \
--cc=Ashish.Kalra@amd.com \
--cc=baihaowen@meizu.com \
--cc=dionnaglaze@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcorr@google.com \
--cc=michael.roth@amd.com \
--cc=pgonda@google.com \
--cc=rientjes@google.com \
--cc=thomas.lendacky@amd.com \
--cc=yangyingliang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox