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]
Message-ID: <87h5s2hkha.ffs@tglx>
Date: Fri, 30 Jan 2026 22:13:53 +0100
From: Thomas Gleixner <tglx@...nel.org>
To: Mark Brown <broonie@...nel.org>, Jinjie Ruan <ruanjinjie@...wei.com>
Cc: jstultz@...gle.com, sboyd@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kunit: time: use is_leap_year() helper

On Fri, Jan 30 2026 at 19:39, Mark Brown wrote:
> 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.

Duh. Don't send anything I just zapped the commit from timers/core

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ