lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 14 Feb 2020 20:33:50 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Qian Cai <cai@....pw>, Jim Mattson <jmattson@...gle.com>
Cc:     Sean Christopherson <sean.j.christopherson@...el.com>,
        Vitaly Kuznetsov <vkuznets@...hat.com>,
        Wanpeng Li <wanpengli@...cent.com>,
        Joerg Roedel <joro@...tes.org>, kvm list <kvm@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] kvm/emulate: fix a -Werror=cast-function-type

On 14/02/20 20:14, Qian Cai wrote:
>> It seems misguided to define a local variable just to get an implicit
>> cast from (void *) to (fastop_t). Sean's first suggestion gives you
>> the same implicit cast without the local variable. The second
>> suggestion makes both casts explicit.
> 
> OK, I'll do a v2 using the first suggestion which looks simpler once it passed
> compilations.
> 

Another interesting possibility is to use an unnamed union of a
(*execute) function pointer and a (*fastop) function pointer.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ