From: Nathaniel McCallum <npmccallum@redhat.com>
To: Connor Kuehl <ckuehl@redhat.com>
Cc: "Lendacky, Thomas" <thomas.lendacky@amd.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
davem@davemloft.net, "Hook, Gary" <gary.hook@amd.com>,
erdemaktas@google.com, rientjes@google.com, "Singh,
Brijesh" <brijesh.singh@amd.com>, Bandan Das <bsd@redhat.com>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/1] crypto: ccp: use file mode for sev ioctl permissions
Date: Fri, 6 Mar 2020 15:48:57 -0500 [thread overview]
Message-ID: <CAOASepNfDLFw_uxbB59hg7B8Rmfaroj9NB8Gw82SFrSOaPbtMQ@mail.gmail.com> (raw)
In-Reply-To: <20200306172010.1213899-1-ckuehl@redhat.com>
On Fri, Mar 6, 2020 at 12:20 PM Connor Kuehl <ckuehl@redhat.com> wrote:
>
> Some background:
>
> My team is working on a project that interacts very closely with
> SEV so we have a layer of code that wraps around the SEV ioctl calls.
> We have an automated test suite that ends up testing these ioctls
> on our test machine.
>
> We are in the process of adding this test machine as a dedicated test
> runner in our continuous integration process. Any time someone opens a
> pull request against our project, this test runner automatically checks
> that code out and executes the tests.
>
> Right now, the SEV ioctls that affect the state of the platform require
> CAP_SYS_ADMIN to run. This is not a capability we can give to an
> automated test runner, because it means that anyone who would like to
> contribute to the project would be able to run any code they want (for
> good or evil) as CAP_SYS_ADMIN on our machine.
>
> This patch replaces the check for CAP_SYS_ADMIN with a check that can
> still be easily controlled by an administrator with the file permissions
> ACL. This way access to the device can still be controlled, but without
> also assigning such broad system privileges at the same time.
>
> Connor Kuehl (1):
> crypto: ccp: use file mode for sev ioctl permissions
>
> drivers/crypto/ccp/sev-dev.c | 33 +++++++++++++++++----------------
> 1 file changed, 17 insertions(+), 16 deletions(-)
>
> --
> 2.24.1
>
One additional note is that this permission structure is more flexible
for general SEV usage anyway, and isn't special-case for our usage.
Currently, the SEV admin commands are mostly limited to public key
certificate management. I would imagine that it would be desirable to
have a sev-admin account which can automate the certificate management
without having CAP_SYS_ADMIN for the rest of the system. So we believe
this patch has broader applicability than just our corner case.
prev parent reply other threads:[~2020-03-06 20:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-06 17:20 [PATCH 0/1] crypto: ccp: use file mode for sev ioctl permissions Connor Kuehl
2020-03-06 17:20 ` [PATCH 1/1] " Connor Kuehl
2020-03-08 21:54 ` David Rientjes
2020-03-09 14:03 ` Nathaniel McCallum
2020-03-10 0:43 ` David Rientjes
2020-03-10 14:37 ` Brijesh Singh
2020-03-10 14:45 ` Bandan Das
2020-03-10 19:02 ` David Rientjes
2020-03-10 19:53 ` Tom Lendacky
2020-03-12 12:40 ` Herbert Xu
2020-03-06 20:48 ` Nathaniel McCallum [this message]
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=CAOASepNfDLFw_uxbB59hg7B8Rmfaroj9NB8Gw82SFrSOaPbtMQ@mail.gmail.com \
--to=npmccallum@redhat.com \
--cc=brijesh.singh@amd.com \
--cc=bsd@redhat.com \
--cc=ckuehl@redhat.com \
--cc=davem@davemloft.net \
--cc=erdemaktas@google.com \
--cc=gary.hook@amd.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rientjes@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).