Skip to content
Snippets Groups Projects
  1. Jan 08, 2020
  2. Aug 28, 2019
  3. Aug 16, 2019
    • Markus Armbruster's avatar
      sysemu: Split sysemu/runstate.h off sysemu/sysemu.h · 54d31236
      Markus Armbruster authored
      
      sysemu/sysemu.h is a rather unfocused dumping ground for stuff related
      to the system-emulator.  Evidence:
      
      * It's included widely: in my "build everything" tree, changing
        sysemu/sysemu.h still triggers a recompile of some 1100 out of 6600
        objects (not counting tests and objects that don't depend on
        qemu/osdep.h, down from 5400 due to the previous two commits).
      
      * It pulls in more than a dozen additional headers.
      
      Split stuff related to run state management into its own header
      sysemu/runstate.h.
      
      Touching sysemu/sysemu.h now recompiles some 850 objects.  qemu/uuid.h
      also drops from 1100 to 850, and qapi/qapi-types-run-state.h from 4400
      to 4200.  Touching new sysemu/runstate.h recompiles some 500 objects.
      
      Since I'm touching MAINTAINERS to add sysemu/runstate.h anyway, also
      add qemu/main-loop.h.
      
      Suggested-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20190812052359.30071-30-armbru@redhat.com>
      Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      [Unbreak OS-X build]
      54d31236
  4. Jul 10, 2019
  5. Jul 05, 2019
  6. Jun 18, 2019
  7. Jun 12, 2019
  8. Jun 11, 2019
  9. May 28, 2019
  10. May 22, 2019
    • Markus Armbruster's avatar
      gdbstub: Fix misuse of isxdigit() · 33c846ef
      Markus Armbruster authored
      
      gdb_read_byte() passes its @ch argument to isxdigit().  Undefined
      behavior when the value is negative.  Two callers:
      
      * gdb_chr_receive() passes an uint8_t value.  Safe.
      
      * gdb_handlesig() a char value.  Unsafe.  Not a security issue,
        because the characters come from the gdb client, which is trusted.
      
      The obvious fix would be casting @ch to unsigned char.  But note that
      gdb_read_byte() already casts @ch to uint8_t in many places.  Uses of
      @ch without such a cast:
      
      (1) Compare to a character constant with == or !=
      
      (2) s->linesum += ch
      
      (3) Store ch or ch ^ 0x20 into s->line_buf[]
      
      (4) Check for invalid RLE count:
          ch < ' ' || ch == '#' || ch == '$' || ch > 126
      
      (5) Pass to isxdigit()
      
      (6) Pass to fromhex()
      
      Change the parameter type from int to uint8_t, and drop the now
      redundant casts.  Affects the above uses as follows:
      
      (1) No change: the character constants are all non-negative.
      
      (2) Effectively no change: we only ever use s->linesum & 0xff, and
          s->linesum is int.
      
      (3) No change: s->line_buf[] is char[].
      
      (4) No change.
      
      (5) Avoid undefined behavior.
      
      (6) No change: only reached when isxdigit(ch)
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20190514180311.16028-5-armbru@redhat.com>
      33c846ef
    • Markus Armbruster's avatar
      gdbstub: Reject invalid RLE repeat counts · 046aba16
      Markus Armbruster authored
      
      "Debugging with GDB / Appendix E GDB Remote Serial Protocol /
      Overview" specifies "The printable characters '#' and '$' or with a
      numeric value greater than 126 must not be used."  gdb_read_byte()
      only rejects values < 32.  This is wrong.  Impact depends on the caller:
      
      * gdb_handlesig() passes a char.  Incorrectly accepts '#', '$' and
        '\127'.
      
      * gdb_chr_receive() passes an uint8_t.  Additionally accepts
        characters with the most-significant bit set.
      
      Correct the validity check to match the specification.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Message-Id: <20190514180311.16028-4-armbru@redhat.com>
      046aba16
  11. Mar 26, 2019
  12. Feb 15, 2019
  13. Feb 13, 2019
  14. Feb 05, 2019
  15. Jan 29, 2019
Loading