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:   Mon, 18 Nov 2019 08:54:11 +0000
From:   Joakim Zhang <qiangqing.zhang@....com>
To:     Sean Nyekjaer <sean@...nix.com>,
        "mkl@...gutronix.de" <mkl@...gutronix.de>
CC:     "linux-can@...r.kernel.org" <linux-can@...r.kernel.org>,
        dl-linux-imx <linux-imx@....com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH 1/3] can: flexcan: fix deadlock when using self wakeup


> -----Original Message-----
> From: Sean Nyekjaer <sean@...nix.com>
> Sent: 2019年11月18日 16:22
> To: Joakim Zhang <qiangqing.zhang@....com>; mkl@...gutronix.de
> Cc: linux-can@...r.kernel.org; dl-linux-imx <linux-imx@....com>;
> netdev@...r.kernel.org
> Subject: Re: [PATCH 1/3] can: flexcan: fix deadlock when using self wakeup
> 
> 
> 
> On 18/11/2019 09.04, Joakim Zhang wrote:
> >>>> Hi Joakim and Marc
> >>>>
> >>>> We have quite a few devices in the field where flexcan is stuck in
> Stop-Mode.
> >>>> We do not have the possibility to cold reboot them, and hot reboot
> >>>> will not get flexcan out of stop-mode.
> >>>> So flexcan comes up with:
> >>>> [  279.444077] flexcan: probe of 2090000.flexcan failed with error
> >>>> -110 [  279.501405] flexcan: probe of 2094000.flexcan failed with
> >>>> error -110
> >>>>
> >>>> They are on, de3578c198c6 ("can: flexcan: add self wakeup support")
> >>>>
> >>>> Would it be a solution to add a check in the probe function to pull
> >>>> it out of stop-mode?
> >>>
> >>> Hi Sean,
> >>>
> >>> Soft reset cannot be applied when clocks are shut down in a low power
> mode.
> >> The module should be first removed from low power mode, and then soft
> >> reset can be applied.
> >>> And exit from stop mode happens when the Stop mode request is
> >>> removed,
> >> or when activity is detected on the CAN bus and the Self Wake Up
> >> mechanism is enabled.
> >>>
> >>> So from my point of view, we can add a check in the probe function
> >>> to pull it out of stop mode, since controller actually could be
> >>> stuck in stop mode
> >> if suspend/resume failed and users just want a warm reset for the system.
> >>
> >> Exactly what I thought could be done :)
> >>
> >>>
> >>> Could you please tell me how can I generate a warm reset? AFAIK,
> >>> both
> >> "reboot" command put into prompt and RST KEY in our EVK board all
> >> play a role of cold reset.
> >>
> >> Warm reset is just `reboot` :-) Cold is poweroff...
> >
> > I add the code flexcan_enter_stop_mode(priv) at the end of the probe
> function, 'reboot' the system directly after system active.
> > However, I do not meet the probe error, it can probe successfully. Do you
> know the reason?
> 
> You will have to get it in the deadlock situation first :)

As you said, if we need get it into the deadlock situation first, then this patch has fixed it, that means the problem goes away?

With this patch, if CAN enter stop mode when suspend, it certainly can exit stop mode when resume. Unless such activity occurs, CAN enter
stop mode, however system hang before it exit stop mode. Right? 
So I do not know how to reproduce this issue after applying this patch. 

And the case I mentioned in last response, CAN enter stop mode at the end of probe function, then "reboot" the system should be the same situation
with " This can be achieved by using de3578c198c6 and sending can messages to both can interfaces while calling suspend." The aim is both that let controller
enter stop mode, then 'reboot' the system. Right?

Best Regards,
Joakim Zhang
> This can be achieved by using de3578c198c6 and sending can messages to both
> can interfaces while calling suspend.
> 
> /Sean

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ