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: <5371EAEB.5030100@imgtec.com>
Date:	Tue, 13 May 2014 10:50:35 +0100
From:	James Hogan <james.hogan@...tec.com>
To:	Ley Foon Tan <lftan@...era.com>
CC:	Linux-Arch <linux-arch@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Chung-Lin Tang <cltang@...esourcery.com>,
	Arnd Bergmann <arnd@...db.de>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 01/25] asm-generic: Change time_t and clock_t to 64 bit

Hi,

On 13/05/14 10:32, Ley Foon Tan wrote:
> On Tue, May 13, 2014 at 5:15 PM, James Hogan <james.hogan@...tec.com> wrote:
>> On 13 May 2014 10:02, Ley Foon Tan <lftan@...era.com> wrote:
>>>  /*
>>> + * Use 64 bit time_t and clock_t as default. 32 bit users can provide an override to
>>> + * define these as "long" if needed.
>>> + */
>>> +#ifndef __kernel_time_t
>>> +typedef long long      __kernel_time_t;
>>> +#endif
>>> +
>>> +#ifndef __kernel_clock_t
>>> +typedef long long      __kernel_clock_t;
>>> +#endif
>>
>> I think having this as the first patch in the series will break
>> bisection for existing 32-bit arches. This needs to be done in such a
>> way that at no intermediate commit are __kernel_time_t or
>> __kernel_clock_t the wrong size for existing arches, e.g. by having a
>> first patch which makes the typedefs conditional but leaves them as
>> __kernel_long_t, and a final patch that changes the default after all
>> the arches have got their overrides in place.
> 
> Your suggestion is something as below?

Yeh, although I like Thomas' idea better, then each existing 32-bit arch
can just select the Kconfig symbol to get the smaller type.

IIRC Kconfig won't even complain if you select a symbol which doesn't
exist yet.

Cheers
James

> 
> First patch:
> #ifndef __kernel_time_t
> typedef __kernel_long_t      __kernel_time_t;
> #endif
> 
> Last patch:
> #ifndef __kernel_time_t
> typedef long long      __kernel_time_t;
> #endif
> 
> Ley Foon
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ