Bug 151453 - vdso should use AMD syscall
vdso should use AMD syscall
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
i686 Linux
medium Severity low
: ---
: ---
Assigned To: Roland McGrath
Brian Brock
Depends On: 151450
  Show dependency treegraph
Reported: 2005-03-17 21:40 EST by Roland McGrath
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-03-02 05:10:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Roland McGrath 2005-03-17 21:40:10 EST
AMD processors have the `syscall' and `sysret' instructions, which are like
Intel's sysenter/sysexit but with fewer problems.  Firstly, the upstream kernel
should get changes to support syscall/sysret for AMD processors.  Then we will
need to modify these for exec-shield support.

See bug #151452 for related issues with exec-shield (not an issue for upstream).
 syscall/sysret only has one of those problems, not both.

First we should try using syscall and not using sysret, which may have a
performance improvement vs using int.

The issue is conflicts with cs segment limits used by exec-shield.
sysret cannot be used when cs segment limits are being used.  But, newer
processors have NX support and do not need to use segment limits.
We should conditionalize sysret use on that.
Comment 1 Dave Jones 2005-10-06 01:12:45 EDT
We already do the conditionalisation (is that a word? it is now!) on NX, and
that works fine afaik.

syscall support however is indeed still lacking (at least for ia32). I thought I
read that sysexit also resets segment limits, but I could be misremembering. 
The thread on lkml when Linus first did the sysenter support did touch on this
briefly iirc.  I'll see if I can dig it out.
Comment 2 Roland McGrath 2005-10-06 04:21:15 EDT
sysenter also resets to flat segments, yes.  That's why it's disabled when using
segment limits for execute protection (i.e. no NX).  The only issue is the extra
entrypoint flavor for syscall on AMD 32-bit.  But since we only enable it for NX
(upstream doesn't constrain it, since no exec-shield), I don't think it's worth
bothering.  I'm not sure, but I think that maybe all the AMD chips that support
NX also support sysenter (though older AMD chips only support syscall). 
Comment 3 Roland McGrath 2006-03-02 05:10:02 EST
Not worth worrying about.  Someone upstream might decide to optimize old AMD chips.

Note You need to log in before you can comment on or make changes to this bug.