[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y3QGUb0TVd2M9qow@zn.tnic>
Date: Tue, 15 Nov 2022 22:36:17 +0100
From: Borislav Petkov <bp@...e.de>
To: Peter Gonda <pgonda@...gle.com>
Cc: thomas.lendacky@....com, Dionna Glaze <dionnaglaze@...gle.com>,
Michael Roth <michael.roth@....com>,
Haowen Bai <baihaowen@...zu.com>,
Yang Yingliang <yangyingliang@...wei.com>,
Marc Orr <marcorr@...gle.com>,
David Rientjes <rientjes@...gle.com>,
Ashish Kalra <Ashish.Kalra@....com>,
linux-kernel@...r.kernel.org, kvm@...r.kernel.org
Subject: Re: [PATCH V4] virt: sev: Prevent IV reuse in SNP guest driver
On Mon, Nov 14, 2022 at 02:11:48PM -0700, Peter Gonda wrote:
> Thanks for detailed review. Working on cleaning up the text for a V5.
Yeah, and I have some questions in my reply which you haven't
addressed...
> > > @@ -676,7 +712,7 @@ static int __init sev_guest_probe(struct platform_device *pdev)
> > > if (!snp_dev->response)
> > > goto e_free_request;
> > >
> > > - snp_dev->certs_data = alloc_shared_pages(dev, SEV_FW_BLOB_MAX_SIZE);
> > > + snp_dev->certs_data = alloc_shared_pages(dev, sizeof(*snp_dev->certs_data));
> >
> > What's that change for?
> >
> > I went searching for that ->certs_data only ot realize that it is an
> > array of size of SEV_FW_BLOB_MAX_SIZE elems.
>
> Do you want this change reverted? I liked the extra readability of the
> sizeof(*snp_dev->certs_data) but its unnecessary for this change.
Really?
I think using a define which is a SIZE define is better. Especially if
you look at
sizeof(*snp_dev->certs_data)
and wonder what type ->certs_data is.
And it's not like it'll go out of sync since it is an array of size,
well, SEV_FW_BLOB_MAX_SIZE.
:-)
Thx.
--
Regards/Gruss,
Boris.
SUSE Software Solutions Germany GmbH
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Martje Boudien Moerman
(HRB 36809, AG Nürnberg)
Powered by blists - more mailing lists