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: <454F12C7.4070504@qumranet.com>
Date:	Mon, 06 Nov 2006 12:47:35 +0200
From:	Avi Kivity <avi@...ranet.com>
To:	Arjan van de Ven <arjan@...radead.org>
CC:	kvm-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org,
	akpm@...l.org
Subject: Re: [PATCH 1/14] KVM: userspace interface

Arjan van de Ven wrote:
>> \> as a general rule, it's a lot better to sort structures big-to-small, to
>>     
>>> make sure alignments inside the struct are minimized and don't suck too
>>> much. This is especially important to get right for 32/64 bit
>>> compatibility. This comment is true for most structures in this header
>>> file; please consider this at least
>>>   
>>>       
>> Doesn't that cause an unnatural field order? 
>>     
>
> Does it matter?
>
>   

Just a matter of taste.

>> for example, in some 
>> structures I separated in and out variables.  Sorting by size is a bit 
>> like sorting alphabetically.
>>
>> Anyway I observed 32/64 bit compatibility religiously.
>>     
>
> but you did take the alignment rules of 64 bit variables into account,
> eg 32 bit has it 4 byte aligned, while 64 bit has it 8 byte aligned..
> you are 100% sure even your 32 bit structures have all 64 bit values 8
> byte aligned?
> (you get this automatic if you sort by size)
> Also you made sure that if you have such implicit padding that you zero
> out the memory between the fields to avoid information leaks?
>   

I put explicit padding everywhere.

> Sorting by size at least makes this all go away.....
>
>   

True.  I'll rethink it.

-- 
error compiling committee.c: too many arguments to function

-
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