android_kernel_samsung_univ.../drivers/base
Andi Kleen bf0cca01b8 x86/speculation/l1tf: Add sysfs reporting for l1tf
commit 17dbca119312b4e8173d4e25ff64262119fcef38 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 ]
[ dwmw2: Backport to 4.9 (cpufeatures.h, E820) ]

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: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-15 17:42:09 +02:00
..
power PM / sleep: declare __tracedata symbols as char[] rather than char 2018-01-31 12:06:08 +01:00
regmap regmap: Fix reversed bounds check in regmap_raw_write() 2018-04-24 09:32:06 +02:00
attribute_container.c
base.h
bus.c
cacheinfo.c drivers: base: cacheinfo: fix boot error message when acpi is enabled 2018-01-31 12:06:08 +01:00
class.c
component.c
container.c
core.c driver core: Don't ignore class_dir_create_and_add() failure. 2018-07-03 11:21:25 +02:00
cpu.c x86/speculation/l1tf: Add sysfs reporting for l1tf 2018-08-15 17:42:09 +02:00
dd.c driver core: Partially revert "driver core: correct device's shutdown order" 2018-07-28 07:45:03 +02:00
devcoredump.c
devres.c
devtmpfs.c
dma-coherent.c
dma-contiguous.c
dma-mapping.c
driver.c
firmware_class.c
firmware.c
hypervisor.c
init.c
isa.c isa: Prevent NULL dereference in isa_bus driver callbacks 2017-12-16 10:33:48 +01:00
Kconfig sysfs/cpu: Add vulnerability folder 2018-01-17 09:35:33 +01:00
Makefile
map.c
memory.c
module.c
node.c
pinctrl.c
platform-msi.c
platform.c
property.c
soc.c
syscore.c
topology.c
transport_class.c