Re: Syscall changes registers beyond %eax, on linux-i386

Mikael Pettersson (mikpe@csd.uu.se)
Thu, 19 Sep 2002 22:25:07 +0200


Daniel Jacobowitz writes:
> That's not going to help. As Richard said, the memory in question
> belongs to the called function. GCC knows this. It can freely modify
> it. The fact that the value of the parameter is const is a
> language-level, semantic thing. It doesn't say anything about the
> const-ness of that memory. Only the ABI does.

Does Linux/x86 even have a proper ABI document? I've never seen one.
The closest I've seen would be the SVR4 i386 psABI, but it
deliberately doesn't define the raw syscall interface, only the
each-syscall-is-a-C-function one implemented by the C library,
and that interface doesn't suffer from the current issue.

IOW, the kernel may not be at fault if user-space code invokes int
$0x80 directly and then sees clobbered registers.

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