1. 12 3月, 2013 4 次提交
    • M
      qemu-ga: use key-value store to avoid recycling fd handles after restart · 39097daf
      Michael Roth 提交于
      Hosts hold on to handles provided by guest-file-open for periods that can
      span beyond the life of the qemu-ga process that issued them. Since these
      are issued starting from 0 on every restart, we run the risk of issuing
      duplicate handles after restarts/reboots.
      
      As a result, users with a stale copy of these handles may end up
      reading/writing corrupted data due to their existing handles effectively
      being re-assigned to an unexpected file or offset.
      
      We unfortunately do not issue handles as strings, but as integers, so a
      solution such as using UUIDs can't be implemented without introducing a
      new interface.
      
      As a workaround, we fix this by implementing a persistent key-value store
      that will be used to track the value of the last handle that was issued
      across restarts/reboots to avoid issuing duplicates.
      
      The store is automatically written to the same directory we currently
      set via --statedir to track fsfreeze state, and so should be applicable
      for stable releases where this flag is supported.
      
      A follow-up can use this same store for handling fsfreeze state, but
      that change is cosmetic and left out for now.
      Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Cc: qemu-stable@nongnu.org
      
      * fixed guest_file_handle_add() return value from uint64_t to int64_t
      39097daf
    • M
      qemu-ga: make guest-sync-delimited available during fsfreeze · c5dcb6ae
      Michael Roth 提交于
      We currently maintain a whitelist of commands that are safe during
      fsfreeze. During fsfreeze, we disable all commands that aren't part of
      that whitelist.
      
      guest-sync-delimited meets the criteria for being whitelisted, and is
      also required for qemu-ga clients that rely on guest-sync-delimited for
      re-syncing the channel after a timeout.
      Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Cc: qemu-stable@nongnu.org
      Reviewed-by: NEric Blake <eblake@redhat.com>
      c5dcb6ae
    • S
      qemu-ga: fix confusing GAChannelMethod comparison · 9e7c23db
      Stefan Hajnoczi 提交于
      In commit 7868e26e
      ("qemu-ga: add initial win32 support") support was added for qemu-ga on
      Windows using virtio-serial.  Other channel methods (ISA serial and UNIX
      domain socket) are not supported on Windows.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      9e7c23db
    • L
      qga: cast to int for DWORD type · ed2cbf74
      Lei Li 提交于
      This patch fixes a compiler warning when cross-build:
      
      qga/service-win32.c: In function 'printf_win_error':
      qga/service-win32.c:32:5: warning: format '%d' expects argument of type 'int',
                                but argument 3 has type 'DWORD' [-Wformat]
      Signed-off-by: NLei Li <lilei@linux.vnet.ibm.com>
      Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      ed2cbf74
  2. 11 3月, 2013 36 次提交