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
| ||
|
Date: Tue, 12 Apr 2011 09:24:02 +0800 From: "Guan Xuetao" <gxt@...c.pku.edu.cn> To: "'Arnd Bergmann'" <arnd@...db.de> Cc: <linux-kernel@...r.kernel.org>, <linux-arch@...r.kernel.org> Subject: RE: about __BITS_PER_LONG > -----Original Message----- > From: Arnd Bergmann [mailto:arnd@...db.de] > Sent: Monday, April 11, 2011 11:25 PM > To: Guan Xuetao > Cc: linux-kernel@...r.kernel.org; linux-arch@...r.kernel.org > Subject: Re: about __BITS_PER_LONG > > On Monday 11 April 2011, Guan Xuetao wrote: > > --- a/include/asm-generic/bitsperlong.h > > +++ b/include/asm-generic/bitsperlong.h > > @@ -9,7 +9,11 @@ > > * to decide it, but rather check a compiler provided macro. > > */ > > #ifndef __BITS_PER_LONG > > -#define __BITS_PER_LONG 32 > > +# ifdef CONFIG_64BIT > > +# define __BITS_PER_LONG 64 > > +# else > > +# define __BITS_PER_LONG 32 > > +# endif /* CONFIG_64BIT */ > > #endif > > > > Unfortunately, this does not work, because the __BITS_PER_LONG definition is meant > for user space. You have to make this depend on a preprocessor macro that > is provided by the compiler based on the command line switches (e.g. -m64) that > a use could pass to the compiler. However, there is no conflict between the definition depending on a preprocessor macro and the definition of asm-generic header. > > In user space, the CONFIG_* symbols are meaningless. Yes, that's the problem. I have not notice it before. So, only one value can be reserved in such circumstances. > > Arnd Thanks & Regards. Guan Xuetao -- 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