From: "H. Peter Anvin" <hpa@zytor.com>
To: Andy Lutomirski <luto@amacapital.net>,
Sebastian Lackner <sebastian@fds-team.de>
Cc: Thomas Gleixner <tglx@linutronix.de>, X86 ML <x86@kernel.org>,
Ingo Molnar <mingo@redhat.com>, Anish Bhatt <anish@chelsio.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Chuck Ebbert <cebbert.lkml@gmail.com>,
stable <stable@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] x86_64,entry: Filter RFLAGS.NT on entry from userspace
Date: Wed, 01 Oct 2014 08:19:54 -0700 [thread overview]
Message-ID: <542C1B9A.4050704@zytor.com> (raw)
In-Reply-To: <CALCETrVNMhvn6z_5=+6UavkR1m8cABrkSWsLpP_dLdG_3OipBA@mail.gmail.com>
On 09/30/2014 10:24 PM, Andy Lutomirski wrote:
> On Tue, Sep 30, 2014 at 10:09 PM, Sebastian Lackner
> <sebastian@fds-team.de> wrote:
>>> + testl $X86_EFLAGS_NT,EFLAGS(%rsp) /* saved EFLAGS match cpu */
>>> + jz 1f
>>> + pushq_cfi $(X86_EFLAGS_IF|X86_EFLAGS_FIXED)
>>> + popfq_cfi
>>> +1:
>>> +
>>
>> Do you think it makes sense to change the order here, so that no jump happens if
>> NT is not set (which happens a bit more often, than the other way round)? Just a
>> guess though, haven't measured if pipeline effects have such a big influence in this
>> case. ;)
>>
>
> It should be immeasurable in a tight loop, since it will predict
> correctly almost every time. And, unless cfi state works across
> .pushsection (does it?), getting the cfi annotations right will be
> more complicated.
>
It does, actually... otherwise it would be almost impossible to use in a
lot of cases.
-hpa
next prev parent reply other threads:[~2014-10-01 15:20 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-01 4:51 [PATCH v2 0/2] x86_64,entry: Clear NT on entry and speed up switch_to Andy Lutomirski
2014-10-01 4:51 ` [PATCH v2 1/2] x86_64,entry: Filter RFLAGS.NT on entry from userspace Andy Lutomirski
2014-10-01 5:09 ` Sebastian Lackner
2014-10-01 5:24 ` Andy Lutomirski
2014-10-01 15:19 ` H. Peter Anvin [this message]
2014-10-01 14:09 ` Chuck Ebbert
2014-10-01 14:32 ` Chuck Ebbert
2014-10-01 14:46 ` Andy Lutomirski
2014-10-01 14:56 ` Chuck Ebbert
2014-10-01 15:03 ` Andy Lutomirski
2014-10-01 15:22 ` H. Peter Anvin
2014-10-01 15:26 ` H. Peter Anvin
2014-10-01 15:50 ` Andy Lutomirski
2014-10-01 16:04 ` Andy Lutomirski
2014-10-01 16:17 ` H. Peter Anvin
2014-10-01 4:51 ` [PATCH v2 2/2] x86_64: Don't save flags on context switch Andy Lutomirski
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=542C1B9A.4050704@zytor.com \
--to=hpa@zytor.com \
--cc=anish@chelsio.com \
--cc=cebbert.lkml@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@redhat.com \
--cc=sebastian@fds-team.de \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@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.