linux/drivers/base
Andi Kleen 17dbca1193 x86/speculation/l1tf: Add sysfs reporting for l1tf
L1TF core kernel workarounds are cheap and normally always enabled, However
they still should be reported in sysfs if the system is vulnerable or
mitigated. Add the necessary CPU feature/bug bits.

- Extend the existing checks for Meltdowns to determine if the system is
  vulnerable. All CPUs which are not vulnerable to Meltdown are also not
  vulnerable to L1TF

- Check for 32bit non PAE and emit a warning as there is no practical way
  for mitigation due to the limited physical address bits

- If the system has more than MAX_PA/2 physical memory the invert page
  workarounds don't protect the system against the L1TF attack anymore,
  because an inverted physical address will also point to valid
  memory. Print a warning in this case and report that the system is
  vulnerable.

Add a function which returns the PFN limit for the L1TF mitigation, which
will be used in follow up patches for sanity and range checks.

[ tglx: Renamed the CPU feature bit to L1TF_PTEINV ]

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Josh Poimboeuf <jpoimboe@redhat.com>
Acked-by: Dave Hansen <dave.hansen@intel.com>
2018-06-20 19:10:00 +02:00
..
firmware_loader treewide: Use array_size() in vmalloc() 2018-06-12 16:19:22 -07:00
power Merge branches 'pm-domains' and 'pm-tools' 2018-06-13 11:08:44 +02:00
regmap Merge branch 'regmap-4.17' into regmap-4.18 for the merge window 2018-06-04 12:03:03 +01:00
test driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
Kconfig firmware_loader: move kconfig FW_LOADER entries to its own file 2018-05-14 16:43:10 +02:00
Makefile Driver core patches for 4.17-rc1 2018-04-04 19:41:45 -07:00
arch_topology.c Revert "base: arch_topology: fix section mismatch build warnings" 2018-03-15 14:36:20 +01:00
attribute_container.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
base.h PM / core: fix deferred probe breaking suspend resume order 2018-04-24 12:18:25 +02:00
bus.c driver core: hold dev's parent lock when needed 2018-05-31 10:12:07 +02:00
cacheinfo.c drivers: base cacheinfo: Add support for ACPI based firmware tables 2018-05-17 17:28:09 +01:00
class.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
component.c component: add debugfs support 2017-12-18 16:51:11 +01:00
container.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
core.c Driver core changes for 4.18-rc1 2018-06-05 16:29:19 -07:00
cpu.c x86/speculation/l1tf: Add sysfs reporting for l1tf 2018-06-20 19:10:00 +02:00
dd.c Additional power management updates for 4.18-rc1 2018-06-13 07:24:18 -07:00
devcon.c drivers: base: Unified device connection lookup 2018-03-22 13:10:29 +01:00
devcoredump.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
devres.c device: Use overflow helpers for devm_kmalloc() 2018-06-05 12:16:51 -07:00
devtmpfs.c kernel: add ksys_unshare() helper; remove in-kernel calls to sys_unshare() 2018-04-02 20:16:06 +02:00
dma-coherent.c dma-coherent: clarify dma_mmap_from_dev_coherent documentation 2018-04-23 14:44:17 +02:00
dma-contiguous.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
dma-mapping.c dma-mapping: move dma configuration to bus infrastructure 2018-05-03 16:22:18 +02:00
driver.c driver-core: return EINVAL error instead of BUG_ON() 2018-05-25 18:18:45 +02:00
firmware.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
hypervisor.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
init.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
isa.c Merge 4.15-rc3 into driver-core-next 2017-12-11 08:50:05 +01:00
map.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
memory.c mm: memory_hotplug: use put_device() if device_register fail 2018-05-14 16:48:59 +02:00
module.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
node.c mm/memory_hotplug: fix leftover use of struct page during hotplug 2018-05-25 18:12:11 -07:00
pinctrl.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
platform-msi.c genirq/msi: Limit level-triggered MSI to platform devices 2018-05-13 15:58:59 +02:00
platform.c Power management updates for 4.18-rc1 2018-06-05 09:38:39 -07:00
property.c device property: Get rid of union aliasing 2018-05-17 12:47:21 +02:00
soc.c base: soc: use put_device() instead of kfree() 2018-03-15 14:37:03 +01:00
syscore.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
topology.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
transport_class.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00