Re: Linux doesn't follow x86/x86-64 ABI wrt direction flag

H. Peter Anvin
2008-03-05T21:12:16Z

Jan Hubicka wrote:
>> Yes, if there are four kernels that get it "wrong", that effectively means
>> that the ABI document doesn't describe reality and gcc has to adjust.
>
> Kernels almost never follow ABI used by applications to last detail.
> Linux kernel is disabling red zone and use kernel code model, yet the
> ABI is not going to be adjusted for that.
>
> This is resonably easy to fix on kernel side in signal handling, or by
> removing std usage completely (I believe it is not performance win, but
> some benchmarking would be needed to double check)

That's not the issue. The issue is that the kernel leaks the DF from
the code that took a signal to the signal handler.

-hpa