From: Simon Farnsworth <simon@farnz.org.uk>
To: linux-kernel@vger.kernel.org
Subject: Re: Do the x86 kernel entry points need an xabort on TSX cpus?
Date: Fri, 10 Feb 2012 18:51:13 +0000 [thread overview]
Message-ID: <jh3ovb$tsk$1@dough.gmane.org> (raw)
In-Reply-To: CALCETrVHpfW5=paX8XjGNBg3Q7sjeLptMBG6bW=iQpXk0Uo+PA@mail.gmail.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Andy Lutomirski wrote:
> On Fri, Feb 10, 2012 at 9:18 AM, H. Peter Anvin <hpa@linux.intel.com>
> wrote:
>> On 02/09/2012 11:40 PM, Andy Lutomirski wrote:
>>>
>>> [...]
>>>
>>> - Ring transitions: SYSENTER, SYSCALL, SYSEXIT, and SYSRET.
>>>
>>> I suspect that many bits of the kernel expect that things they do
>>> won't unhappen. For example, it could be fun to do:
>>>
>>
>> That's why entering the kernel will cause an abort. In other words, you
>> will ALWAYS abort when you do a read(), and you will never reach your
>> _xabort().
>
> Is that architecturally guaranteed? (My manual suggests that it's
> specifically *not* guaranteed, which is surprising.)
>
> --Andy
My understanding of the architecture manual's wording (which is a bit
clumsy) is that they want to leave themselves wiggle room just in case they
work out a way to do any of these things without requiring an abort.
If, for example, Intel add an MSR for SYSENTER that's used to go to a
different entrypoint if you're mid-transaction, you've suddenly broken all
code that assumes that SYSENTER triggers an abort - instead, some SYSENTERs
trigger an abort (as the kernel does the XABORT), while others don't.
Current implementations appear to always abort on ring transition, though.
- --
Simon Farnsworth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQEcBAEBAgAGBQJPNWclAAoJEIKsye9/dtRWNoAH/j6H6mUzk+eS4yeZlcfd1DbG
cIicIJWGJNfm/TWAGb2ABrFgyDS+568ODFUogtAoLFcaxUieVVmuopjfgdjfiLdr
GoANhzyzohknQnHyiQetyTOzmkQVYCrMuRt/qplMO+k5DuvuN0FNxGW990B4jwQL
kFC2KSDMi2QKUnla2XbVsHR7xqe8gRJMEVB5DREkFiVhJGaf4Eyj0Rh4yLfSu9Ka
IngcU7Q6dmSlwCzmt/r+5BJeMvzfDa76+NxdStYDxe2FcZx7BdHeUwM9YyRPcrFp
Cgosn+C8Aiea15Ti/xYpd+M8LWGK8bq4XiV9a8D9WSagGngBrO1u1iCnx2hYKdI=
=hHwE
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2012-02-10 18:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-10 7:40 Do the x86 kernel entry points need an xabort on TSX cpus? Andy Lutomirski
2012-02-10 17:18 ` H. Peter Anvin
2012-02-10 17:24 ` Andy Lutomirski
2012-02-10 18:51 ` Simon Farnsworth [this message]
2012-02-21 19:30 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='jh3ovb$tsk$1@dough.gmane.org' \
--to=simon@farnz.org.uk \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.