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, 3 Feb 2022 14:08:24 +0100
From:   Jens Wiklander <jens.wiklander@...aro.org>
To:     Sumit Garg <sumit.garg@...aro.org>
Cc:     linux-kernel@...r.kernel.org, op-tee@...ts.trustedfirmware.org,
        Tyler Hicks <tyhicks@...ux.microsoft.com>,
        Lars Persson <lars.persson@...s.com>,
        Lars Persson <larper@...s.com>, stable@...r.kernel.org
Subject: Re: [PATCH] optee: use driver internal tee_contex for some rpc

On Fri, Jan 28, 2022 at 6:46 AM Sumit Garg <sumit.garg@...aro.org> wrote:
>
> On Thu, 27 Jan 2022 at 19:59, Jens Wiklander <jens.wiklander@...aro.org> wrote:
> >
> > Adds a driver private tee_context by moving the tee_context in struct
> > optee_notif to struct optee. This tee_context was previously used when
> > doing internal calls to secure world to deliver notification.
> >
> > The new driver internal tee_context is now also when allocating driver
> > private shared memory. This decouples the shared memory object from its
> > original tee_context. This is needed when the life time of such a memory
> > allocation outlives the client tee_context.
> >
> > This patch fixes the problem described below:
> >
> > The addition of a shutdown hook by commit f25889f93184 ("optee: fix tee out
> > of memory failure seen during kexec reboot") introduced a kernel shutdown
> > regression that can be triggered after running the OP-TEE xtest suites.
> >
> > Once the shutdown hook is called it is not possible to communicate any more
> > with the supplicant process because the system is not scheduling task any
> > longer. Thus if the optee driver shutdown path receives a supplicant RPC
> > request from the OP-TEE we will deadlock the kernel's shutdown.
> >
> > Fixes: f25889f93184 ("optee: fix tee out of memory failure seen during kexec reboot")
> > Fixes: 217e0250cccb ("tee: use reference counting for tee_context")
> > Reported-by: Lars Persson <larper@...s.com>
> > Cc: stable@...r.kernel.org
> > Signed-off-by: Jens Wiklander <jens.wiklander@...aro.org>
> > ---
> >
> > This patch is from "optee: add driver private tee_context" and "optee: use
> > driver internal tee_contex for some rpc" in [1] combined into one patch for
> > easier tracking. It turned out that those two patches fixes reported
> > problem so I'm breaking out this from the patchset in order to target it
> > for the v5.17.
> >
> > [1] https://lore.kernel.org/lkml/20220125162938.838382-1-jens.wiklander@linaro.org/
> >
> >  drivers/tee/optee/core.c          |  1 +
> >  drivers/tee/optee/ffa_abi.c       | 77 +++++++++++++++++--------------
> >  drivers/tee/optee/optee_private.h |  5 +-
> >  drivers/tee/optee/smc_abi.c       | 48 +++++++------------
> >  4 files changed, 64 insertions(+), 67 deletions(-)
> >
>
> Reviewed-by: Sumit Garg <sumit.garg@...aro.org>

Thanks, I'm picking this up now.

/Jens

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ