qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] f8b3e4: mips/kvm: Fix Big endian 32-bit regis


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] f8b3e4: mips/kvm: Fix Big endian 32-bit register access
Date: Thu, 16 Jul 2015 13:00:04 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: f8b3e48b2d269551cd40f94770dc20da2f402325
      
https://github.com/qemu/qemu/commit/f8b3e48b2d269551cd40f94770dc20da2f402325
  Author: James Hogan <address@hidden>
  Date:   2015-07-16 (Thu, 16 Jul 2015)

  Changed paths:
    M target-mips/kvm.c

  Log Message:
  -----------
  mips/kvm: Fix Big endian 32-bit register access

Fix access to 32-bit registers on big endian targets. The pointer passed
to the kernel must be for the actual 32-bit value, not a temporary
64-bit value, otherwise on big endian systems the kernel will only
interpret the upper half.

Signed-off-by: James Hogan <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Cc: Leon Alrae <address@hidden>
Cc: Aurelien Jarno <address@hidden>
Cc: address@hidden
Cc: address@hidden
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 02dae26ac4ceb1e82c432cfca4d9b65ae82343c6
      
https://github.com/qemu/qemu/commit/02dae26ac4ceb1e82c432cfca4d9b65ae82343c6
  Author: James Hogan <address@hidden>
  Date:   2015-07-16 (Thu, 16 Jul 2015)

  Changed paths:
    M target-mips/kvm.c

  Log Message:
  -----------
  mips/kvm: Sign extend registers written to KVM

In case we're running on a 64-bit host, be sure to sign extend the
general purpose registers and hi/lo/pc before writing them to KVM, so as
to take advantage of MIPS32/MIPS64 compatibility.

Signed-off-by: James Hogan <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Cc: Leon Alrae <address@hidden>
Cc: Aurelien Jarno <address@hidden>
Cc: address@hidden
Cc: address@hidden
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 586d2142a9f1aa5a1dceb0941e7b3f0953974a8b
      
https://github.com/qemu/qemu/commit/586d2142a9f1aa5a1dceb0941e7b3f0953974a8b
  Author: Gonglei <address@hidden>
  Date:   2015-07-16 (Thu, 16 Jul 2015)

  Changed paths:
    M hw/ppc/spapr_drc.c

  Log Message:
  -----------
  ppc/spapr_drc: fix memory leak

fix CID 1311373.

Signed-off-by: Gonglei <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 5348c62cab309b68ecd13a33c9f21e8d6071af72
      
https://github.com/qemu/qemu/commit/5348c62cab309b68ecd13a33c9f21e8d6071af72
  Author: Gonglei <address@hidden>
  Date:   2015-07-16 (Thu, 16 Jul 2015)

  Changed paths:
    M hw/arm/xlnx-zynqmp.c

  Log Message:
  -----------
  arm/xlnx-zynqmp: fix memory leak

fix CID 1311372.

Signed-off-by: Gonglei <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 24b41d66c8ad8f77839fca777b92e365dad0cf5c
      
https://github.com/qemu/qemu/commit/24b41d66c8ad8f77839fca777b92e365dad0cf5c
  Author: Dr. David Alan Gilbert <address@hidden>
  Date:   2015-07-16 (Thu, 16 Jul 2015)

  Changed paths:
    M migration/rdma.c

  Log Message:
  -----------
  RDMA: Fix error exits

The error checks I added used 'break' after the error, but I'm
in a switch inside the while loop, so they need to be 'goto out'.

Spotted by coverity; entries 1311368 and 1311369

Fixes: afcddefd

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: c6742b14fe7352059cd4954a356a8105757af31b
      
https://github.com/qemu/qemu/commit/c6742b14fe7352059cd4954a356a8105757af31b
  Author: Paolo Bonzini <address@hidden>
  Date:   2015-07-16 (Thu, 16 Jul 2015)

  Changed paths:
    M memory.c

  Log Message:
  -----------
  memory: fix refcount leak in memory_region_present

memory_region_present() leaks a reference to a MemoryRegion in the
case "mr == container".  While fixing it, avoid reference counting
altogether for memory_region_present(), by using RCU only.

The return value could in principle be already invalid immediately
after memory_region_present returns, but presumably the caller knows
that and it's using memory_region_present to probe for devices that
are unpluggable, or something like that.  The RCU critical section
is needed anyway, because it protects as->current_map.

Reported-by: Peter Maydell <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: becaeb726ae7da4212a788773ebdfe87b4833f5c
      
https://github.com/qemu/qemu/commit/becaeb726ae7da4212a788773ebdfe87b4833f5c
  Author: Radim Krčmář <address@hidden>
  Date:   2015-07-16 (Thu, 16 Jul 2015)

  Changed paths:
    M configure
    M crypto/cipher-nettle.c

  Log Message:
  -----------
  crypto: fix build with nettle >= 3.0.0

In nettle 3, cbc_encrypt() accepts 'nettle_cipher_func' instead of
'nettle_crypt_func' and these two differ in 'const' qualifier of the
first argument.  The build fails with:

  In file included from crypto/cipher.c:71:0:
  ./crypto/cipher-nettle.c: In function ‘qcrypto_cipher_encrypt’:
  ./crypto/cipher-nettle.c:154:38: error: passing argument 2 of
  ‘nettle_cbc_encrypt’ from incompatible pointer type
     cbc_encrypt(ctx->ctx_encrypt, ctx->alg_encrypt,
                                         ^
  In file included from ./crypto/cipher-nettle.c:24:0,
             from crypto/cipher.c:71:
  /usr/include/nettle/cbc.h:48:1: note: expected
  ‘void (*)(const void *, size_t, uint8_t *, const uint8_t *)
  but argument is of type
  ‘void (*)(      void *, size_t, uint8_t *, const uint8_t *)

To allow both versions, we switch to the new definition and #if typedef
it for old versions.

Signed-off-by: Radim Krčmář <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: d3462e378f40ba6838b6c42584c30769ca633e6f
      
https://github.com/qemu/qemu/commit/d3462e378f40ba6838b6c42584c30769ca633e6f
  Author: Radim Krčmář <address@hidden>
  Date:   2015-07-16 (Thu, 16 Jul 2015)

  Changed paths:
    M crypto/cipher-nettle.c

  Log Message:
  -----------
  crypto: avoid undefined behavior in nettle calls

Calling a function pointer that was cast from an incompatible function
results in undefined behavior.  'void *' isn't compatible with 'struct
XXX *', so we can't cast to nettle_cipher_func, but have to provide a
wrapper.  (Conversion from 'void *' to 'struct XXX *' might require
computation, which won't be done if we drop argument's true type, and
pointers can have different sizes so passing arguments on stack would
bug.)

Having two different prototypes based on nettle version doesn't make
this solution any nicer.

Reported-by: Peter Maydell <address@hidden>
Signed-off-by: Radim Krčmář <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: b92304ee814f0fe8109c8946dfb4dd4b63e89871
      
https://github.com/qemu/qemu/commit/b92304ee814f0fe8109c8946dfb4dd4b63e89871
  Author: Peter Maydell <address@hidden>
  Date:   2015-07-16 (Thu, 16 Jul 2015)

  Changed paths:
    M configure
    M crypto/cipher-nettle.c
    M hw/arm/xlnx-zynqmp.c
    M hw/ppc/spapr_drc.c
    M memory.c
    M migration/rdma.c
    M target-mips/kvm.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging

* MIPS-KVM fixes.
* Coverity fixes.
* Nettle function prototype fixes.
* Memory API refcount fix.

# gpg: Signature made Thu Jul 16 19:01:27 2015 BST using RSA key ID 78C7AE83
# gpg: Good signature from "Paolo Bonzini <address@hidden>"
# gpg:                 aka "Paolo Bonzini <address@hidden>"
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* remotes/bonzini/tags/for-upstream:
  crypto: avoid undefined behavior in nettle calls
  crypto: fix build with nettle >= 3.0.0
  memory: fix refcount leak in memory_region_present
  RDMA: Fix error exits
  arm/xlnx-zynqmp: fix memory leak
  ppc/spapr_drc: fix memory leak
  mips/kvm: Sign extend registers written to KVM
  mips/kvm: Fix Big endian 32-bit register access

Signed-off-by: Peter Maydell <address@hidden>


  Commit: b4329bf41c86bac8b56cadb097081960cc4839a0
      
https://github.com/qemu/qemu/commit/b4329bf41c86bac8b56cadb097081960cc4839a0
  Author: Peter Maydell <address@hidden>
  Date:   2015-07-16 (Thu, 16 Jul 2015)

  Changed paths:
    M VERSION

  Log Message:
  -----------
  Update version for v2.4.0-rc1 release

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/67ff64e08245...b4329bf41c86

reply via email to

[Prev in Thread] Current Thread [Next in Thread]