lkml.org 
[lkml]   [2012]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86-32: A better system call mechanism
Hi Peter,

On Sun, Apr 01, 2012 at 12:00:00AM +0000, H. Peter Anvin wrote:
> On x86-32, we currently use int $0x80 as the primary system call
> mechanism. Although there are some recent variants available on
> certain hardware (sysenter, syscall) via the vdso, the primary system
> call vector is still way up the interrupt vector table, which is
> inefficient.
>
> This patch adds a very small amount of code which permits the very
> first vector to be used for system call. That vector is #DE, divide
> error, generally known as division by zero.

Looks like a clever trick, but beyond the beauty, what does it really
save ? Code size is the same as aam 0 / div edx are both 2-byte long,
just like int 0x80. Is the call less expensive ? And if so, how does
it compare to vdso ?

Thanks,
Willy



\
 
 \ /
  Last update: 2012-04-01 08:53    [W:0.026 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site