Andy Lutomirski 37868fe113 x86/ldt: Make modify_ldt synchronous
modify_ldt() has questionable locking and does not synchronize
threads.  Improve it: redesign the locking and synchronize all
threads' LDTs using an IPI on all modifications.

This will dramatically slow down modify_ldt in multithreaded
programs, but there shouldn't be any multithreaded programs that
care about modify_ldt's performance in the first place.

This fixes some fallout from the CVE-2015-5157 fixes.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Reviewed-by: Borislav Petkov <bp@suse.de>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: security@kernel.org <security@kernel.org>
Cc: <stable@vger.kernel.org>
Cc: xen-devel <xen-devel@lists.xen.org>
Link: http://lkml.kernel.org/r/4c6978476782160600471bd865b318db34c7b628.1438291540.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-07-31 10:23:23 +02:00
..
2015-05-15 16:04:49 +02:00
2015-04-22 08:14:41 +02:00
2015-05-08 12:55:50 +02:00
2015-05-13 10:55:42 +02:00
2015-07-31 10:23:23 +02:00
2015-05-05 20:48:02 +02:00
2014-12-11 11:35:02 +01:00
2015-04-14 16:49:06 -07:00
2015-05-28 15:31:53 +02:00
2015-05-19 15:47:30 +02:00
2012-03-28 18:11:12 +01:00
2014-03-04 21:47:51 +01:00
2013-02-03 18:16:27 -05:00
2015-04-24 15:36:55 +02:00
2012-06-25 13:48:30 +02:00
2015-06-04 16:01:45 +02:00
2015-07-31 10:23:23 +02:00
2014-02-27 08:07:39 -08:00
2014-09-01 10:15:31 +02:00
2015-05-07 11:29:48 +02:00
2012-02-20 12:52:05 -08:00
2014-06-06 16:08:11 -07:00
2015-05-19 15:47:30 +02:00
2015-02-23 13:44:14 +01:00
2014-06-04 16:53:57 -07:00
2014-04-18 14:20:46 +02:00
2015-01-30 09:39:54 +01:00
2015-05-19 15:47:30 +02:00
2015-05-19 15:47:30 +02:00
2015-05-19 15:47:30 +02:00