1. 03 10月, 2013 1 次提交
  2. 23 8月, 2013 1 次提交
  3. 18 5月, 2013 1 次提交
  4. 02 4月, 2013 1 次提交
  5. 22 3月, 2013 1 次提交
  6. 19 12月, 2012 1 次提交
  7. 10 11月, 2012 1 次提交
  8. 29 3月, 2012 1 次提交
  9. 24 2月, 2012 1 次提交
  10. 08 2月, 2012 1 次提交
  11. 21 8月, 2011 1 次提交
  12. 23 7月, 2011 2 次提交
  13. 29 3月, 2011 1 次提交
  14. 21 11月, 2010 1 次提交
  15. 16 3月, 2010 1 次提交
    • M
      monitor: Separate "default monitor" and "current monitor" cleanly · 8631b608
      Markus Armbruster 提交于
      Commits 376253ec..731b0364 introduced global variable cur_mon, which
      points to the "default monitor" (if any), except during execution of
      monitor_read() or monitor_control_read() it points to the monitor from
      which we're reading instead (the "current monitor").  Monitor command
      handlers run within monitor_read() or monitor_control_read().
      
      Default monitor and current monitor are really separate things, and
      squashing them together is confusing and error-prone.
      
      For instance, usb_host_scan() can run both in "info usbhost" and
      periodically via usb_host_auto_check().  It prints to cur_mon, which
      is what we want in the former case: the monitor executing "info
      usbhost".  But since that's the default monitor in the latter case, it
      periodically spams the default monitor there.
      
      A few places use cur_mon to log stuff to the default monitor.  If we
      ever log something while cur_mon points to current monitor instead of
      default monitor, the log temporarily "jumps" to another monitor.
      Whether that can or cannot happen isn't always obvious.
      
      Maybe logging to the default monitor (which may not even exist) is a
      bad idea, and we should log to stderr or a logfile instead.  But
      that's outside the scope of this commit.
      
      Change cur_mon to point to the current monitor.  Create new
      default_mon to point to the default monitor.  Update users of cur_mon
      accordingly.
      
      This fixes the periodical spamming of the default monitor by
      usb_host_scan().  It also stops "log jumping", should that problem
      exist.
      8631b608
  16. 11 2月, 2010 1 次提交
    • J
      don't dereference NULL after failed strdup · 6265eb26
      Jim Meyering 提交于
      Most of these are obvious NULL-deref bug fixes, for example,
      the ones in these files:
      
        block/curl.c
        net.c
        slirp/misc.c
      
      and the first one in block/vvfat.c.
      The others in block/vvfat.c may not lead to an immediate segfault, but I
      traced the two schedule_rename(..., strdup(path)) uses, and a failed
      strdup would appear to trigger this assertion in handle_renames_and_mkdirs:
      
      	    assert(commit->path);
      
      The conversion to use qemu_strdup in envlist_to_environ is not technically
      needed, but does avoid a theoretical leak in the caller when strdup fails
      for one value, but later succeeds in allocating another buffer(plausible,
      if one string length is much larger than the others).  The caller does
      not know the length of the returned list, and as such can only free
      pointers until it hits the first NULL.  If there are non-NULL pointers
      beyond the first, their buffers would be leaked.  This one is admittedly
      far-fetched.
      
      The two in linux-user/main.c are worth fixing to ensure that an
      OOM error is diagnosed up front, rather than letting it provoke some
      harder-to-diagnose secondary error, in case of exec failure, or worse, in
      case the exec succeeds but with an invalid list of command line options.
      However, considering how unlikely it is to encounter a failed strdup early
      in main, this isn't a big deal.  Note that adding the required uses of
      qemu_strdup here and in envlist.c induce link failures because qemu_strdup
      is not currently in any library they're linked with.  So for now, I've
      omitted those changes, as well as the fixes in target-i386/helper.c
      and target-sparc/helper.c.
      
      If you'd like to see the above discussion (or anything else)
      in the commit log, just let me know and I'll be happy to adjust.
      
      >From 9af42864fd1ea666bd25e2cecfdfae74c20aa8c7 Mon Sep 17 00:00:00 2001
      From: Jim Meyering <meyering@redhat.com>
      Date: Mon, 8 Feb 2010 18:29:29 +0100
      Subject: [PATCH] don't dereference NULL after failed strdup
      
      Handle failing strdup by replacing each use with qemu_strdup,
      so as not to dereference NULL or trigger a failing assertion.
      * block/curl.c (curl_open): s/\bstrdup\b/qemu_strdup/
      * block/vvfat.c (init_directories): Likewise.
      (get_cluster_count_for_direntry, check_directory_consistency): Likewise.
      * net.c (parse_host_src_port): Likewise.
      * slirp/misc.c (fork_exec): Likewise.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      6265eb26
  17. 26 12月, 2009 1 次提交
  18. 04 12月, 2009 1 次提交
  19. 29 6月, 2009 8 次提交
  20. 13 6月, 2009 1 次提交
  21. 06 4月, 2009 1 次提交
  22. 17 3月, 2009 1 次提交
  23. 07 3月, 2009 1 次提交
  24. 06 3月, 2009 1 次提交
    • A
      monitor: Rework API (Jan Kiszka) · 376253ec
      aliguori 提交于
      Refactor the monitor API and prepare it for decoupled terminals:
      term_print functions are renamed to monitor_* and all monitor services
      gain a new parameter (mon) that will once refer to the monitor instance
      the output is supposed to appear on. However, the argument remains
      unused for now. All monitor command callbacks are also extended by a mon
      parameter so that command handlers are able to pass an appropriate
      reference to monitor output services.
      
      For the case that monitor outputs so far happen without clearly
      identifiable context, the global variable cur_mon is introduced that
      shall once provide a pointer either to the current active monitor (while
      processing commands) or to the default one. On the mid or long term,
      those use case will be obsoleted so that this variable can be removed
      again.
      
      Due to the broad usage of the monitor interface, this patch mostly deals
      with converting users of the monitor API. A few of them are already
      extended to pass 'mon' from the command handler further down to internal
      functions that invoke monitor_printf.
      
      At this chance, monitor-related prototypes are moved from console.h to
      a new monitor.h. The same is done for the readline API.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6711 c046a42c-6fe2-441c-8c8c-71466251a162
      376253ec
  25. 14 1月, 2009 1 次提交
  26. 09 1月, 2009 1 次提交
  27. 15 9月, 2008 1 次提交
    • A
      Use common objects for qemu-img and qemu-nbd · 03ff3ca3
      aliguori 提交于
      Right now, we sprinkle #if defined(QEMU_IMG) && defined(QEMU_NBD) all over the
      code.  It's ugly and causes us to have to build multiple object files for
      linking against qemu and the tools.
      
      This patch introduces a new file, qemu-tool.c which contains enough for
      qemu-img, qemu-nbd, and QEMU to all share the same objects.
      
      This also required getting qemu-nbd to be a bit more Windows friendly.  I also
      changed the Windows block-raw to use normal IO instead of overlapping IO since
      we don't actually do AIO yet on Windows.  I changed the various #if 0's to
       #if WIN32_AIO to make it easier for someone to eventually fix AIO on Windows.
      
      After this patch, there are no longer any #ifdef's related to qemu-img and
      qemu-nbd.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5226 c046a42c-6fe2-441c-8c8c-71466251a162
      03ff3ca3
  28. 14 9月, 2008 1 次提交
  29. 22 8月, 2008 1 次提交
  30. 10 5月, 2008 1 次提交
  31. 13 11月, 2007 2 次提交