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:	Wed, 1 Apr 2009 17:04:12 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Will Newton <will.newton@...il.com>
Cc:	Geert Uytterhoeven <geert.uytterhoeven@...il.com>,
	michal.simek@...alogix.com,
	Linux Kernel list <linux-kernel@...r.kernel.org>,
	linux-arch@...r.kernel.org, linux-api@...r.kernel.org,
	Chen Liqin <liqin.chen@...plusct.com>
Subject: Re: [RFC] asm-generic/{unistd,types,posix_types}.h for new arch

On Wednesday 01 April 2009, Will Newton wrote:
> > + * There seems to be no way of detecting this automatically from user
> > + * space, so 64 bit architectures should override this in their types.h.
> > + */
> > +#ifndef __BITS_PER_LONG
> > +#define __BITS_PER_LONG 32
> > +#endif
> 
> Why is this define required? It doesn't seem to be in any existing headers.

Unfortunately, there is no generic way to detect the word size yet,
but every architecture uses its own preprocessor macro (__x86_64__,
__s390x__, __ppc64__). We also can't use CONFIG_64BIT in an user-exported
interface header file, because the use space can also be compiled for
32 bits when the kernel uses 64 bits.

__BITS_PER_LONG is actually defined in parisc now, and was the result
of the last time we had this discussion. I'm still thinking about
making a separate <asm/bitsperlong.h> header, or a <asm/bits.h> that
also contains the respective __BIG_ENDIAN/__LITTLE_ENDIAN macros
which have the same problem. The advantage would be that other header
files (e.g. unistd.h) can known the word size without getting the
whole types.h name space.

	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