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]
Message-ID: <CAEXTbpeHy6-WjLOyWFkncoHzBPM+6qq4w-kUoZj7=05gf8YBjw@mail.gmail.com>
Date:   Mon, 25 Jul 2022 18:19:09 +0800
From:   Pin-yen Lin <treapking@...omium.org>
To:     AngeloGioacchino Del Regno 
        <angelogioacchino.delregno@...labora.com>
Cc:     Matthias Brugger <matthias.bgg@...il.com>,
        linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Hsin-Yi Wang <hsinyi@...omium.org>,
        Eizan Miyamoto <eizan@...omium.org>,
        Evan Benn <evanbenn@...omium.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Rob Herring <robh+dt@...nel.org>, devicetree@...r.kernel.org
Subject: Re: [PATCH] arm64: dts: mt8173-oak: Switch to SMC watchdog

On Mon, Jul 25, 2022 at 4:39 PM AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com> wrote:
>
> Il 25/07/22 10:24, Pin-yen Lin ha scritto:
> > Switch to SMC watchdog because we need direct control of HW watchdog
> > registers from kernel. The corresponding firmware was uploaded in
> > https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/3405.
> >
>
> There's a fundamental issue with this change, I think.
>
> What happens if we run this devicetree on a device that does *not* have
> the new(er) firmware?

I haven't tried this patch with an older firmware. I'll manage to
build one for this.
>
> The kernel *shall not* get broken when running on devices that are running
> on older firmware, especially because that's what was initially supported
> and what is working right now.

Actually the current approach does not work *right*. The device boots,
but the watchdog does not work properly.

Also, all MT8173 ChromeOS devices have this firmware updated, and we
don't have other upstream users apart from mt8173-evb. Do we want to
support the developers that are running upstream linux with their
MT8173 boards?

>
> For this reason, I think that we should get some code around that checks
> if the SMC watchdog is supported and, if not, resort to MMIO wdog.

What is the expected way to support this backward compatibility? Do we
put the old compatible strings ("mediatek,mt8173-wdt" and
"mediatek,mt6589-wdt") after "arm,smc-wdt" and reject it in the
drivers if the firmware does not support it?
>
> Regards,
> Angelo
>
>
> > Signed-off-by: Pin-yen Lin <treapking@...omium.org>
> > ---
> >
> >   arch/arm64/boot/dts/mediatek/mt8173.dtsi | 6 ++----
> >   1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
> > index a2aef5aa67c1..2d1c776740a5 100644
> > --- a/arch/arm64/boot/dts/mediatek/mt8173.dtsi
> > +++ b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
> > @@ -528,10 +528,8 @@ power-domain@...173_POWER_DOMAIN_MFG {
> >                       };
> >               };
> >
> > -             watchdog: watchdog@...07000 {
> > -                     compatible = "mediatek,mt8173-wdt",
> > -                                  "mediatek,mt6589-wdt";
> > -                     reg = <0 0x10007000 0 0x100>;
> > +             watchdog {
> > +                     compatible = "arm,smc-wdt";
> >               };
> >
> >               timer: timer@...08000 {
> >
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ