All of lore.kernel.org
 help / color / mirror / Atom feed
* Stack switching plan of attack (Re: [PATCH v2 00/18] Entry stack switching)
@ 2017-11-23 15:50 Andy Lutomirski
  2017-11-23 18:09 ` Borislav Petkov
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Lutomirski @ 2017-11-23 15:50 UTC (permalink / raw)
  To: Andy Lutomirski
  Cc: X86 ML, Borislav Petkov, linux-kernel, Brian Gerst, Dave Hansen,
	Linus Torvalds, Josh Poimboeuf

On Tue, Nov 21, 2017 at 8:43 PM, Andy Lutomirski <luto@kernel.org> wrote:
> This sets up stack switching, including for SYSCALL.  I think it's
> in decent shape.

What's the plan of attack?  is the goal to get this thing in -rc1 or
as soon as possible thereafter?

If so, I think there are two things that need fixing to make it upstream-worthy:

1. There needs to be a way to turn it off to get the performance hit
under control.  I'm leaning toward a boot-time switch, and we can turn
it into a runtime switch later on.  Thoughts?  I don't care too much
about idtentry performance, but syscall performance matters a lot, and
my patches slow it down.  I probably need to benchmark to see whether
there's any point to turning *entry* stack switching off, but we
definitely need to turn *exit* stack switching off when it's not
needed.

(Entry stack switching doesn't directly affect SYSCALL, and I've
structured the SYSCALL code so that the entry part can be turned on
and off just by changing the entry target MSR.)

2. The TSS should be RO.  Otherwise I think it's just too big a
security regression.

and possibly 3: fix the existing performance regression on Atom
syscalls.  That's easy-ish, but it's ugly and stupid.

I'm assuming that KAISER itself will miss the merge window and that
we'll just deal with it.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Stack switching plan of attack (Re: [PATCH v2 00/18] Entry stack switching)
  2017-11-23 15:50 Stack switching plan of attack (Re: [PATCH v2 00/18] Entry stack switching) Andy Lutomirski
@ 2017-11-23 18:09 ` Borislav Petkov
  0 siblings, 0 replies; 2+ messages in thread
From: Borislav Petkov @ 2017-11-23 18:09 UTC (permalink / raw)
  To: Andy Lutomirski
  Cc: X86 ML, linux-kernel, Brian Gerst, Dave Hansen, Linus Torvalds,
	Josh Poimboeuf

On Thu, Nov 23, 2017 at 07:50:59AM -0800, Andy Lutomirski wrote:
> 1. There needs to be a way to turn it off to get the performance hit
> under control.  I'm leaning toward a boot-time switch, and we can turn
> it into a runtime switch later on.  Thoughts?

Yes, we need a runtime switch off for machines/vendors which might not
be affected.

> I don't care too much about idtentry performance, but syscall
> performance matters a lot, and my patches slow it down. I probably
> need to benchmark to see whether

Yeah, having numbers here would be good.

> there's any point to turning *entry* stack switching off, but we
> definitely need to turn *exit* stack switching off when it's not
> needed.
>
> (Entry stack switching doesn't directly affect SYSCALL, and I've
> structured the SYSCALL code so that the entry part can be turned on
> and off just by changing the entry target MSR.)
>
> 2. The TSS should be RO.  Otherwise I think it's just too big a
> security regression.
>
> and possibly 3: fix the existing performance regression on Atom
> syscalls.  That's easy-ish, but it's ugly and stupid.
>
> I'm assuming that KAISER itself will miss the merge window and that
> we'll just deal with it.

4. Backporting the whole crap is another PITA topic...

-- 
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
-- 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-11-23 18:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-23 15:50 Stack switching plan of attack (Re: [PATCH v2 00/18] Entry stack switching) Andy Lutomirski
2017-11-23 18:09 ` Borislav Petkov

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.