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:   Tue, 07 Jan 2020 18:53:32 +0100
From:   Lucas Stach <l.stach@...gutronix.de>
To:     Sébastien Szymanski 
        <sebastien.szymanski@...adeus.com>,
        Sasha Levin <sashal@...nel.org>, linux-kernel@...r.kernel.org,
        stable@...r.kernel.org
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
        linux-arm-kernel@...ts.infradead.org,
        Fabio Estevam <festevam@...il.com>
Subject: Re: [PATCH AUTOSEL 4.19 102/177] nvmem: imx-ocotp: reset error
 status on probe

Hi Sébastien,

On Di, 2020-01-07 at 15:50 +0100, Sébastien Szymanski wrote:
> On 12/10/19 10:31 PM, Sasha Levin wrote:
> > From: Lucas Stach <l.stach@...gutronix.de>
> > 
> > [ Upstream commit c33c585f1b3a99d53920bdac614aca461d8db06f ]
> > 
> > If software running before the OCOTP driver is loaded left the
> > controller with the error status pending, the driver will never
> > be able to complete the read timing setup. Reset the error status
> > on probe to make sure the controller is in usable state.
> > 
> > Signed-off-by: Lucas Stach <l.stach@...gutronix.de>
> > Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
> > Link: https://lore.kernel.org/r/20191029114240.14905-6-srinivas.kandagatla@linaro.org
> > Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> > Signed-off-by: Sasha Levin <sashal@...nel.org>
> > ---
> >  drivers/nvmem/imx-ocotp.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c
> > index afb429a417fe0..926d9cc080cf4 100644
> > --- a/drivers/nvmem/imx-ocotp.c
> > +++ b/drivers/nvmem/imx-ocotp.c
> > @@ -466,6 +466,10 @@ static int imx_ocotp_probe(struct platform_device *pdev)
> >  	if (IS_ERR(priv->clk))
> >  		return PTR_ERR(priv->clk);
> >  
> > +	clk_prepare_enable(priv->clk);
> > +	imx_ocotp_clr_err_if_set(priv->base);
> > +	clk_disable_unprepare(priv->clk);
> > +
> >  	priv->params = of_device_get_match_data(&pdev->dev);
> >  	imx_ocotp_nvmem_config.size = 4 * priv->params->nregs;
> >  	imx_ocotp_nvmem_config.dev = dev;
> > 
> 
> Hi,
> 
> This patch makes kernel 4.19.{92,93} hang at boot on my i.MX6ULL based
> board. It hanks at
> 
> [    3.730078] cpu cpu0: Linked as a consumer to regulator.2
> [    3.737760] cpu cpu0: Linked as a consumer to regulator.3
> 
> Full boot log is here: https://pastebin.com/TS8EFxkr
> 
> The config is imx_v6_v7_defconfig.
> 
> Reverting it makes the kernels boot again.

Can you check if it actually hangs in imx_ocotp_clr_err_if_set(), or if
the clk_disable_unprepare() is the culprit?

If the clock disable hangs the system there is a missing clock
reference somewhere else that we need to track down.

Regards,
Lucas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ