1. 01 2月, 2018 10 次提交
  2. 28 1月, 2018 4 次提交
  3. 27 1月, 2018 2 次提交
  4. 26 1月, 2018 15 次提交
  5. 25 1月, 2018 6 次提交
  6. 24 1月, 2018 3 次提交
    • C
      KVM: s390: add proper locking for CMMA migration bitmap · 1de1ea7e
      Christian Borntraeger 提交于
      Some parts of the cmma migration bitmap is already protected
      with the kvm->lock (e.g. the migration start). On the other
      hand the read of the cmma bits is not protected against a
      concurrent free, neither is the emulation of the ESSA instruction.
      Let's extend the locking to all related ioctls by using
      the slots lock for
      - kvm_s390_vm_start_migration
      - kvm_s390_vm_stop_migration
      - kvm_s390_set_cmma_bits
      - kvm_s390_get_cmma_bits
      
      In addition to that, we use synchronize_srcu before freeing
      the migration structure as all users hold kvm->srcu for read.
      (e.g. the ESSA handler).
      Reported-by: NDavid Hildenbrand <david@redhat.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Cc: stable@vger.kernel.org # 4.13+
      Fixes: 190df4a2 (KVM: s390: CMMA tracking, ESSA emulation, migration mode)
      Reviewed-by: NClaudio Imbrenda <imbrenda@linux.vnet.ibm.com>
      Reviewed-by: NDavid Hildenbrand <david@redhat.com>
      Reviewed-by: NCornelia Huck <cohuck@redhat.com>
      1de1ea7e
    • D
      x86/centaur: Mark TSC invariant · fe6daab1
      davidwang 提交于
      Centaur CPU has a constant frequency TSC and that TSC does not stop in
      C-States. But because the corresponding TSC feature flags are not set for
      that CPU, the TSC is treated as not constant frequency and assumed to stop
      in C-States, which makes it an unreliable and unusable clock source.
      
      Setting those flags tells the kernel that the TSC is usable, so it will
      select it over HPET.  The effect of this is that reading time stamps (from
      kernel or user space) will be faster and more efficent.
      Signed-off-by: Ndavidwang <davidwang@zhaoxin.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: qiyuanwang@zhaoxin.com
      Cc: linux-pm@vger.kernel.org
      Cc: brucechang@via-alliance.com
      Cc: cooperyan@zhaoxin.com
      Cc: benjaminpan@viatech.com
      Link: https://lkml.kernel.org/r/1516616057-5158-1-git-send-email-davidwang@zhaoxin.com
      fe6daab1
    • B
      x86/microcode: Fix again accessing initrd after having been freed · 1d080f09
      Borislav Petkov 提交于
      Commit 24c25032 ("x86/microcode: Do not access the initrd after it has
      been freed") fixed attempts to access initrd from the microcode loader
      after it has been freed. However, a similar KASAN warning was reported
      (stack trace edited):
      
        smpboot: Booting Node 0 Processor 1 APIC 0x11
        ==================================================================
        BUG: KASAN: use-after-free in find_cpio_data+0x9b5/0xa50
        Read of size 1 at addr ffff880035ffd000 by task swapper/1/0
      
        CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.14.8-slack #7
        Hardware name: System manufacturer System Product Name/A88X-PLUS, BIOS 3003 03/10/2016
        Call Trace:
         dump_stack
         print_address_description
         kasan_report
         ? find_cpio_data
         __asan_report_load1_noabort
         find_cpio_data
         find_microcode_in_initrd
         __load_ucode_amd
         load_ucode_amd_ap
            load_ucode_ap
      
      After some investigation, it turned out that a merge was done using the
      wrong side to resolve, leading to picking up the previous state, before
      the 24c25032 fix. Therefore the Fixes tag below contains a merge
      commit.
      
      Revert the mismerge by catching the save_microcode_in_initrd_amd()
      retval and thus letting the function exit with the last return statement
      so that initrd_gone can be set to true.
      
      Fixes: f26483ea ("Merge branch 'x86/urgent' into x86/microcode, to resolve conflicts")
      Reported-by: <higuita@gmx.net>
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: stable@vger.kernel.org
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=198295
      Link: https://lkml.kernel.org/r/20180123104133.918-2-bp@alien8.de
      1d080f09