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, 13 Aug 2014 15:44:18 +0800
From:	Chen Gang <gang.chen.5i5j@...il.com>
To:	"H. Peter Anvin" <hpa@...or.com>, Sam Ravnborg <sam@...nborg.org>
CC:	Arnd Bergmann <arnd@...db.de>, akpm@...ux-foundation.org,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Jean Delvare <jdelvare@...e.de>, linux@....linux.org.uk,
	catalin.marinas@....com, will.deacon@....com, msalter@...hat.com,
	a-jacquiot@...com, tony.luck@...el.com, fenghua.yu@...el.com,
	tglx@...utronix.de, mingo@...hat.com, x86@...nel.org,
	linux-arm-kernel@...ts.infradead.org, linux-c6x-dev@...ux-c6x.org,
	linux-ia64@...r.kernel.org,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	linux-arch@...r.kernel.org
Subject: Re: [PATCH v2] arch: Kconfig: Let all little endian architectures
 define CPU_LITTLE_ENDIAN explicitly



On 8/13/14 14:51, H. Peter Anvin wrote:
> On 08/12/2014 10:32 PM, Chen Gang wrote:
>>
>> Yeah, we need.
>>
>>> The solution you suggest assumes that an arch is either little or big endian.
>>> But we cannot ignore the hybriads that can do both.
>>>
>>
>> For the architectures which can do both, for me, they are: sh, powerpc,
>> m32r, and mips (may mark CPU_LITTLE_ENDIAN), also are: arm/arm64, and
>> c6x (may mark !CPU_BIG_ENDIAN).
>>
>> For the architectures which only support little endian: x86, and ia64.
>>
>> The left, I assumes they are big endian (no any 'ENDIAN' can be found
>> in their Kconfig files). In my memory, except related with Intel, all
>> are (or support) big endian.
>>
> 
> I'm quite certain that is wrong.  From memory, for example, I believe
> CRIS is littleendian, and sure enough:
> 
> : tazenda 103 ; less arch/cris/include/uapi/asm/byteorder.h
> #ifndef _CRIS_BYTEORDER_H
> #define _CRIS_BYTEORDER_H
> 
> #include <linux/byteorder/little_endian.h>
> 
> #endif
> 

OK, what you said sounds reasonable to me. After search "endian" in
"./arch", xtensa also can be support both big endian or little endian.

> As far as I know, endianism is always a compile-time option on Linux, so
> we should be able to relatively easily define the architecture so that
> we either have hardwired littleendian, bigendian, or prompt.
> 

Yeah, but that may break building and re-config manually. So it is still
necessary to check little endian or big endian during configuration time
("make *config").


Thanks.
-- 
Chen Gang

Open, share, and attitude like air, water, and life which God blessed
--
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