qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 0/2] gitlab-ci.yml: Add jobs to test CFI


From: Daniele Buono
Subject: Re: [PATCH v2 0/2] gitlab-ci.yml: Add jobs to test CFI
Date: Tue, 2 Mar 2021 11:31:54 -0500
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1


On 3/2/2021 10:38 AM, Daniel P. Berrangé wrote:
Is this scenario going to upset  CFI, or is it happy that 'void *'
is compatible with 'mytype *', and ok with the intermediate casts
to/from GCallback ?

This is a valid scenario. LLVM does offer the ability of considering all pointer types compatible, and it is being enabled in QEMU. So void* is compatible to any type* and that would not be considered a fault.

Intermediate casts are also fine since you are just passing the pointer but not using it. The check will happen only when the function is called, at which point it was cast back to something compatible.



reply via email to

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