1. 08 6月, 2016 1 次提交
  2. 07 6月, 2016 1 次提交
  3. 03 6月, 2016 1 次提交
  4. 23 5月, 2016 1 次提交
    • S
      configure: Allow builds with extra warnings · 5919e032
      Stefan Weil 提交于
      The clang compiler supports a useful compiler option -Weverything,
      and GCC also has other warnings not enabled by -Wall.
      
      If glib header files trigger a warning, however, testing glib with
      -Werror will always fail. A size mismatch is also detected without
      -Werror, so simply remove it.
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Message-Id: <1461879221-13338-1-git-send-email-sw@weilnetz.de>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      5919e032
  5. 18 5月, 2016 1 次提交
  6. 11 5月, 2016 6 次提交
  7. 02 5月, 2016 1 次提交
    • J
      configure: Check if struct fsxattr is available from linux header · 277abf15
      Jan Vesely 提交于
      Fixes build failure with --enable-xfsctl and
      new linux headers (>=4.5) and older xfsprogs(<4.5):
      In file included from /usr/include/xfs/xfs.h:38:0,
                       from /var/tmp/portage/app-emulation/qemu-2.5.0-r1/work/qemu-2.5.0/block/raw-posix.c:97:
      /usr/include/xfs/xfs_fs.h:42:8: error: redefinition of ‘struct fsxattr’
       struct fsxattr {
              ^
      In file included from /var/tmp/portage/app-emulation/qemu-2.5.0-r1/work/qemu-2.5.0/block/raw-posix.c:60:0:
      /usr/include/linux/fs.h:155:8: note: originally defined here
       struct fsxattr {
      
      This is really a bug in the system headers, but we can work around it
      by defining HAVE_FSXATTR in the QEMU headers if linux/fs.h provides
      the struct, so that xfs_fs.h doesn't try to define it as well.
      
      CC: qemu-trivial@nongnu.org
      CC: Markus Armbruster <armbru@redhat.com>
      CC: Peter Maydell <peter.maydell@linaro.org>
      CC: Stefan Weil <sw@weilnetz.de>
      Tested-by: NStefan Weil <sw@weilnetz.de>
      Signed-off-by: NJan Vesely <jano.vesely@gmail.com>
      [PMM: adjusted commit message, comments]
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      277abf15
  8. 20 4月, 2016 1 次提交
    • J
      block/gluster: prevent data loss after i/o error · d85fa9eb
      Jeff Cody 提交于
      Upon receiving an I/O error after an fsync, by default gluster will
      dump its cache.  However, QEMU will retry the fsync, which is especially
      useful when encountering errors such as ENOSPC when using the werror=stop
      option.  When using caching with gluster, however, the last written data
      will be lost upon encountering ENOSPC.  Using the write-behind-cache
      xlator option of 'resync-failed-syncs-after-fsync' should cause gluster
      to retain the cached data after a failed fsync, so that ENOSPC and other
      transient errors are recoverable.
      
      Unfortunately, we have no way of knowing if the
      'resync-failed-syncs-after-fsync' xlator option is supported, so for now
      close the fd and set the BDS driver to NULL upon fsync error.
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      d85fa9eb
  9. 17 4月, 2016 1 次提交
  10. 30 3月, 2016 1 次提交
  11. 24 3月, 2016 1 次提交
  12. 23 3月, 2016 1 次提交
  13. 17 3月, 2016 2 次提交
    • D
      crypto: add support for PBKDF2 algorithm · 37788f25
      Daniel P. Berrange 提交于
      The LUKS data format includes use of PBKDF2 (Password-Based
      Key Derivation Function). The Nettle library can provide
      an implementation of this, but we don't want code directly
      depending on a specific crypto library backend. Introduce
      a new include/crypto/pbkdf.h header which defines a QEMU
      API for invoking PBKDK2. The initial implementations are
      backed by nettle & gcrypt, which are commonly available
      with distros shipping GNUTLS.
      
      The test suite data is taken from the cryptsetup codebase
      under the LGPLv2.1+ license. This merely aims to verify
      that whatever backend we provide for this function in QEMU
      will comply with the spec.
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      37788f25
    • D
      crypto: add cryptographic random byte source · b917da4c
      Daniel P. Berrange 提交于
      There are three backend impls provided. The preferred
      is gnutls, which is backed by nettle in modern distros.
      The gcrypt impl is provided for cases where QEMU build
      against gnutls is disabled, but crypto is still desired.
      No nettle impl is provided, since it is non-trivial to
      use the nettle APIs for random numbers. Users of nettle
      should ensure gnutls is enabled for QEMU.
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      b917da4c
  14. 08 3月, 2016 1 次提交
  15. 23 2月, 2016 1 次提交
  16. 11 2月, 2016 1 次提交
  17. 10 2月, 2016 1 次提交
  18. 09 2月, 2016 1 次提交
    • D
      configure: sanity check the glib library that pkg-config finds · 977a82ab
      Daniel P. Berrange 提交于
      Developers on 64-bit machines will often try to perform a
      32-bit build of QEMU by running
      
        ./configure --extra-cflags="-m32"
      
      Unfortunately if PKG_CONFIG_LIBDIR is not set to point to
      the location of the 32-bit pkg-config files, then configure
      will silently pick up the 64-bit pkg-config files and still
      succeed.
      
      This causes a problem for glib because it means QEMU will
      be pulling in /usr/lib64/glib-2.0/include/glibconfig.h
      instead of /usr/lib/glib-2.0/include/glibconfig.h
      
      This causes problems because the 'gsize' type (defined as
      'unsigned long') will no longer be fully compatible with
      the 'size_t' type (defined as 'unsigned int'). Although
      both are the same size, the compiler refuses to allow
      casts from 'unsigned long *' to 'unsigned int *' as they
      are different pointer types. This results in non-obvious
      compiler errors when building QEMU eg
      
      qga/commands-posix.c: In function ‘qmp_guest_set_user_password’:
      qga/commands-posix.c:1912:55: error: passing argument 2 of ‘g_base64_decode’ from incompatible pointer type [-Werror=incompatible-pointer-types]
           rawpasswddata = (char *)g_base64_decode(password, &rawpasswdlen);
                                                                  ^
      In file included from /usr/include/glib-2.0/glib.h:35:0,
                       from qga/commands-posix.c:14:
      /usr/include/glib-2.0/glib/gbase64.h:52:9: note: expected ‘gsize * {aka long unsigned int *}’ but argument is of type ‘size_t * {aka unsigned int *}’
       guchar *g_base64_decode         (const gchar  *text,
               ^
      cc1: all warnings being treated as errors
      
      To detect this problem, add a check to configure that
      verifies that GLIB_SIZEOF_SIZE_T matches sizeof(size_t).
      If this fails print a warning suggesting that the dev
      probably needs to set PKG_CONFIG_LIBDIR.
      
      On Fedora x86_64 it passes with any of:
      
       # ./configure
       # PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig ./configure --extra-cflags="-m32"
       # PKG_CONFIG_LIBDIR=/usr/lib64/pkgconfig ./configure --extra-cflags="-m64"
      
      And fails with a mis-match
      
       # PKG_CONFIG_LIBDIR=/usr/lib64/pkgconfig ./configure --extra-cflags="-m32"
       # PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig ./configure --extra-cflags="-m64"
      
      ERROR: sizeof(size_t) doesn't match GLIB_SIZEOF_SIZE_T.
             You probably need to set PKG_CONFIG_LIBDIR
             to point to the right pkg-config files for your
             build target
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-Id: <1453885245-15562-1-git-send-email-berrange@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      977a82ab
  19. 03 2月, 2016 2 次提交
  20. 30 1月, 2016 1 次提交
  21. 27 1月, 2016 2 次提交
  22. 11 1月, 2016 1 次提交
  23. 18 12月, 2015 2 次提交
    • P
      configure: Fix shell syntax to placate OpenBSD's pdksh · 18f49881
      Peter Maydell 提交于
      Unfortunately the OpenBSD pdksh does not like brackets inside
      the right part of a ${variable+word} parameter expansion:
      
        $ echo "${a+($b)}"
        ksh: ${a+($b)}": bad substitution
      
      though both bash and dash accept them. In any case this line
      was causing odd output in the case where nettle is not present:
        nettle    no ()
      
      (because if nettle is not present then $nettle will be "no",
      not a null string or unset).
      
      Rewrite it to just use an if.
      
      This bug was originally introduced in becaeb72 and was present
      in the 2.4.0 release.
      
      Fixes: https://bugs.launchpad.net/qemu/+bug/1525682
      Reported-by: Dmitrij D. Czarkoff
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-id: 1450105357-8516-1-git-send-email-peter.maydell@linaro.org
      18f49881
    • D
      io: add QIOChannelSocket class · 559607ea
      Daniel P. Berrange 提交于
      Implement a QIOChannel subclass that supports sockets I/O.
      The implementation is able to manage a single socket file
      descriptor, whether a TCP/UNIX listener, TCP/UNIX connection,
      or a UDP datagram. It provides APIs which can listen and
      connect either asynchronously or synchronously. Since there
      is no asynchronous DNS lookup API available, it uses the
      QIOTask helper for spawning a background thread to ensure
      non-blocking operation.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      559607ea
  24. 04 12月, 2015 2 次提交
    • R
      configure: use appropriate code fragment for -fstack-protector checks · fccd35a0
      Rodrigo Rebello 提交于
      The check for stack-protector support consisted in compiling and linking
      the test program below (output by function write_c_skeleton()) with the
      compiler flag -fstack-protector-strong first and then with
      -fstack-protector-all if the first one failed to work:
      
        int main(void) { return 0; }
      
      This caused false positives when using certain toolchains in which the
      compiler accepted -fstack-protector-strong but no support was provided
      by the C library, since for this stack-protector variant the compiler
      emits canary code only for functions that meet specific conditions
      (local arrays, memory references to local variables, etc.) and the code
      fragment under test included none of them (hence no stack protection
      code generated, no link failure).
      
      This fix changes the test program used for -fstack-protector checks to
      include a function that meets conditions which cause the compiler to
      generate canary code in all variants.
      Signed-off-by: NRodrigo Rebello <rprebello@gmail.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      fccd35a0
    • P
      configure: Diagnose broken linkers directly · 0ef74c74
      Peter Maydell 提交于
      Currently if the user's compiler works for creating .o files but
      their linker is broken such that compiling an executable from a
      C file does not work, we will report a misleading error message
      about the compiler not supporting __thread (since that happens
      to be the first test we run which requires a working linker).
      Explicitly check that compile_prog works as well as compile_object,
      so that people whose toolchain setup is broken get a more helpful
      error message.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      0ef74c74
  25. 30 11月, 2015 1 次提交
  26. 19 11月, 2015 1 次提交
  27. 16 11月, 2015 2 次提交
  28. 14 11月, 2015 1 次提交
  29. 13 11月, 2015 1 次提交