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]
Date:	Fri, 26 Aug 2011 17:53:46 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
CC:	LKML <linux-kernel@...r.kernel.org>,
	"H.J. Lu" <hjl.tools@...il.com>, Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: RFD: x32 ABI system call numbers

On 08/26/2011 05:43 PM, Linus Torvalds wrote:
> On Fri, Aug 26, 2011 at 5:36 PM, Linus Torvalds
> <torvalds@...ux-foundation.org> wrote:
>>
>> There is *ZERO* reason to not use it. Use the standard 64-bit
>> structure layout. Why the hell would it be a new system call?
> 
> Oh, I see why you do that. It's because our 64-bit 'struct stat' uses
> "unsigned long" etc.
> 
> Just fix that. Make it use __u64 instead of "unsigned long", and
> everything should "just work". The 64-bit kernel will not change any
> ABI, and when you compile your new ia32 model, it will do the right
> thing too.
> 
> The fact that we still use "unsigned long" in the x86 <asm/stat.h> is
> certainly a bit embarrassing, but I guess that all predates us being
> more aware of 32/64-bit issues. It really should be fixed regardless
> of any ia32 interface issues.
> 

Unfortunately, there is actually a reason for the use of "unsigned long"
here -- it means that the combination of the time and the _nsec fields
matches struct timespec.  struct timespec/struct timeval is one of those
things that it would be really nice if we *could* change (it's not
inherently pointer-sized, and it really should be 64 bits), but struct
timespec and struct timeval are embedded in a a number of memory
structures, some of which have pointers; and they are used by ioctls.

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