[RFC PATCH 0/4] net: support for CFI with libslirp >= 4.7

Paolo Bonzini posted 4 patches 3 years, 10 months ago
Test checkpatch failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220412121337.207203-1-pbonzini@redhat.com
Maintainers: Samuel Thibault <samuel.thibault@ens-lyon.org>, Jason Wang <jasowang@redhat.com>
There is a newer version of this series
meson.build | 24 +++++++--------
net/slirp.c | 85 ++++++++++++++++++++++++++++++++++++++++++++++-------
2 files changed, 86 insertions(+), 23 deletions(-)
[RFC PATCH 0/4] net: support for CFI with libslirp >= 4.7
Posted by Paolo Bonzini 3 years, 10 months ago
A system libslirp (either static or dynamic) cannot be used with QEMU if
QEMU is compiled with control-flow instrumentation, because of the way
timers are implemented in libslirp.   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.

The fix requires the introduction of new interfaces in
libslirp.  This series is an example of how QEMU would use
the new interfaces introduced by libslirp merge request at
https://gitlab.freedesktop.org/slirp/libslirp/-/merge_requests/117.
It is RFC-only because the new interfaces have not been accepted yet.

Paolo Bonzini (4):
  net: slirp: introduce a wrapper struct for QemuTimer
  net: slirp: switch to slirp_new
  net: slirp: add support for CFI-friendly timer API
  net: slirp: allow CFI with libslirp >= 4.7

 meson.build | 24 +++++++--------
 net/slirp.c | 85 ++++++++++++++++++++++++++++++++++++++++++++++-------
 2 files changed, 86 insertions(+), 23 deletions(-)

-- 
2.35.1