On Mon, 8 Apr 2024, Florian Weimer via Gcc wrote:

> * Matheus Afonso Martins Moreira via Gcc:
> 
> >   + It's stable
> >
> >         This is one of the things which makes Linux unique
> >         in the operating system landscape: applications
> >         can target the kernel directly. Unlike in virtually
> >         every other operating system out there, the Linux kernel
> >         to user space binary interface is documented[2] as stable.
> >         Breaking it is considered a regression in the kernel.
> >         Therefore it makes sense for a compiler to target it.
> >         The same is not true for any other operating system.
> 
> There is quite a bit of variance in how the kernel is entered.  On
> x86-64, one once popular mechanism is longer present in widely-used
> kernels.

I assume you're implicitly referencing the vsyscall mechanism, but on
amd64 it's not useful to *enter the kernel*, right? It was useful for
obtaining the result of certain syscalls without actually entering
the kernel, like with vdso.

Unlike i386, where the vdso (as well as vsyscall I guess) provides
the __kernel_vsyscall entrypoint, which provides whichever of
{ int 0x80, sysenter, syscall } methods is available and fastest.

Or am I missing something?

Alexander

Reply via email to