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: <ZTqfQJiEMRD0Xc9S@Fedora>
Date:   Thu, 26 Oct 2023 10:17:52 -0700
From:   Darren Hart <darren@...amperecomputing.com>
To:     Guenter Roeck <linux@...ck-us.net>
Cc:     linux-kernel@...r.kernel.org,
        Vanshidhar Konda <vanshikonda@...amperecomputing.com>,
        Wim Van Sebroeck <wim@...ux-watchdog.org>,
        linux-watchdog@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, stable@...r.kernel.org
Subject: Re: [PATCH] sbsa_gwdt: Calculate timeout with 64-bit math

On Sun, Oct 22, 2023 at 09:58:26AM -0700, Guenter Roeck wrote:
> On 10/14/23 02:12, Darren Hart wrote:
> > On Tue, Sep 26, 2023 at 05:45:13AM -0700, Guenter Roeck wrote:
> > > On Thu, Sep 21, 2023 at 02:02:36AM -0700, Darren Hart wrote:
> > > > Commit abd3ac7902fb ("watchdog: sbsa: Support architecture version 1")
> > > > introduced new timer math for watchdog revision 1 with the 48 bit offset
> > > > register.
> > > > 
> > > > The gwdt->clk and timeout are u32, but the argument being calculated is
> > > > u64. Without a cast, the compiler performs u32 operations, truncating
> > > > intermediate steps, resulting in incorrect values.
> > > > 
> > > > A watchdog revision 1 implementation with a gwdt->clk of 1GHz and a
> > > > timeout of 600s writes 3647256576 to the one shot watchdog instead of
> > > > 300000000000, resulting in the watchdog firing in 3.6s instead of 600s.
> > > > 
> > > > Force u64 math by casting the first argument (gwdt->clk) as a u64. Make
> > > > the order of operations explicit with parenthesis.
> > > > 
> > > > Fixes: abd3ac7902fb ("watchdog: sbsa: Support architecture version 1")
> > > > Reported-by: Vanshidhar Konda <vanshikonda@...amperecomputing.com>
> > > > Signed-off-by: Darren Hart <darren@...amperecomputing.com>
> > > > Cc: Wim Van Sebroeck <wim@...ux-watchdog.org>
> > > > Cc: Guenter Roeck <linux@...ck-us.net>
> > > > Cc: linux-watchdog@...r.kernel.org
> > > > Cc: linux-kernel@...r.kernel.org
> > > > Cc: linux-arm-kernel@...ts.infradead.org
> > > > Cc: <stable@...r.kernel.org> # 5.14.x
> > > 
> > > Reviewed-by: Guenter Roeck <linux@...ck-us.net>
> > 
> > Guenter or Wim, I haven't seen this land in the RCs or in next yet. Have
> > you already picked it up? Anything more needed from me?
> > 
> > Thanks,
> > 
> 
> Sorry, I am suffering from what I can only describe as a severe case of
> maintainer/reviewer PTSD, and I have yet to find a way of dealing with that.
> 

I'm sorry to hear it Guenter, it can be a thankless slog of a treadmill
sometimes. I found having a co-maintainer a huge help to even out the human
factors while maintaining the x86 platform drivers (in the before times).

In the short term, should I ask if one of the Arm maintainers would be willing
to pick this patch up?

Thanks,

-- 
Darren Hart
Ampere Computing / Linux Enabling

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ