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]
Message-ID: <4706A842.9030507@freescale.com>
Date:	Fri, 05 Oct 2007 16:10:26 -0500
From:	Timur Tabi <timur@...escale.com>
To:	Anton Altaparmakov <aia21@....ac.uk>
CC:	Jan Engelhardt <jengelh@...putergmbh.de>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: __LITTLE_ENDIAN vs. __LITTLE_ENDIAN_BITFIELD

Anton Altaparmakov wrote:

>> ---LSB-- ---2SB-- ---3SB-- ---MSB-- [bytes] LITTLE_ENDIAN
>> L234567M L234567M L234567M L234567M  [bits] LITTLE_ENDIAN_BITFIELD
> 
> No it is not.  That makes no sense. 

Why not?  I honestly don't know what x86 does, but I would think that if I 
write a 32-bit value to a memory location, that when I examine that memory 
location, all 32 bits will be in order.

> The whole point of little endian is 
> that you store LSB, then 2SB, then 3SB, then MSB and then when the CPU 

You're talking about byte endian.  I'm talking about bit endian -- the order 
of bits within a byte.  Software cannot know what the bit endian is, but 
external devices that have memory-mapped registers can know.

> reads this as a 32-bit word it rotates them all around so that in the 
> CPU register you have:
> 
> MSB_3SB_2SB_LSB
> M765432L_M765432L_M765432L_M765432L
> 
> That is what little endian means and that is how shift operations can 
> work fine on the CPU.

The CPU shift operation, yes.  I'm talking about shift operations on external 
memory-mapped devices.

-- 
Timur Tabi
Linux Kernel Developer @ Freescale
-
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