linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko@kernel.org>
To: Sumit Garg <sumit.garg@linaro.org>
Cc: keyrings@vger.kernel.org, jejb@linux.ibm.com,
	zohar@linux.ibm.com, linux-integrity@vger.kernel.org,
	linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Jerome Forissier <jerome.forissier@linaro.org>
Subject: Re: [PATCH] KEYS: trusted: tee: Make registered shm dependency explicit
Date: Wed, 16 Nov 2022 02:33:22 +0200	[thread overview]
Message-ID: <Y3Qv0hehr/yKNvy4@kernel.org> (raw)
In-Reply-To: <CAFA6WYMKSjvgNgbf=cJXiTE3LitS-whtRbqJW1cdkHMJ1TsdUg@mail.gmail.com>

On Thu, Nov 10, 2022 at 04:44:20PM +0530, Sumit Garg wrote:
> + Jarkko (Apologies I accidently missed you while sending the original patch).
> 
> On Thu, 10 Nov 2022 at 16:42, Sumit Garg <sumit.garg@linaro.org> wrote:
> >
> > TEE trusted keys support depends on registered shared memory support
> > since the key buffers are needed to be registered with OP-TEE. So make
> > that dependency explicit to not register trusted keys support if
> > underlying implementation doesn't support registered shared memory.
> >
> > Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
> > Tested-by: Jerome Forissier <jerome.forissier@linaro.org>
> > ---
> >  security/keys/trusted-keys/trusted_tee.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/security/keys/trusted-keys/trusted_tee.c b/security/keys/trusted-keys/trusted_tee.c
> > index c8626686ee1b..ac3e270ade69 100644
> > --- a/security/keys/trusted-keys/trusted_tee.c
> > +++ b/security/keys/trusted-keys/trusted_tee.c
> > @@ -219,7 +219,8 @@ static int trusted_tee_get_random(unsigned char *key, size_t key_len)
> >
> >  static int optee_ctx_match(struct tee_ioctl_version_data *ver, const void *data)
> >  {
> > -       if (ver->impl_id == TEE_IMPL_ID_OPTEE)
> > +       if (ver->impl_id == TEE_IMPL_ID_OPTEE &&
> > +           ver->gen_caps & TEE_GEN_CAP_REG_MEM)
> >                 return 1;
> >         else
> >                 return 0;
> > --
> > 2.34.1
> >

Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>

BR, Jarkko

  reply	other threads:[~2022-11-16  0:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-10 11:11 [PATCH] KEYS: trusted: tee: Make registered shm dependency explicit Sumit Garg
2022-11-10 11:14 ` Sumit Garg
2022-11-16  0:33   ` Jarkko Sakkinen [this message]
2022-11-16  0:39     ` Jarkko Sakkinen

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=Y3Qv0hehr/yKNvy4@kernel.org \
    --to=jarkko@kernel.org \
    --cc=jejb@linux.ibm.com \
    --cc=jerome.forissier@linaro.org \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=sumit.garg@linaro.org \
    --cc=zohar@linux.ibm.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).