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: <201108311814.54906.arnd@arndb.de>
Date:	Wed, 31 Aug 2011 18:14:54 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Christoph Hellwig <hch@...radead.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>,
	"H.J. Lu" <hjl.tools@...il.com>, Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	Richard Kuo <rkuo@...eaurora.org>,
	Mark Salter <msalter@...hat.com>,
	Jonas Bonn <jonas@...thpole.se>,
	Tobias Klauser <tklauser@...tanz.ch>
Subject: Re: RFD: x32 ABI system call numbers

On Tuesday 30 August 2011, H. Peter Anvin wrote:
> On 08/30/2011 05:09 AM, Arnd Bergmann wrote:
> > 
> > I'm wondering about the time_t changes: given that we are still adding
> > new 32 bit architectures, should we change the asm-generic API as well
> > to use 64 bit time_t by default (with fallbacks for the existing ones)?
> > 
> > If you are adding support for these in x32 already, we could use the
> > same code for regular 32 bit architectures.
> > 
> 
> It seems absolutely boggling insane that we're introducing new
> architectures with no legacy whatsoever and use 32-bit time_t on those.

Ok, but I think we do need to consider the potential problems in this.
I would expect a number of things to break if we just define it to
'long long' on new architectures, including:

* pre-c99 C compilers or programs that rely on --std=c89
* padding in struct timespec when you have a long long tv_sec and
  32-bit long tv_nsec. This might cause kernel stack data leakage
  in some kernel interfaces when they don't clear the padding.
* random broken applications assuming that timespec/timeval has
  two 'long' members, instead of using the proper header files.

Obviously these are all fixable for any new ABI, but will cause
some annoyance.

I've added a few people to Cc who are in various stages of the
process to finalize their upstream kernel ports. It's clearly
the right decision to have time_t 64-bit eventually, the question
is how much work is everyone willing to spend in the short run,
and who is going to test it. In particular, openrisc has just
been merged, so we should not be changing it any more unless
there is a serious problem, but if there is not much legacy user
space with the current ABI yet, it may still be worth switching
over.

	Arnd
--
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