On 12 Jan 2004 08:51:02 -0500
jamal <hadi@xxxxxxxxxx> wrote:
> Andi,
> Can you point to specifics that break 64 bit emulation so we can avoid
> them?
> I have to admit the pf_key interaction is relatively unorthrodox but
> looked fine.
Ok, here are the full rules:
Standards:
long/void * are disallowed
use [su]{16,32,64} instead
Non obvious problems specific to IA64 and x86-64 (they don't happen on
sparc64/ppc64,
that is why they were often not catched earlier):
When you use [su]64:
make sure the data element is explicitely padded to be on a 8 byte boundary
in the structure. The reason is that alignof(u64) on i386 is 4 but 8 on
ia64/x86-64
and the structure layout could change.
also when you use 64bit types make sure the complete structure is padded to 8
bytes.
The x86-64 ABI pads any data structure to the alignof() of its biggest member
to get good alignment for arrays. This is what broke PF_KEY - it is missing this
padding and the structure layout ends up differently with nested structures.
> What are the things you will perform surgery on?
I'm not sure I will because it is too ugly. Or at least I haven't found a nice
elegant
way for it yet. Currently you just cannot use ipsec from 32bit executables, you
have to use
64bit.
-Andi
|