qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Handling of fall through code (was: [PATCH v8 04/87] ta


From: Daniel P . Berrangé
Subject: Re: [Qemu-devel] Handling of fall through code (was: [PATCH v8 04/87] target/mips: Mark switch fallthroughs with interpretable comments
Date: Mon, 8 Jul 2019 13:08:39 +0100
User-agent: Mutt/1.12.0 (2019-05-25)

On Mon, Jul 08, 2019 at 02:04:27PM +0200, Stefan Weil wrote:
> Am 08.07.2019 um 10:14 schrieb Aleksandar Markovic:
> >
> > On Jul 7, 2019 10:26 PM, "Stefan Weil" <address@hidden
> > <mailto:address@hidden>> wrote:
> > > - There is also fallthrough code which is obviously not correct
> > (even in target/mips/translate.c).
> >
> > Can you please be more specific about those cases from
> > target/mips/translate.c?
> >
> 
> Daniel, here is one possible fix (I am not sure how important that is):
> 
> diff --git a/crypto/hash-nettle.c b/crypto/hash-nettle.c
> index 96f186f442..074cece468 100644
> --- a/crypto/hash-nettle.c
> +++ b/crypto/hash-nettle.c
> @@ -28,10 +28,10 @@
>  
>  typedef void (*qcrypto_nettle_init)(void *ctx);
>  typedef void (*qcrypto_nettle_write)(void *ctx,
> -                                     unsigned int len,
> +                                     size_t len,
>                                       const uint8_t *buf);
>  typedef void (*qcrypto_nettle_result)(void *ctx,
> -                                      unsigned int len,
> +                                      size_t len,
>                                        uint8_t *buf);

This is a case of nettle changing its API contract in version 3.

We dealt with it in cipher-nettle.c already by creating a cipher_length_t
type. need to copy this solution into the hash code, unless perhaps we
can drop older nettle per out platform support matrix.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



reply via email to

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