lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 24 Jan 2019 19:32:39 +0200
From:   Igor Opaniuk <igor.opaniuk@...aro.org>
To:     Jens Wiklander <jens.wiklander@...aro.org>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        tee-dev@...ts.linaro.org,
        Jerome Forissier <jerome.forissier@...aro.org>,
        "Zengtao (B)" <prime.zeng@...ilicon.com>,
        Sumit Garg <sumit.garg@...aro.org>
Subject: Re: [PATCH 1/1] tee: add cancellation support to client interface

right, missed that. Thanks!
Addressed this issue + also fixed the description and sent v2.

On Thu, 24 Jan 2019 at 18:19, Jens Wiklander <jens.wiklander@...aro.org> wrote:
>
> On Thu, Jan 24, 2019 at 2:11 PM Igor Opaniuk <igor.opaniuk@...aro.org> wrote:
> >
> > Add support of cancellation request to the TEE kernel internal
> > client interface. Can be used by software TPM drivers, that leverage
> > TEE under the hood (for instance in TPM2.0 mobile profile), for requesting
> > cancellation of time-consuming operations (RSA key-pair generation etc.).
> >
> > Signed-off-by: Igor Opaniuk <igor.opaniuk@...aro.org>
> > ---
> >  drivers/tee/tee_core.c  | 12 ++++++++++++
> >  include/linux/tee_drv.h | 14 ++++++++++++++
> >  2 files changed, 26 insertions(+)
> >
> > diff --git a/drivers/tee/tee_core.c b/drivers/tee/tee_core.c
> > index 7b2bb4c..aba71a8 100644
> > --- a/drivers/tee/tee_core.c
> > +++ b/drivers/tee/tee_core.c
> > @@ -1027,6 +1027,18 @@ int tee_client_invoke_func(struct tee_context *ctx,
> >  }
> >  EXPORT_SYMBOL_GPL(tee_client_invoke_func);
> >
> > +int tee_client_cancel_req(struct tee_context *ctx,
> > +                         u32 cancel_id,
> > +                         u32 session)
> > +{
> > +
> > +       if (!ctx->teedev->desc->ops->cancel_req)
> > +               return -EINVAL;
> > +       return ctx->teedev->desc->ops->cancel_req(ctx, cancel_id,
> > +                                                 session);
> > +}
> > +EXPORT_SYMBOL_GPL(tee_client_cancel_req);
> > +
> >  static int __init tee_init(void)
> >  {
> >         int rc;
> > diff --git a/include/linux/tee_drv.h b/include/linux/tee_drv.h
> > index 6cfe058..62a0b56 100644
> > --- a/include/linux/tee_drv.h
> > +++ b/include/linux/tee_drv.h
> > @@ -526,6 +526,20 @@ int tee_client_invoke_func(struct tee_context *ctx,
> >                            struct tee_ioctl_invoke_arg *arg,
> >                            struct tee_param *param);
> >
> > +/**
> > + * tee_client_cancel_req() - Request cancellation of the previous open-session
> > + * or invoke-command operations in a Trusted Application
> > + * @ctx:       TEE Context
> > + * @arg:       Unique cancel request id
> > + * @param:     Session id
>
> These need to be updated, see struct tee_ioctl_cancel_arg in
> include/uapi/linux/tee.h
>
> Thanks,
> Jens
>
> > + *
> > + * Returns < 0 on error else see @arg->ret for result.
> > + */
> > +int tee_client_cancel_req(struct tee_context *ctx,
> > +                         u32 cancel_id,
> > +                         u32 session);
> > +
> > +
> >  static inline bool tee_param_is_memref(struct tee_param *param)
> >  {
> >         switch (param->attr & TEE_IOCTL_PARAM_ATTR_TYPE_MASK) {
> > --
> > 2.7.4
> >



--
Regards,
Igor Opaniuk

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ