1
0
Fork 0
remarkable-linux/drivers/base
Andi Kleen 3d98de691c x86/speculation/l1tf: Add sysfs reporting for l1tf
commit 17dbca1193 upstream

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-15 18:12:50 +02:00
..
power PM / OPP: Update voltage in case freq == old_freq 2018-07-03 11:24:47 +02:00
regmap regmap: Correct comparison in regmap_cached 2018-05-30 07:52:41 +02:00
test License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig dma-buf/fence: Fix lock inversion within dma-fence-array 2018-03-19 08:42:47 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
arch_topology.c Revert "base: arch_topology: fix section mismatch build warnings" 2018-04-08 14:26:32 +02:00
attribute_container.c attribute_container: Fix typo 2016-08-31 15:13:56 +02:00
base.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bus.c driver core: bus: Fix a potential double free 2017-08-31 18:57:30 +02:00
cacheinfo.c drivers: base: cacheinfo: fix cache type for non-architected system cache 2018-01-02 20:31:16 +01:00
class.c driver core: remove class_attrs from struct class 2017-06-09 10:41:00 +02:00
component.c Merge 4.5-rc4 into driver-core-next 2016-02-14 14:29:55 -08:00
container.c ACPI / hotplug / driver core: Handle containers in a special way 2013-12-29 15:25:48 +01:00
core.c PM / core: Fix supplier device runtime PM usage counter imbalance 2018-07-03 11:24:47 +02:00
cpu.c x86/speculation/l1tf: Add sysfs reporting for l1tf 2018-08-15 18:12:50 +02:00
dd.c driver core: Partially revert "driver core: correct device's shutdown order" 2018-07-28 07:55:44 +02:00
devcoredump.c driver core: devcoredump: convert to use class_groups 2016-11-29 21:12:12 +01:00
devres.c devres: add devm_alloc_percpu() 2016-11-15 22:34:25 -05:00
devtmpfs.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dma-coherent.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dma-contiguous.c cma: Store a name in the cma structure 2017-04-18 20:41:12 +02:00
dma-mapping.c dma-coherent: remove the DMA_MEMORY_MAP and DMA_MEMORY_IO flags 2017-09-01 11:59:17 +02:00
driver.c driver core: add missing blank line after declaration 2015-03-25 14:36:30 +01:00
firmware.c
firmware_class.c Revert "firmware: add sanity check on shutdown/suspend" 2017-09-10 21:19:06 -07:00
hypervisor.c
init.c drivers: of/base: move of_init to driver_init 2015-05-26 19:55:56 -07:00
isa.c isa: Prevent NULL dereference in isa_bus driver callbacks 2017-12-14 09:52:51 +01:00
map.c drivers: base: map: Use kmalloc_array instead of kmalloc 2015-03-25 14:35:08 +01:00
memory.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
module.c base: make module_create_drivers_dir race-free 2016-06-15 19:21:31 -07:00
node.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pinctrl.c driver core: fix automatic pinctrl management 2017-06-13 11:07:32 +02:00
platform-msi.c irqchip/MSI: Use irq_domain_update_bus_token instead of an open coded access 2017-06-22 18:29:17 +02:00
platform.c driver core: platform: Don't read past the end of "driver_override" buffer 2017-09-18 17:16:47 +02:00
property.c ACPI: properties: Align return codes of __acpi_node_get_property_reference() 2017-10-11 21:15:44 +02:00
soc.c base: soc: Allow early registration of a single SoC device 2017-03-29 21:43:26 +02:00
syscore.c genirq: Simplify wakeup mechanism 2014-09-01 13:48:59 +02:00
topology.c base: topology: constify attribute_group structures. 2017-08-28 17:49:22 +02:00
transport_class.c