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:	Mon, 20 Jan 2014 09:46:41 -0800
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Christoph Hellwig <hch@...radead.org>,
	"H.J. Lu" <hjl.tools@...il.com>,
	linux-arch <linux-arch@...r.kernel.org>
CC:	LKML <linux-kernel@...r.kernel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Ralf Baechle <ralf@...ux-mips.org>,
	Catalin Marinas <catalin.marinas@....com>,
	Will Deacon <will.deacon@....com>
Subject: Re: [PATCH 0/8] Update kernel uabi header files for x32

On 12/28/2013 08:33 AM, Christoph Hellwig wrote:
> On Fri, Dec 27, 2013 at 02:14:16PM -0800, H.J. Lu wrote:
>> X32 uses the same kernel system call interface as x86-64 for many
>> system calls.  However, "long" is 64-bit for x86-64 and is 32-bit for
>> x32.  Where long or unsigned long are used in struct types for such
>> system calls, they are wrong for x32.  __kernel_[u]long_t is [unsigned]
>> long for all ABIs other than x32.  I am submitting 8 patches to replace
>> long or unsigned long with __kernel_[u]long_t so that those struct types
>> can be used with x32 system calls.
> 
> Independent on how this fixes things, how does the kernel_long_t name
> here make any sense?
> 
> On x86-64 "kernel" long always is 64 bits wide.  The userspace ABI long
> might be 32 or 64bits wide.
> 
> Currently kernel_long_t has almost no uses, so it might be a good time
> to fix the name, define the rules for it, and last but not least
> properly document the intent for thse types.
> 

This comment by Christoph was literally the only feedback on this
patchset.  The definition of __kernel_[u]long_t is "the size of 'long'
for the native kernel for the ABI".  H.J.'s patchset only affects x86
(specifically x86-64) since on all other platforms __kernel_[u]long_t is
simply defined as long/unsigned long.

That being said, x32 is not the only ABI of this type.  In particular,
if the MIPS N32 and ARM64 ILP32 maintainers have suggestions which would
make this work more applicable to them, it would be highly useful to
receive any such feedback.

	-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