Re: amd64 questions

From: Andi Kleen
Date: Wed Apr 07 2004 - 11:17:36 EST


Paul Wagland <paul@xxxxxxxxxxx> writes:

> On Apr 7, 2004, at 13:29, Andi Kleen wrote:
>
>> A few programs (namely iptables and ipsec tools) need to be used
>> as 64bit programs because the 32bit emulation doesn't work for them.
>> ipchains works though.
>
> I seem to recall reading that the DM based programs also need to be 64
> bit, since their 32 bit stuff was also broken?

That was already fixed, but the fix may not be in mainline yet
[and I think it broke ppc64 too]. But right, DM has problems too.

> The question I have is whether or not this is a kernel bug that should
> be fixed? As I understand the DM case, fixing it so that 32bit works,
> then breaks the 64bit interfaces, requiring re-compiles of the DM
> programs.

It is a subsystem bug really. These subsystems were all designed to
not require emulation, but the designers weren't aware of all the
requirements for this and broke it for AMD64/IA64. Unfortunately the
interfaces were done in a way that it would be very complicated and a
lot of work to write an emulation layer, because they're extremly
emulation unfriendly. Maybe it would be still possible to write an
emulation layer, but easier is it to just use static 64bit executables
or hacked 32bit executables.

I don't have any plans to write emulation layers for such hopeless
cases on my own, but just declared these subsystems as broken.

The problem is always the long long alignment. AMD64/IA64 have different
alignment for long long than i386. The emulation was originally tested
on some RISC port, where the alignment is the same.

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/