linux_dsm_epyc7002/arch/x86/kernel/cpu
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
..
mcheck Merge branch 'x86-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-06-22 17:59:09 -07:00
microcode x86/microcode: Correct CPU family related variable types 2015-06-07 15:38:15 +02:00
mtrr x86/mm/pat: Wrap pat_enabled into a function API 2015-05-27 14:41:01 +02:00
.gitignore
amd.c Merge branch 'x86-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-06-22 17:59:09 -07:00
bugs_64.c
bugs.c x86/fpu: Move various internal function prototypes to fpu/internal.h 2015-05-19 15:47:48 +02:00
centaur.c x86: Remove CONFIG_X86_OOSTORE 2014-03-11 10:16:18 -07:00
common.c x86/ldt: Make modify_ldt synchronous 2015-07-31 10:23:23 +02:00
cpu.h x86/cpu: Track legacy CPU model data only on 32-bit kernels 2013-10-26 13:34:39 +02:00
cyrix.c x86: Delete non-required instances of include <linux/init.h> 2014-01-06 21:25:18 -08:00
hypervisor.c hypervisor/x86/xen: Unset X86_BUG_SYSRET_SS_ATTRS on Xen PV guests 2015-05-05 18:27:43 +01:00
intel_cacheinfo.c x86: Kill CONFIG_X86_HT 2015-06-07 15:33:44 +02:00
intel_pt.h perf/x86/intel/pt: Add Intel PT PMU driver 2015-04-02 17:14:20 +02:00
intel.c x86/cpu/intel: Fix trivial typo in intel_tlb_table[] 2015-02-22 08:55:58 +01:00
Makefile perf/x86/intel/bts: Add BTS PMU driver 2015-04-02 17:14:21 +02:00
match.c x86: align x86 arch with generic CPU modalias handling 2014-02-18 12:45:38 -08:00
mkcapflags.sh x86/build: Fix mkcapflags.sh bash-ism 2015-02-19 02:21:00 +01:00
mshyperv.c x86: Use entering[_ack]_irq() instead of open coding it 2015-05-15 16:03:18 +02:00
perf_event_amd_ibs.c perf/x86/amd/ibs: Convert force_ibs_eilvt_setup() to void 2015-02-18 17:01:46 +01:00
perf_event_amd_iommu.c cpumask: factor out show_cpumap into separate helper function 2014-11-07 11:45:00 -08:00
perf_event_amd_iommu.h perf/x86/amd: AMD IOMMU Performance Counter PERF uncore PMU implementation 2013-06-19 13:04:53 +02:00
perf_event_amd_uncore.c cpumask: factor out show_cpumap into separate helper function 2014-11-07 11:45:00 -08:00
perf_event_amd.c perf/x86: Add 'index' param to get_event_constraint() callback 2015-04-02 17:33:10 +02:00
perf_event_intel_bts.c Replace module_init with appropriate alternate initcall in non modules. 2015-07-02 10:36:29 -07:00
perf_event_intel_cqm.c perf/x86/intel/cqm: Return cached counter value from IRQ context 2015-07-26 10:22:29 +02:00
perf_event_intel_ds.c perf/x86/intel/pebs: Add PEBSv3 decoding 2015-06-07 16:09:16 +02:00
perf_event_intel_lbr.c perf/x86/intel: Drain the PEBS buffer during context switches 2015-06-07 16:08:54 +02:00
perf_event_intel_pt.c Replace module_init with appropriate alternate initcall in non modules. 2015-07-02 10:36:29 -07:00
perf_event_intel_rapl.c Merge branch 'linus' into timers/core 2015-05-19 16:12:32 +02:00
perf_event_intel_uncore_nhmex.c perf/x86/uncore: Fix coccinelle warnings 2014-08-13 07:51:09 +02:00
perf_event_intel_uncore_snb.c perf/x86/intel/uncore: Add Broadwell-U uncore IMC PMU support 2015-05-11 11:57:47 +02:00
perf_event_intel_uncore_snbep.c perf/x86/intel/uncore: Fix CBOX bit wide and UBOX reg on Haswell-EP 2015-06-07 15:46:50 +02:00
perf_event_intel_uncore.c Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-06-22 18:57:44 -07:00
perf_event_intel_uncore.h Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-06-22 15:19:21 -07:00
perf_event_intel.c Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-06-22 15:52:04 -07:00
perf_event_knc.c x86: Replace __get_cpu_var uses 2014-08-26 13:45:49 -04:00
perf_event_p4.c x86: Replace __get_cpu_var uses 2014-08-26 13:45:49 -04:00
perf_event_p6.c perf/x86/intel/p6: Add userspace RDPMC quirk for PPro 2014-02-09 13:08:24 +01:00
perf_event.c x86/ldt: Make modify_ldt synchronous 2015-07-31 10:23:23 +02:00
perf_event.h Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-06-22 15:45:41 -07:00
perfctr-watchdog.c
powerflags.c update AMD powerflags comments 2013-05-28 12:02:10 +02:00
proc.c x86: Replace cpu_**_mask() with topology_**_cpumask() 2015-05-27 15:22:17 +02:00
rdrand.c x86, rdrand: When nordrand is specified, disable RDSEED as well 2014-05-11 20:25:20 -07:00
scattered.c x86: Add Intel Processor Trace (INTEL_PT) cpu feature detection 2015-04-02 17:14:18 +02:00
topology.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
transmeta.c x86: Delete non-required instances of include <linux/init.h> 2014-01-06 21:25:18 -08:00
umc.c x86: Delete non-required instances of include <linux/init.h> 2014-01-06 21:25:18 -08:00
vmware.c x86: Correctly detect hypervisor 2013-08-05 06:35:33 -07:00