linux/arch/x86/kernel/cpu
Jithu Joseph b61b8bba18 x86/intel_rdt: Prevent pseudo-locking from using stale pointers
When the last CPU in an rdt_domain goes offline, its rdt_domain struct gets
freed. Current pseudo-locking code is unaware of this scenario and tries to
dereference the freed structure in a few places.

Add checks to prevent pseudo-locking code from doing this.

While further work is needed to seamlessly restore resource groups (not
just pseudo-locking) to their configuration when the domain is brought back
online, the immediate issue of invalid pointers is addressed here.

Fixes: f4e80d67a5 ("x86/intel_rdt: Resctrl files reflect pseudo-locked information")
Fixes: 443810fe61 ("x86/intel_rdt: Create debugfs files for pseudo-locking testing")
Fixes: 746e08590b ("x86/intel_rdt: Create character device exposing pseudo-locked region")
Fixes: 33dc3e410a ("x86/intel_rdt: Make CPU information accessible for pseudo-locked regions")
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: fenghua.yu@intel.com
Cc: tony.luck@intel.com
Cc: gavin.hindman@intel.com
Cc: hpa@zytor.com
Link: https://lkml.kernel.org/r/231f742dbb7b00a31cc104416860e27dba6b072d.1539384145.git.reinette.chatre@intel.com
2018-10-19 14:54:28 +02:00
..
mcheck libnvdimm-for-4.19_dax-memory-failure 2018-08-25 18:43:59 -07:00
microcode x86/microcode: Update the new microcode revision unconditionally 2018-09-02 14:10:54 +02:00
mtrr x86/mtrr: Don't copy out-of-bounds data in mtrr_write 2018-07-07 18:58:41 +02:00
.gitignore
amd.c x86/cpu/amd: Remove unnecessary parentheses 2018-10-03 08:27:47 +02:00
aperfmperf.c x86 / CPU: Always show current CPU frequency in /proc/cpuinfo 2017-11-15 19:46:50 +01:00
bugs.c x86/speculation/l1tf: Increase l1tf memory limit for Nehalem+ 2018-08-27 10:29:14 +02:00
cacheinfo.c x86/CPU/AMD: Fix LLC ID bit-shift calculation 2018-06-22 21:21:49 +02:00
centaur.c x86/CPU: Move x86_cpuinfo::x86_max_cores assignment to detect_num_cpu_cores() 2018-05-13 16:14:24 +02:00
common.c x86/speculation/l1tf: Increase l1tf memory limit for Nehalem+ 2018-08-27 10:29:14 +02:00
cpu.h xen: features and fixes for 4.19-rc1 2018-08-14 16:54:22 -07:00
cpuid-deps.c x86/cpuid: Switch to 'static const' specifier 2018-03-08 12:23:42 +01:00
cyrix.c x86/cpu: Rename cpu_data.x86_mask to cpu_data.x86_stepping 2018-02-15 01:15:52 +01:00
hypervisor.c x86/jailhouse: Add infrastructure for running in non-root cell 2018-01-14 21:11:54 +01:00
intel_pconfig.c x86/pconfig: Detect PCONFIG targets 2018-03-12 12:10:54 +01:00
intel_rdt_ctrlmondata.c x86/intel_rdt: Prevent pseudo-locking from using stale pointers 2018-10-19 14:54:28 +02:00
intel_rdt_monitor.c x86/intel_rdt/mba_sc: Feedback loop to dynamically update mem bandwidth 2018-05-19 13:16:44 +02:00
intel_rdt_pseudo_lock_event.h x86/intel_rdt: Support L3 cache performance event of Broadwell 2018-06-24 15:35:48 +02:00
intel_rdt_pseudo_lock.c x86/intel_rdt: Prevent pseudo-locking from using stale pointers 2018-10-19 14:54:28 +02:00
intel_rdt_rdtgroup.c x86/intel_rdt: Prevent pseudo-locking from using stale pointers 2018-10-19 14:54:28 +02:00
intel_rdt.c x86/intel_rdt: Prevent pseudo-locking from using stale pointers 2018-10-19 14:54:28 +02:00
intel_rdt.h x86/intel_rdt: Fix out-of-bounds memory access in CBM tests 2018-10-09 08:02:15 +02:00
intel.c x86/spectre: Add missing family 6 check to microcode check 2018-08-27 10:29:14 +02:00
Makefile x86/intel_rdt: Create debugfs files for pseudo-locking testing 2018-06-23 13:03:51 +02:00
match.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mkcapflags.sh License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mshyperv.c Drivers: hv: vmbus: Make TLFS #define names architecture neutral 2018-07-03 13:09:15 +02:00
perfctr-watchdog.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
powerflags.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
proc.c x86/cpu: Change type of x86_cache_size variable to unsigned int 2018-02-15 01:15:53 +01:00
rdrand.c x86, asm: Use CC_SET()/CC_OUT() and static_cpu_has() in archrandom.h 2016-06-08 12:41:20 -07:00
scattered.c Merge branch 'x86/hyperv' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-02-01 15:04:17 +01:00
topology.c x86/cpu/topology: Provide detect_extended_topology_early() 2018-06-21 14:20:59 +02:00
transmeta.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
umc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vmware.c x86/virt: Add enum for hypervisors to replace x86_hyper 2017-11-10 10:03:12 +01:00