lkml.org 
[lkml]   [2015]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH urgent v2] x86, asm: Disable opportunistic SYSRET if regs->flags has TF set

* Denys Vlasenko <dvlasenk@redhat.com> wrote:

> On 04/02/2015 02:59 PM, Denys Vlasenko wrote:
> > On 04/02/2015 02:31 PM, Ingo Molnar wrote:
> >> - we can optimize in a more directed fashion - like here
> >>
> >> ... while the downsides are:
> >>
> >> - more code
> >> - a (small) chance of a fix going to one path while not the other.
> >>
> >> How much extra code would it be?
> >
> > A screenful or two.
>
> I took a stab at it:
>
> text data bss dec hex filename
> 12530 0 0 12530 30f2 entry_64.o2
> 12562 0 0 12562 3112 entry_64.o
>
> The patch does two steps:
>
> (1) copy-pastes "retint_swapgs:" code into syscall handling code,
> the copy is under "syscall_return:" label.
>
> (2) remove "opportunistic sysret" code from "retint_swapgs" code block,
> since now it won't be reached by syscall return. This in fact removes
> most of the code in question.
>
> Lightly run-tested so far.
>
> Ingo, do you want this in a proper patch form?

Yeah, that looks good to me (only lightly reviewed).

Thanks,

Ingo


\
 
 \ /
  Last update: 2015-04-02 18:41    [W:0.071 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site