On 08/03/21 12:19, Daniel P. Berrangé wrote:
My concern is that libslirp is just showing us one known example of the problem. QEMU links to many more external libraries, which might exhibit similar issues.
We know exactly the issue: QEMU uses a pointer to a library function as a function pointer that is called *from QEMU* and not from another library.
More issues like this (or other CFI issues such as the GLib casted event handlers) could arise if some but not all the dependencies are linked with CFI. But that should be handled at the distro level; if none of the dependencies use CFI, CFI incompatibility issues are fairly limited.
Paolo
If we need to rebuild all the dependancies with CFI too, to be confident that the combined work will operate correctly, then this is quite a significant implication. Overall I think this is going to be a problem for the changes of distros adopting the use of CFI, especially if they're not using CLang as their toolchain.