Skip to content

Support for CFI

Paolo Bonzini requested to merge bonzini/libslirp:opaque-timer into master

libslirp users cannot be compiled with CFI (control-flow instrumentation) because of the way timers work. libslirp passes a function pointer to the timer_new callback but the type information for the callback is missing; invoking the timer callback produces a CFI false positive.

Fix this by introducing a CFI-friendly version of the .timer_new callback. The new callback replaces the function pointer with an enum; invoking the callback is done with a new function slirp_handle_timer.

Merge request reports

Loading