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:
 <TY3PR01MB113464848E24FE536C7088D95861F2@TY3PR01MB11346.jpnprd01.prod.outlook.com>
Date: Mon, 13 Jan 2025 16:43:52 +0000
From: Biju Das <biju.das.jz@...renesas.com>
To: "Lad, Prabhakar" <prabhakar.csengg@...il.com>, Guenter Roeck
	<linux@...ck-us.net>
CC: Geert Uytterhoeven <geert+renesas@...der.be>, Rob Herring
	<robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>, Michael
 Turquette <mturquette@...libre.com>, Stephen Boyd <sboyd@...nel.org>, Conor
 Dooley <conor+dt@...nel.org>, Wim Van Sebroeck <wim@...ux-watchdog.org>,
	Magnus Damm <magnus.damm@...il.com>, Wolfram Sang
	<wsa+renesas@...g-engineering.com>, "linux-renesas-soc@...r.kernel.org"
	<linux-renesas-soc@...r.kernel.org>, "linux-clk@...r.kernel.org"
	<linux-clk@...r.kernel.org>, "devicetree@...r.kernel.org"
	<devicetree@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "linux-watchdog@...r.kernel.org"
	<linux-watchdog@...r.kernel.org>, Fabrizio Castro
	<fabrizio.castro.jz@...esas.com>, Prabhakar Mahadev Lad
	<prabhakar.mahadev-lad.rj@...renesas.com>
Subject: RE: [PATCH v3 0/6] Add support to retrieve the bootstatus from
 watchdog for RZ/V2H(P) SoC

Hi Prabhakar,

> -----Original Message-----
> From: Lad, Prabhakar <prabhakar.csengg@...il.com>
> Sent: 13 January 2025 16:29
> Subject: Re: [PATCH v3 0/6] Add support to retrieve the bootstatus from watchdog for RZ/V2H(P) SoC
> 
> Hi Guenter,
> 
> On Mon, Jan 13, 2025 at 4:0 PM Guenter Roeck <linux@...ck-us.net> wrote:
> >
> > On 1/13/25 04:40, Lad, Prabhakar wrote:
> > > Hi Biju,
> > >
> > > On Mon, Jan 13, 2025 at 11:38 AM Biju Das <biju.das.jz@...renesas.com> wrote:
> > >>
> > >> Hi Prabhakar,
> > >>
> > >>> -----Original Message-----
> > >>> From: Prabhakar <prabhakar.csengg@...il.com>
> > >>> Sent: 13 January 2025 11:24
> > >>> Subject: [PATCH v3 0/6] Add support to retrieve the bootstatus
> > >>> from watchdog for RZ/V2H(P) SoC
> > >>>
> > >>> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
> > >>>
> > >>> Hi All,
> > >>>
> > >>> This patch series adds SYSCON support to retrieve boot status information for RZ/V2H(P) SoC.
> > >>> Summary of Changes,
> > >>>
> > >>>      Clock:
> > >>>          Add syscon compatible support to the CPG block in bindings and
> > >>>          device trees.
> > >>>
> > >>>      Watchdog:
> > >>>          Document the renesas,r9a09g057-syscon-wdt-errorrst property.
> > >>>          Update the watchdog driver to fetch and report boot status via
> > >>>          Error Reset Registers (CPG_ERROR_RSTm).
> > >>>
> > >>>      Device Tree:
> > >>>          Add the syscon property to CPG and WDT nodes in R9A09G057 and
> > >>>          R9A09G047 SoC DTSI.
> > >>>
> > >>> These changes enable the watchdog driver to identify boot sources
> > >>> like Power-on Reset and Watchdog Reset, improving system diagnostics.
> > >>
> > >> This means that, we should assume U-boot/bootloader should not clear the WDT reset status bit.
> > >>
> > >> If they clear it, there should be a way to propagate it from
> > >> u-boot/bootloader to linux, otherwise, we get wrong bootstatus in linux.
> > >> But the clearing of watchdog status by one of the cases:
> > >>
> > >> 1) u-boot identify the boot source and clear the status bit
> > >>
> > > I agree, if the tf-a/u-boot clears the register, the bootstatus
> > > reported by Linux will be in-correct.
> > >
> >
> > I would rephrase that: Today, the boot status is _always_ incorrect if
> > a reboot was triggered by a watchdog reset. After this patch, it will
> > be correct unless the boot loader resets the status bit.
> >
> Agreed.
> 
> > > Alternative solution, would be:
> > >
> > > Let the TF-A create WDT nodes for us and add a property
> > > `renesas,r9a09g057-wdt-bootstatus` and propagate the WDT nodes to
> > > Linux.
> > >
> > > renesas,r9a09g057-wdt-bootstatus = <0/1>;
> > >
> >
> > That would require both a property change as well as a change in the bootloader.
> > I suspect it would also be inappropriate as standard property and
> > would have to be passed as 'chosen' property (if that is even
> > permitted) or as command line argument.
> >
> > Either case, if the boot loader has to be changed anyway, why not just
> > tell it to leave the boot status alone ?
> >
> It can be done, I think Biju is concerned about the user clearing it, maybe using the `mw` command or
> the Linux CPG driver clearing it during the probe.

If either TF-A or U-boot clears the status we have problem. We need to provide input to
stake holders of u-boot/tf-a to not to clear the wdt boot status, so that linux can report correct
status.

 Or 

They need to provide the boot status as command line args if u-boot/tf-a clears it.

Or

If there is command line arg, parse that and report as boot status, else
read from cpg and report it.

Cheers,
Biju

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ