1. 23 7月, 2011 4 次提交
  2. 29 3月, 2011 1 次提交
  3. 21 3月, 2011 1 次提交
    • P
      change all rt_clock references to use millisecond resolution accessors · 7bd427d8
      Paolo Bonzini 提交于
      This was done with:
      
          sed -i '/get_clock\>.*rt_clock/s/get_clock\>/get_clock_ms/' \
              $(git grep -l 'get_clock\>.*rt_clock' )
          sed -i '/new_timer\>.*rt_clock/s/new_timer\>/new_timer_ms/' \
              $(git grep -l 'new_timer\>.*rt_clock' )
      
      after checking that get_clock and new_timer never occur twice
      on the same line.  There were no missed occurrences; however, even
      if there had been, they would have been caught by the compiler.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      7bd427d8
  4. 05 3月, 2011 1 次提交
  5. 25 2月, 2011 1 次提交
  6. 15 2月, 2011 2 次提交
  7. 24 1月, 2011 1 次提交
  8. 13 1月, 2011 1 次提交
  9. 10 1月, 2011 1 次提交
    • A
      slirp: fix unaligned access in bootp code · 8aaf42ed
      Aurelien Jarno 提交于
      Slirp code tries to be smart an avoid data copy by using pointer to
      the data. This solution leads to unaligned access, in this case
      preq_addr, which is a 32-bit long structure. There is no real point
      of avoiding data copy in a such case, as the value itself is smaller
      or the same size as a pointer.
      
      The patch replaces pointers to the preq_addr structure by the strcture
      itself, and use the address 0.0.0.0 if no address has been requested
      (this is not a valid address in such a request). It compares it with
      htonl(0L) for correctness reasons, in case a code checker look for such
      mistakes. It also uses memcpy() for copying the data, which takes care
      of alignement issues.
      
      This fixes an unaligned access on IA64 host while requesting a DHCP
      address.
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      8aaf42ed
  10. 21 11月, 2010 1 次提交
  11. 03 10月, 2010 2 次提交
  12. 17 9月, 2010 2 次提交
  13. 04 9月, 2010 1 次提交
  14. 25 7月, 2010 2 次提交
  15. 06 7月, 2010 1 次提交
  16. 26 4月, 2010 1 次提交
  17. 21 4月, 2010 1 次提交
  18. 18 4月, 2010 1 次提交
  19. 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
  20. 07 3月, 2010 4 次提交
  21. 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
  22. 07 2月, 2010 1 次提交
  23. 14 1月, 2010 1 次提交
  24. 12 1月, 2010 1 次提交
    • T
      Handle TFTP ERROR from client · bfe4e172
      Thomas Horsten 提交于
      If a PXE client only wants to find out the size of a file, it will
      open the file and then abort the transfer by sending a TFTP ERROR packet.
      
      The ERROR packet should cause qemu to terminate the session. If not,
      the sessions will soon run out and cause timeouts in the client.
      
      Also, if a TFTP session already exists with same IP/UDP port, it
      should be terminated when a new RRQ is received, instead of creating a
      duplicate (which will never be used).
      
      A patch for gPXE to send the ERROR packet is also being submitted to
      gPXE. Together they resolve slowness/hanging when booting pxegrub from
      qemu's internal TFTP server. The patch from Milan Plzik to return
      after sending OACK is also required for a complete fix.
      Signed-off-by: NThomas Horsten <thomas@horsten.com>
      Signed-off-by: NMilan Plzik <milan.plzik@gmail.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      bfe4e172
  25. 26 12月, 2009 1 次提交
  26. 19 12月, 2009 1 次提交
  27. 04 12月, 2009 1 次提交
  28. 21 11月, 2009 1 次提交
  29. 01 10月, 2009 1 次提交
  30. 12 9月, 2009 1 次提交
    • B
      Fix sys-queue.h conflict for good · 72cf2d4f
      Blue Swirl 提交于
      Problem: Our file sys-queue.h is a copy of the BSD file, but there are
      some additions and it's not entirely compatible. Because of that, there have
      been conflicts with system headers on BSD systems. Some hacks have been
      introduced in the commits 15cc9235,
      f40d7537,
      96555a96 and
      3990d09a but the fixes were fragile.
      
      Solution: Avoid the conflict entirely by renaming the functions and the
      file. Revert the previous hacks.
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      72cf2d4f