From: David Rientjes <rientjes@google.com>
To: Jacky Li <jackyli@google.com>
Cc: Brijesh Singh <brijesh.singh@amd.com>,
Tom Lendacky <thomas.lendacky@amd.com>,
John Allen <john.allen@amd.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Marc Orr <marcorr@google.com>, Alper Gun <alpergun@google.com>,
Peter Gonda <pgonda@google.com>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] crypto: ccp - Initialize PSP when reading psp data file failed
Date: Tue, 16 Aug 2022 14:25:02 -0700 (PDT) [thread overview]
Message-ID: <8feee515-8d60-dc84-4c9f-6723481e8dac@google.com> (raw)
In-Reply-To: <20220816193209.4057566-2-jackyli@google.com>
On Tue, 16 Aug 2022, Jacky Li wrote:
> Currently the OS fails the PSP initialization when the file specified at
> 'init_ex_path' does not exist or has invalid content. However the SEV
> spec just requires users to allocate 32KB of 0xFF in the file, which can
> be taken care of by the OS easily.
>
> To improve the robustness during the PSP init, leverage the retry
> mechanism and continue the init process:
>
> Before the first INIT_EX call, if the content is invalid or missing,
> continue the process by feeding those contents into PSP instead of
> aborting. PSP will then override it with 32KB 0xFF and return
> SEV_RET_SECURE_DATA_INVALID status code. In the second INIT_EX call,
> this 32KB 0xFF content will then be fed and PSP will write the valid
> data to the file.
>
> In order to do this, sev_read_init_ex_file should only be called once
> for the first INIT_EX call. Calling it again for the second INIT_EX call
> will cause the invalid file content overwriting the valid 32KB 0xFF data
> provided by PSP in the first INIT_EX call.
>
> Co-developed-by: Peter Gonda <pgonda@google.com>
> Signed-off-by: Peter Gonda <pgonda@google.com>
> Signed-off-by: Jacky Li <jackyli@google.com>
> Reported-by: Alper Gun <alpergun@google.com>
Acked-by: David Rientjes <rientjes@google.com>
next prev parent reply other threads:[~2022-08-16 21:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-16 19:32 [PATCH v2 0/2] Improve error handling during INIT_EX file initialization Jacky Li
2022-08-16 19:32 ` [PATCH v2 1/2] crypto: ccp - Initialize PSP when reading psp data file failed Jacky Li
2022-08-16 21:25 ` David Rientjes [this message]
2022-08-25 19:41 ` Tom Lendacky
2022-08-16 19:32 ` [PATCH v2 2/2] crypto: ccp - Fail the PSP initialization when writing " Jacky Li
2022-08-16 21:25 ` David Rientjes
2022-08-25 19:42 ` Tom Lendacky
2022-08-26 11:04 ` [PATCH v2 0/2] Improve error handling during INIT_EX file initialization Herbert Xu
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=8feee515-8d60-dc84-4c9f-6723481e8dac@google.com \
--to=rientjes@google.com \
--cc=alpergun@google.com \
--cc=brijesh.singh@amd.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=jackyli@google.com \
--cc=john.allen@amd.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcorr@google.com \
--cc=pgonda@google.com \
--cc=thomas.lendacky@amd.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;
as well as URLs for NNTP newsgroup(s).