Skip to content
Snippets Groups Projects
  1. Oct 28, 2021
  2. Oct 15, 2021
  3. Oct 14, 2021
  4. Oct 13, 2021
  5. Sep 30, 2021
  6. Sep 29, 2021
  7. Sep 27, 2021
    • Markus Armbruster's avatar
      qapi: Convert simple union SocketAddressLegacy to flat one · 935a867c
      Markus Armbruster authored
      
      Simple unions predate flat unions.  Having both complicates the QAPI
      schema language and the QAPI generator.  We haven't been using simple
      unions in new code for a long time, because they are less flexible and
      somewhat awkward on the wire.
      
      To prepare for their removal, convert simple union SocketAddressLegacy
      to an equivalent flat one, with existing enum SocketAddressType
      replacing implicit enum type SocketAddressLegacyKind.  Adds some
      boilerplate to the schema, which is a bit ugly, but a lot easier to
      maintain than the simple union feature.
      
      Cc: "Daniel P. Berrangé" <berrange@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Message-Id: <20210917143134.412106-9-armbru@redhat.com>
      935a867c
  8. Sep 15, 2021
  9. Sep 13, 2021
  10. Sep 07, 2021
  11. Sep 06, 2021
    • Michael Tokarev's avatar
      qemu-sockets: fix unix socket path copy (again) · 118d527f
      Michael Tokarev authored
      Commit 4cfd970e added an
      assert which ensures the path within an address of a unix
      socket returned from the kernel is at least one byte and
      does not exceed sun_path buffer. Both of this constraints
      are wrong:
      
      A unix socket can be unnamed, in this case the path is
      completely empty (not even \0)
      
      And some implementations (notable linux) can add extra
      trailing byte (\0) _after_ the sun_path buffer if we
      passed buffer larger than it (and we do).
      
      So remove the assertion (since it causes real-life breakage)
      but at the same time fix the usage of sun_path. Namely,
      we should not access sun_path[0] if kernel did not return
      it at all (this is the case for unnamed sockets),
      and use the returned salen when copyig actual path as an
      upper constraint for the amount of bytes to copy - this
      will ensure we wont exceed the information provided by
      the kernel, regardless whenever there is a trailing \0
      or not. This also helps with unnamed sockets.
      
      Note the case of abstract socket, the sun_path is actually
      a blob and can contain \0 characters, - it should not be
      passed to g_strndup and the like, it should be accessed by
      memcpy-like functions.
      
      Fixes: 4cfd970e
      Fixes: http://bugs.debian.org/993145
      
      
      Signed-off-by: default avatarMichael Tokarev <mjt@tls.msk.ru>
      Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      CC: qemu-stable@nongnu.org
      118d527f
  12. Aug 04, 2021
  13. Jul 26, 2021
    • Richard Henderson's avatar
      util/selfmap: Discard mapping on error · 53645dc4
      Richard Henderson authored
      
      From clang-13:
      util/selfmap.c:26:21: error: variable 'errors' set but not used \
          [-Werror,-Wunused-but-set-variable]
      
      Quite right of course, but there's no reason not to check errors.
      
      First, incrementing errors is incorrect, because qemu_strtoul
      returns an errno not a count -- just or them together so that
      we have a non-zero value at the end.
      
      Second, if we have an error, do not add the struct to the list,
      but free it instead.
      
      Cc: Alex Bennée <alex.bennee@linaro.org>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      53645dc4
  14. Jul 22, 2021
  15. Jul 21, 2021
  16. Jul 20, 2021
  17. Jul 09, 2021
  18. Jul 06, 2021
Loading