Re: 32-bit syscalls from 64-bit process on x86-64?

From: Petr Vandrovec
Date: Tue Dec 14 2004 - 17:01:06 EST


On 14 Dec 04 at 8:45, Andi Kleen wrote:
> > #define TOLM \
> > "pushl %%cs\n" \
> > "pushl $91f\n" \
> > "ljmpl $0x33,$90f\n" \
>
> It's useless, there is nothing in the kernel code that checks the
> 32bit segment.

??? Processor checks for 32bit/64bit segment. It is impossible to load
upper 32bit of all registers with non-zero value or call 64bit
syscall entry point from 32bit mode. As x86-64 kernel offers 64bit
interface through syscall only, only way how to issue 64bit system call
is using syscall instruction in 64bit code.

Or are you trying to say that these samples do not work and you cannot
call 64bit entry point from 32bit app, or vice versa? Then I'm afraid
that you are not completely right, as these samples do work...
Petr Vandrovec

-
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/