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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191001114816.GA4106@piout.net>
Date:   Tue, 1 Oct 2019 13:48:16 +0200
From:   Alexandre Belloni <alexandre.belloni@...tlin.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     Petr Mladek <pmladek@...e.com>, linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Hans Verkuil <hverkuil@...all.nl>,
        Mathias Nyman <mathias.nyman@...el.com>,
        Jonathan Corbet <corbet@....net>,
        Thierry Reding <thierry.reding@...il.com>,
        Jonathan Hunter <jonathanh@...dia.com>,
        John Stultz <john.stultz@...aro.org>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH v1 1/4] lib/vsprintf: Print time64_t in human readable
 format

On 01/10/2019 14:36:55+0300, Andy Shevchenko wrote:
> On Mon, Sep 30, 2019 at 10:08:09PM +0200, Alexandre Belloni wrote:
> > > > Maybe be rtc_str should take a struct tm instead of an rtc_time so
> > > > time64_to_rtc_time always uses time64_to_tm.
> > > 
> > > Because this one, while sounding plausible, maybe too invasive on current
> > > state of affairs.
> > 
> > Well, if the kernel struct tm had an int tm_year instead of long
> > tm_year, then you could simply cast a struct rtc_time to a struct tm.
> 
> I don't think so. It will be error prone from endianess prospective on
> 64-bit platforms.
> 

I don't get why, as long as the first members of both structs are the
same, this should work.

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ