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: <CAHk-=wgPJrMhr1_62O2xwD1QbT9oxJJ_uXw2mm6sa0hNDrFuwQ@mail.gmail.com>
Date:   Sat, 11 Sep 2021 10:05:02 -0700
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Alexandre Belloni <alexandre.belloni@...tlin.com>
Cc:     linux-rtc@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [GIT PULL] RTC changes for 5.15

On Sat, Sep 11, 2021 at 8:59 AM Alexandre Belloni
<alexandre.belloni@...tlin.com> wrote:
>
> The broken down time conversion is similar to what is done
> in the time subsystem since v5.14.

By "similar" you mean "identical", no?

Why is the rtc subsystem not just using the generic time64_to_tm()?

Yes, yes, I realize that due to historical mistakes, there's a
duplicate 'struct rtc_time' struct, but it turns out that that is
_identical_ to 'struct tm' except it also has a 'int tm_isdst' at the
end.

So you could literally make a union of the two, pass the 'struct tm'
part down to the generic code, and just do

     rtc_tm->tm_isdst = 0;

at the end.

Rather than have a duplicate copy of that admittedly clever Neri and
Schneider algorithm.

Hmm?

             Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ