1. 17 May, 2018 2 commits
  2. 14 May, 2018 1 commit
  3. 12 May, 2018 1 commit
  4. 10 May, 2018 2 commits
  5. 09 May, 2018 3 commits
  6. 04 May, 2018 6 commits
  7. 03 May, 2018 19 commits
  8. 02 May, 2018 1 commit
    • Thomas Gleixner's avatar
      x86/cpu: Restore CPUID_8000_0008_EBX reload · c65732e4
      Thomas Gleixner authored
      The recent commt which addresses the x86_phys_bits corruption with
      encrypted memory on CPUID reload after a microcode update lost the reload
      of CPUID_8000_0008_EBX as well.
      
      As a consequence IBRS and IBRS_FW are not longer detected
      
      Restore the behaviour by bringing the reload of CPUID_8000_0008_EBX
      back. This restore has a twist due to the convoluted way the cpuid analysis
      works:
      
      CPUID_8000_0008_EBX is used by AMD to enumerate IBRB, IBRS, STIBP. On Intel
      EBX is not used. But the speculation control code sets the AMD bits when
      running on Intel depending on the Intel specific speculation control
      bits. This was done to use the same bits for alternatives.
      
      The change which moved the 8000_0008 evaluation out of get_cpu_cap() broke
      this nasty scheme due to ordering. So that on Intel the store to
      CPUID_8000_0008_EBX clears the IBRB, IBRS, STIBP bits which had been set
      before by software.
      
      So the actual CPUID_8000_0008_EBX needs to go back to the place where it
      was and the phys/virt address space calculation cannot touch it.
      
      In hindsight this should have used completely synthetic bits for IBRB,
      IBRS, STIBP instead of reusing the AMD bits, but that's for 4.18.
      
      /me needs to find time to cleanup that steaming pile of ...
      
      Fixes: d94a155c ("x86/cpu: Prevent cpuinfo_x86::x86_phys_bits adjustment corruption")
      Reported-by: default avatarJörg Otte <jrg.otte@gmail.com>
      Reported-by: default avatarTim Chen <tim.c.chen@linux.intel.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Tested-by: default avatarJörg Otte <jrg.otte@gmail.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: kirill.shutemov@linux.intel.com
      Cc: Borislav Petkov <bp@alien8.de
      Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1805021043510.1668@nanos.tec.linutronix.de
      c65732e4
  9. 29 Apr, 2018 5 commits
    • Linus Torvalds's avatar
      Linux v4.17-rc3 · 6da6c0db
      Linus Torvalds authored
      6da6c0db
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · c61a56ab
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "Another set of x86 related updates:
      
         - Fix the long broken x32 version of the IPC user space headers which
           was noticed by Arnd Bergman in course of his ongoing y2038 work.
           GLIBC seems to have non broken private copies of these headers so
           this went unnoticed.
      
         - Two microcode fixlets which address some more fallout from the
           recent modifications in that area:
      
            - Unconditionally save the microcode patch, which was only saved
              when CPU_HOTPLUG was enabled causing failures in the late
              loading mechanism
      
            - Make the later loader synchronization finally work under all
              circumstances. It was exiting early and causing timeout failures
              due to a missing synchronization point.
      
         - Do not use mwait_play_dead() on AMD systems to prevent excessive
           power consumption as the CPU cannot go into deep power states from
           there.
      
         - Address an annoying sparse warning due to lost type qualifiers of
           the vmemmap and vmalloc base address constants.
      
         - Prevent reserving crash kernel region on Xen PV as this leads to
           the wrong perception that crash kernels actually work there which
           is not the case. Xen PV has its own crash mechanism handled by the
           hypervisor.
      
         - Add missing TLB cpuid values to the table to make the printout on
           certain machines correct.
      
         - Enumerate the new CLDEMOTE instruction
      
         - Fix an incorrect SPDX identifier
      
         - Remove stale macros"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/ipc: Fix x32 version of shmid64_ds and msqid64_ds
        x86/setup: Do not reserve a crash kernel region if booted on Xen PV
        x86/cpu/intel: Add missing TLB cpuid values
        x86/smpboot: Don't use mwait_play_dead() on AMD systems
        x86/mm: Make vmemmap and vmalloc base address constants unsigned long
        x86/vector: Remove the unused macro FPU_IRQ
        x86/vector: Remove the macro VECTOR_OFFSET_START
        x86/cpufeatures: Enumerate cldemote instruction
        x86/microcode: Do not exit early from __reload_late()
        x86/microcode/intel: Save microcode patch unconditionally
        x86/jailhouse: Fix incorrect SPDX identifier
      c61a56ab
    • Linus Torvalds's avatar
      Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 65f4d6d0
      Linus Torvalds authored
      Pull x86 pti fixes from Thomas Gleixner:
       "A set of updates for the x86/pti related code:
      
         - Preserve r8-r11 in int $0x80. r8-r11 need to be preserved, but the
           int$80 entry code removed that quite some time ago. Make it correct
           again.
      
         - A set of fixes for the Global Bit work which went into 4.17 and
           caused a bunch of interesting regressions:
      
            - Triggering a BUG in the page attribute code due to a missing
              check for early boot stage
      
            - Warnings in the page attribute code about holes in the kernel
              text mapping which are caused by the freeing of the init code.
              Handle such holes gracefully.
      
            - Reduce the amount of kernel memory which is set global to the
              actual text and do not incidentally overlap with data.
      
            - Disable the global bit when RANDSTRUCT is enabled as it
              partially defeats the hardening.
      
            - Make the page protection setup correct for vma->page_prot
              population again. The adjustment of the protections fell through
              the crack during the Global bit rework and triggers warnings on
              machines which do not support certain features, e.g. NX"
      
      * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/entry/64/compat: Preserve r8-r11 in int $0x80
        x86/pti: Filter at vma->vm_page_prot population
        x86/pti: Disallow global kernel text with RANDSTRUCT
        x86/pti: Reduce amount of kernel text allowed to be Global
        x86/pti: Fix boot warning from Global-bit setting
        x86/pti: Fix boot problems from Global-bit setting
      65f4d6d0
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 810fb07a
      Linus Torvalds authored
      Pull timer fixes from Thomas Gleixner:
       "Two fixes from the timer departement:
      
         - Fix a long standing issue in the NOHZ tick code which causes RB
           tree corruption, delayed timers and other malfunctions. The cause
           for this is code which modifies the expiry time of an enqueued
           hrtimer.
      
         - Revert the CLOCK_MONOTONIC/CLOCK_BOOTTIME unification due to
           regression reports. Seems userspace _is_ relying on the documented
           behaviour despite our hope that it wont"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        Revert: Unify CLOCK_MONOTONIC and CLOCK_BOOTTIME
        tick/sched: Do not mess with an enqueued hrtimer
      810fb07a
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 7d9e55fe
      Linus Torvalds authored
      Pull perf fixes from Thomas Gleixner:
       "The perf update contains the following bits:
      
        x86:
         - Prevent setting freeze_on_smi on PerfMon V1 CPUs to avoid #GP
      
        perf stat:
         - Keep the '/' event modifier separator in fallback, for example when
           fallbacking from 'cpu/cpu-cycles/' to user level only, where it
           should become 'cpu/cpu-cycles/u' and not 'cpu/cpu-cycles/:u' (Jiri
           Olsa)
      
         - Fix PMU events parsing rule, improving error reporting for invalid
           events (Jiri Olsa)
      
         - Disable write_backward and other event attributes for !group events
           in a group, fixing, for instance this group: '{cycles,msr/aperf/}:S'
           that has leader sampling (:S) and where just the 'cycles', the
           leader event, should have the write_backward attribute set, in this
           case it all fails because the PMU where 'msr/aperf/' lives doesn't
           accepts write_backward style sampling (Jiri Olsa)
      
         - Only fall back group read for leader (Kan Liang)
      
         - Fix core PMU alias list for x86 platform (Kan Liang)
      
         - Print out hint for mixed PMU group error (Kan Liang)
      
         - Fix duplicate PMU name for interval print (Kan Liang)
      
        Core:
         - Set main kernel end address properly when reading kernel and module
           maps (Namhyung Kim)
      
        perf mem:
         - Fix incorrect entries and add missing man options (Sangwon Hong)
      
        s/390:
         - Remove s390 specific strcmp_cpuid_cmp function (Thomas Richter)
      
         - Adapt 'perf test' case record+probe_libc_inet_pton.sh for s390
      
         - Fix s390 undefined record__auxtrace_init() return value in 'perf
           record' (Thomas Richter)"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/x86/intel: Don't enable freeze-on-smi for PerfMon V1
        perf stat: Fix duplicate PMU name for interval print
        perf evsel: Only fall back group read for leader
        perf stat: Print out hint for mixed PMU group error
        perf pmu: Fix core PMU alias list for X86 platform
        perf record: Fix s390 undefined record__auxtrace_init() return value
        perf mem: Document incorrect and missing options
        perf evsel: Disable write_backward for leader sampling group events
        perf pmu: Fix pmu events parsing rule
        perf stat: Keep the / modifier separator in fallback
        perf test: Adapt test case record+probe_libc_inet_pton.sh for s390
        perf list: Remove s390 specific strcmp_cpuid_cmp function
        perf machine: Set main kernel end address properly
      7d9e55fe