All of lore.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@suse.de>
To: Peter Gonda <pgonda@google.com>
Cc: 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: Tue, 15 Nov 2022 22:36:17 +0100	[thread overview]
Message-ID: <Y3QGUb0TVd2M9qow@zn.tnic> (raw)
In-Reply-To: <CAMkAt6p2zXnE-ew+pJk_UpZAEFZFdCOPThNn3hSFqYOQG81t-g@mail.gmail.com>

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)

  reply	other threads:[~2022-11-15 21:36 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 [this message]
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
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=Y3QGUb0TVd2M9qow@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.