1. 24 Feb, 2015 3 commits
    • Joe Thornber's avatar
      dm cache: fix problematic dual use of a single migration count variable · 68b84ab8
      Joe Thornber authored
      commit a59db676 upstream.
      
      Introduce a new variable to count the number of allocated migration
      structures.  The existing variable cache->nr_migrations became
      overloaded.  It was used to:
      
       i) track of the number of migrations in flight for the purposes of
          quiescing during suspend.
      
       ii) to estimate the amount of background IO occuring.
      
      Recent discard changes meant that REQ_DISCARD bios are processed with
      a migration.  Discards are not background IO so nr_migrations was not
      incremented.  However this could cause quiescing to complete early.
      
      (i) is now handled with a new variable cache->nr_allocated_migrations.
      cache->nr_migrations has been renamed cache->nr_io_migrations.
      cleanup_migration() is now called free_io_migration(), since it
      decrements that variable.
      
      Also, remove the unused cache->next_migration variable that got replaced
      with with prealloc_structs a while ago.
      Signed-off-by: default avatarJoe Thornber <ejt@redhat.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      68b84ab8
    • Joe Thornber's avatar
      dm cache: share cache-metadata object across inactive and active DM tables · b12c9238
      Joe Thornber authored
      commit 9b1cc9f2 upstream.
      
      If a DM table is reloaded with an inactive table when the device is not
      suspended (normal procedure for LVM2), then there will be two dm-bufio
      objects that can diverge.  This can lead to a situation where the
      inactive table uses bufio to read metadata at the same time the active
      table writes metadata -- resulting in the inactive table having stale
      metadata buffers once it is promoted to the active table slot.
      
      Fix this by using reference counting and a global list of cache metadata
      objects to ensure there is only one metadata object per metadata device.
      Signed-off-by: default avatarJoe Thornber <ejt@redhat.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      b12c9238
    • Nadav Amit's avatar
      KVM: x86: SYSENTER emulation is broken · 3e43691a
      Nadav Amit authored
      commit f3747379 upstream.
      
      SYSENTER emulation is broken in several ways:
      1. It misses the case of 16-bit code segments completely (CVE-2015-0239).
      2. MSR_IA32_SYSENTER_CS is checked in 64-bit mode incorrectly (bits 0 and 1 can
         still be set without causing #GP).
      3. MSR_IA32_SYSENTER_EIP and MSR_IA32_SYSENTER_ESP are not masked in
         legacy-mode.
      4. There is some unneeded code.
      
      Fix it.
      Signed-off-by: default avatarNadav Amit <namit@cs.technion.ac.il>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      3e43691a
  2. 19 Feb, 2015 37 commits