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] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 11 Nov 2022 15:13:32 +0000
From:   Sudeep Holla <sudeep.holla@....com>
To:     Ludvig Pärsson <Ludvig.Parsson@...s.com>
Cc:     "sumit.garg@...aro.org" <sumit.garg@...aro.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        Sudeep Holla <sudeep.holla@....com>,
        "jens.wiklander@...aro.org" <jens.wiklander@...aro.org>,
        "vincent.guittot@...aro.org" <vincent.guittot@...aro.org>,
        "etienne.carriere@...aro.org" <etienne.carriere@...aro.org>,
        "cristian.marussi@....com" <cristian.marussi@....com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] firmware: arm_scmi: Resolve dependency with TEE subsystem

On Fri, Nov 11, 2022 at 03:00:29PM +0000, Ludvig Pärsson wrote:
> On Fri, 2022-11-11 at 14:38 +0000, Sudeep Holla wrote:
> > On Fri, Nov 11, 2022 at 03:23:13PM +0530, Sumit Garg wrote:
> > > The OP-TEE SCMI transport channel is dependent on TEE subsystem to
> > > be
> > > initialized first. But currently the Arm SCMI subsystem and TEE
> > > subsystem are invoked on the same initcall level as
> > > subsystem_init().
> > > 
> > > It is observed that the SCMI subsystem initcall is invoked prior to
> > > TEE
> > > subsystem initcall. This leads to unwanted error messages regarding
> > > TEE
> > > bus is not present yet. Although, -EPROBE_DEFER tries to workaround
> > > that
> > > problem.
> > > 
> > > Lets try to resolve inter subsystem dependency problem via shifting
> > > Arm
> > > SCMI subsystem to subsystem_init_sync() initcall level.
> > > 
> > 
> > I would avoid doing that. We already have some implicit dependency
> > with
> > subsys_initcall because this driver creates/registers bus and need to
> > be
> > done early. Now in order to solve the dependency between SCMI and
> > TEE,
> > both of which creates/registers bus and are at same subsys_initcall,
> > we are relying on subsys_initcall_sync.
> > 
> > Me and Ludvig discussed this in private and I suggested him to do
> > something
> > like below patch snippet. He mentioned he did post a patch on the
> > list but
> > I couldn't find it. For this the scmi node must be child node of
> > OPTEE as
> > it is providing the transport.
> > 
> > @Ludvig, ?
> > 
> > Regards,
> > Sudeep
> > 
> > --
> > diff --git i/drivers/tee/optee/smc_abi.c
> > w/drivers/tee/optee/smc_abi.c
> > index a1c1fa1a9c28..839feca0def4 100644
> > --- i/drivers/tee/optee/smc_abi.c
> > +++ w/drivers/tee/optee/smc_abi.c
> > @@ -1534,7 +1534,9 @@ static int optee_probe(struct platform_device
> > *pdev)
> >                 goto err_disable_shm_cache;
> > 
> >         pr_info("initialized driver\n");
> > -       return 0;
> > +
> > +       /* Populate any dependent child node(if any) */
> > +       return devm_of_platform_populate(&pdev->dev);
> > 
> >  err_disable_shm_cache:
> >         if (!optee->rpc_param_count)
> > 
> I have answered something similar in my submit [1]. Maybe I should have
> CCed you, or atleast sent you this link when I told you I made the
> submission.
> 
> [1] https://lkml.org/lkml/2022/11/9/803
>

Thanks for the reference.

-- 
Regards,
Sudeep

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ