1. 12 Aug, 2018 5 commits
  2. 31 Jul, 2018 2 commits
    • Christoffer Dall's avatar
      KVM: arm/arm64: Fix lost IRQs from emulated physcial timer when blocked · 245715cb
      Christoffer Dall authored
      When the VCPU is blocked (for example from WFI) we don't inject the
      physical timer interrupt if it should fire while the CPU is blocked, but
      instead we just wake up the VCPU and expect kvm_timer_vcpu_load to take
      care of injecting the interrupt.
      
      Unfortunately, kvm_timer_vcpu_load() doesn't actually do that, it only
      has support to schedule a soft timer if the emulated phys timer is
      expected to fire in the future.
      
      Follow the same pattern as kvm_timer_update_state() and update the irq
      state after potentially scheduling a soft timer.
      Reported-by: default avatarAndre Przywara <andre.przywara@arm.com>
      Cc: Stable <stable@vger.kernel.org> # 4.15+
      Fixes: bbdd52cf ("KVM: arm/arm64: Avoid phys timer emulation in vcpu entry/exit")
      Signed-off-by: default avatarChristoffer Dall <christoffer.dall@arm.com>
      Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      245715cb
    • Christoffer Dall's avatar
      KVM: arm/arm64: Fix potential loss of ptimer interrupts · 7afc4ddb
      Christoffer Dall authored
      kvm_timer_update_state() is called when changing the phys timer
      configuration registers, either via vcpu reset, as a result of a trap
      from the guest, or when userspace programs the registers.
      
      phys_timer_emulate() is in turn called by kvm_timer_update_state() to
      either cancel an existing software timer, or program a new software
      timer, to emulate the behavior of a real phys timer, based on the change
      in configuration registers.
      
      Unfortunately, the interaction between these two functions left a small
      race; if the conceptual emulated phys timer should actually fire, but
      the soft timer hasn't executed its callback yet, we cancel the timer in
      phys_timer_emulate without injecting an irq.  This only happens if the
      check in kvm_timer_update_state is called before the timer should fire,
      which is relatively unlikely, but possible.
      
      The solution is to update the state of the phys timer after calling
      phys_timer_emulate, which will pick up the pending timer state and
      update the interrupt value.
      
      Note that this leaves the opportunity of raising the interrupt twice,
      once in the just-programmed soft timer, and once in
      kvm_timer_update_state.  Since this always happens synchronously with
      the VCPU execution, there is no harm in this, and the guest ever only
      sees a single timer interrupt.
      
      Cc: Stable <stable@vger.kernel.org> # 4.15+
      Signed-off-by: default avatarChristoffer Dall <christoffer.dall@arm.com>
      Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      7afc4ddb
  3. 24 Jul, 2018 1 commit
    • Mark Rutland's avatar
      KVM: arm/arm64: vgic: Fix possible spectre-v1 write in vgic_mmio_write_apr() · 6b8b9a48
      Mark Rutland authored
      It's possible for userspace to control n. Sanitize n when using it as an
      array index, to inhibit the potential spectre-v1 write gadget.
      
      Note that while it appears that n must be bound to the interval [0,3]
      due to the way it is extracted from addr, we cannot guarantee that
      compiler transformations (and/or future refactoring) will ensure this is
      the case, and given this is a slow path it's better to always perform
      the masking.
      
      Found by smatch.
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Cc: Christoffer Dall <christoffer.dall@arm.com>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: kvmarm@lists.cs.columbia.edu
      Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      6b8b9a48
  4. 21 Jul, 2018 18 commits
  5. 09 Jul, 2018 7 commits
  6. 08 Jul, 2018 7 commits
    • Linus Torvalds's avatar
      Linux 4.18-rc4 · 1e4b044d
      Linus Torvalds authored
      1e4b044d
    • Linus Torvalds's avatar
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · ca04b3cc
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "A small collection of fixes, sort of the usual at this point, all for
        i.MX or OMAP:
      
         - Enable ULPI drivers on i.MX to avoid a hang
      
         - Pinctrl fix for touchscreen on i.MX51 ZII RDU1
      
         - Fixes for ethernet clock references on am3517
      
         - mmc0 write protect detection fix for am335x
      
         - kzalloc->kcalloc conversion in an OMAP driver
      
         - USB metastability fix for USB on dra7
      
         - Fix touchscreen wakeup on am437x"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        ARM: imx_v4_v5_defconfig: Select ULPI support
        ARM: imx_v6_v7_defconfig: Select ULPI support
        ARM: dts: omap3: Fix am3517 mdio and emac clock references
        ARM: dts: am335x-bone-common: Fix mmc0 Write Protect
        bus: ti-sysc: Use 2-factor allocator arguments
        ARM: dts: dra7: Disable metastability workaround for USB2
        ARM: dts: imx51-zii-rdu1: fix touchscreen pinctrl
        ARM: dts: am437x: make edt-ft5x06 a wakeup source
      ca04b3cc
    • Linus Torvalds's avatar
      Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 23adbe6f
      Linus Torvalds authored
      Pull x86/pti updates from Thomas Gleixner:
       "Two small fixes correcting the handling of SSB mitigations on AMD
        processors"
      
      * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/bugs: Fix the AMD SSBD usage of the SPEC_CTRL MSR
        x86/bugs: Update when to check for the LS_CFG SSBD mitigation
      23adbe6f
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 6f27a640
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
      
       - Prevent an out-of-bounds access in mtrr_write()
      
       - Break a circular dependency in the new hyperv IPI acceleration code
      
       - Address the build breakage related to inline functions by enforcing
         gnu_inline and explicitly bringing native_save_fl() out of line,
         which also adds a set of _ARM_ARG macros which provide 32/64bit
         safety.
      
       - Initialize the shadow CR4 per cpu variable before using it.
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mtrr: Don't copy out-of-bounds data in mtrr_write
        x86/hyper-v: Fix the circular dependency in IPI enlightenment
        x86/paravirt: Make native_save_fl() extern inline
        x86/asm: Add _ASM_ARG* constants for argument registers to <asm/asm.h>
        compiler-gcc.h: Add __attribute__((gnu_inline)) to all inline declarations
        x86/mm/32: Initialize the CR4 shadow before __flush_tlb_all()
      6f27a640
    • Linus Torvalds's avatar
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 6fb2489d
      Linus Torvalds authored
      Pull scheduler fixes from Thomas Gleixner:
      
       - The hopefully final fix for the reported race problems in
         kthread_parkme(). The previous attempt still left a hole and was
         partially wrong.
      
       - Plug a race in the remote tick mechanism which triggers a warning
         about updates not being done correctly. That's a false positive if
         the race condition is hit as the remote CPU is idle. Plug it by
         checking the condition again when holding run queue lock.
      
       - Fix a bug in the utilization estimation of a run queue which causes
         the estimation to be 0 when a run queue is throttled.
      
       - Advance the global expiration of the period timer when the timer is
         restarted after a idle period. Otherwise the expiry time is stale and
         the timer fires prematurely.
      
       - Cure the drift between the bandwidth timer and the runqueue
         accounting, which leads to bogus throttling of runqueues
      
       - Place the call to cpufreq_update_util() correctly so the function
         will observe the correct number of running RT tasks and not a stale
         one.
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        kthread, sched/core: Fix kthread_parkme() (again...)
        sched/util_est: Fix util_est_dequeue() for throttled cfs_rq
        sched/fair: Advance global expiration when period timer is restarted
        sched/fair: Fix bandwidth timer clock drift condition
        sched/rt: Fix call to cpufreq_update_util()
        sched/nohz: Skip remote tick on idle task entirely
      6fb2489d
    • Linus Torvalds's avatar
      Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · f5c926b9
      Linus Torvalds authored
      Pull objtool fix from Thomas Gleixner:
       "A single fix for objtool to address a bug in handling the cold
        subfunction detection for aliased functions which was added recently.
        The bug causes objtool to enter an infinite loop"
      
      * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        objtool: Support GCC 8 '-fnoreorder-functions'
      f5c926b9
    • Linus Torvalds's avatar
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 124b99fb
      Linus Torvalds authored
      Pull crypto fixes from Herbert Xu:
      
       - add missing RETs in x86 aegis/morus
      
       - fix build error in arm speck
      
      * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: x86 - Add missing RETs
        crypto: arm/speck - fix building in Thumb2 mode
      124b99fb