lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 20 Jun 2008 17:27:58 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Jeremy Fitzhardinge <jeremy@...p.org>
CC:	Roland McGrath <roland@...hat.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: Various x86 syscall mechanisms

Jeremy Fitzhardinge wrote:
> Hi Roland,
> 
> As far as I can work out, an x86_32 kernel will use "int 0x80" and 
> "sysenter" for system calls.  64-bit kernel will use just "syscall" for 
> 64-bit processes (though you can use "int 0x80" to access the 32-bit 
> syscall interface from a 64-bit process), but will allow "sysenter", 
> "syscall" or "int 0x80" for 32-on-64 processes.
> 
> Why does 32-on-64 implement 32-bit syscall when native 32-bit doesn't 
> seem to?  Or am I overlooking something here?  Does 32-bit also support 
> syscall?

The reason is that not all 64-bit processors (i.e. K8) support a 32-bit 
sysenter in long mode (i.e. with a 64-bit kernel.)  sysenter is *always* 
entered from the vdso, since the return address is lost and this is also 
where a 64-bit kernel can put a syscall.

There is no reason we couldn't do syscall for 32-bit native, but the 
only processor that would benefit would be K7, and that's far enough in 
the past that I don't think anyone cares enough.

Note that long mode syscall is different from protected mode syscall, 
even in 32-bit compatibility mode.  The long mode variant is a lot saner.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ