Re: [PATCH] powerpc/kvm/cma: Fix panic introduces by signed shift operation

2014-09-03 Thread Paolo Bonzini
Il 02/09/2014 18:13, Laurent Dufour ha scritto: > fc95ca7284bc54953165cba76c3228bd2cdb9591 introduces a memset in > kvmppc_alloc_hpt since the general CMA doesn't clear the memory it > allocates. > > However, the size argument passed to memset is computed from a signed value > and its signed bit i

[PATCH] powerpc/kvm/cma: Fix panic introduces by signed shift operation

2014-09-02 Thread Laurent Dufour
fc95ca7284bc54953165cba76c3228bd2cdb9591 introduces a memset in kvmppc_alloc_hpt since the general CMA doesn't clear the memory it allocates. However, the size argument passed to memset is computed from a signed value and its signed bit is extended by the cast the compiler is doing. This lead to e