From: Tom Lendacky <thomas.lendacky@amd.com>
To: Jacky Li <jackyli@google.com>,
Brijesh Singh <brijesh.singh@amd.com>,
John Allen <john.allen@amd.com>
Cc: 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] crypto: ccp - Fix the INIT_EX data file open failure
Date: Thu, 21 Apr 2022 08:26:39 -0500 [thread overview]
Message-ID: <bcc2850f-f74b-1e5f-84d0-e860ffe6876e@amd.com> (raw)
In-Reply-To: <20220414162325.1830014-1-jackyli@google.com>
On 4/14/22 11:23, Jacky Li wrote:
> There are 2 common cases when INIT_EX data file might not be
> opened successfully and fail the sev initialization:
>
> 1. In user namespaces, normal user tasks (e.g. VMM) can change their
> current->fs->root to point to arbitrary directories. While
> init_ex_path is provided as a module param related to root file
> system. Solution: use the root directory of init_task to avoid
> accessing the wrong file.
>
> 2. Normal user tasks (e.g. VMM) don't have the privilege to access
> the INIT_EX data file. Solution: open the file as root and
> restore permissions immediately.
>
> Fixes: 3d725965f836 ("crypto: ccp - Add SEV_INIT_EX support")
> Signed-off-by: Jacky Li <jackyli@google.com>
> Reviewed-by: Peter Gonda <pgonda@google.com>
Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
> ---
> Changelog since v1:
> - Added Fixes tag and Reviewed-By tag.
>
> drivers/crypto/ccp/sev-dev.c | 30 ++++++++++++++++++++++++++++--
> 1 file changed, 28 insertions(+), 2 deletions(-)
>
next prev parent reply other threads:[~2022-04-21 13:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-14 16:23 [PATCH v2] crypto: ccp - Fix the INIT_EX data file open failure Jacky Li
2022-04-15 13:49 ` Tom Lendacky
2022-04-15 16:20 ` Peter Gonda
2022-04-21 13:26 ` Tom Lendacky
2022-04-21 13:26 ` Tom Lendacky [this message]
2022-04-29 5:48 ` 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=bcc2850f-f74b-1e5f-84d0-e860ffe6876e@amd.com \
--to=thomas.lendacky@amd.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 \
/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).