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: <f200cf10-0905-4e2b-b0b6-62b0f67ff2bf@sirena.org.uk>
Date: Fri, 30 Jan 2026 19:39:12 +0000
From: Mark Brown <broonie@...nel.org>
To: Jinjie Ruan <ruanjinjie@...wei.com>
Cc: jstultz@...gle.com, tglx@...nel.org, sboyd@...nel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kunit: time: use is_leap_year() helper

On Fri, Jan 30, 2026 at 03:11:17PM +0000, Mark Brown wrote:
> On Fri, Jan 23, 2026 at 04:09:40PM +0800, Jinjie Ruan wrote:
> 
> > Use the is_leap_year() helper from rtc.h instead of
> > writing it by hand

> This patch introduces a regression:

> > -static bool is_leap(long year)

> gets replaced by is_leap_year() which is:

> static inline bool is_leap_year(unsigned int year)

> which looks like it ought to work out the same from a quick look
> although it is written less clearly.  I'll look properly later when I've
> got through the rest of the pile of regressions.

The issue here is, of course, the change from using long for the new to
using unsigned long.  The test is considering times up to 8000 years
before 1970 which results in us trying to convert a negative year to a
positive value before testing if it's a leap year which gives us the
wrong answer.  I'll send a revert.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ