[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 23/23] meson: Stop if cfi is enabled with system slirp
From: |
Paolo Bonzini |
Subject: |
[PULL 23/23] meson: Stop if cfi is enabled with system slirp |
Date: |
Sat, 6 Mar 2021 11:54:19 +0100 |
From: Daniele Buono <dbuono@linux.vnet.ibm.com>
For CFI, we need to compile slirp as a static library together with qemu.
This is because we register slirp functions as callbacks for QEMU Timers.
When using a system-wide shared libslirp, the type information for the
callback is missing and the timer call produces a false positive with CFI.
With this patch, meson will stop if CFI is enabled with system-wide slirp.
In 6.1 we will introduce a new interface to slirp where the callback is
passed as an enum rather than a function pointer.
Signed-off-by: Daniele Buono <dbuono@linux.vnet.ibm.com>
Message-Id: <20210304025939.9164-1-dbuono@linux.vnet.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
meson.build | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/meson.build b/meson.build
index 07bc23129a..05fb125dc2 100644
--- a/meson.build
+++ b/meson.build
@@ -1574,6 +1574,18 @@ if have_system
endif
endif
+# For CFI, we need to compile slirp as a static library together with qemu.
+# This is because we register slirp functions as callbacks for QEMU Timers.
+# When using a system-wide shared libslirp, the type information for the
+# callback is missing and the timer call produces a false positive with CFI.
+#
+# Now that slirp_opt has been defined, check if the selected slirp is
compatible
+# with control-flow integrity.
+if get_option('cfi') and slirp_opt == 'system'
+ error('Control-Flow Integrity is not compatible with system-wide slirp.' \
+ + ' Please configure with --enable-slirp=git')
+endif
+
fdt = not_found
fdt_opt = get_option('fdt')
if have_system
--
2.29.2
- [PULL 15/23] scsi-generic: do not snoop the output of failed commands, (continued)
- [PULL 15/23] scsi-generic: do not snoop the output of failed commands, Paolo Bonzini, 2021/03/06
- [PULL 16/23] scsi: inline sg_io_sense_from_errno() into the callers., Paolo Bonzini, 2021/03/06
- [PULL 20/23] meson: adjust timeouts for some slower tests, Paolo Bonzini, 2021/03/06
- [PULL 21/23] trace: fix "-trace file=...", Paolo Bonzini, 2021/03/06
- [PULL 22/23] trace: skip qemu_set_log_filename if no "-D" option was passed, Paolo Bonzini, 2021/03/06
- [PULL 08/23] accel: kvm: Add aligment assert for kvm_log_clear_one_slot, Paolo Bonzini, 2021/03/06
- [PULL 14/23] scsi: Add mapping for generic SCSI_HOST status to sense codes, Paolo Bonzini, 2021/03/06
- [PULL 17/23] scsi: move host_status handling into SCSI drivers, Paolo Bonzini, 2021/03/06
- [PULL 18/23] qemu-option: do not suggest using the delay option, Paolo Bonzini, 2021/03/06
- [PULL 19/23] build-sys: invoke ninja with -d keepdepfile, Paolo Bonzini, 2021/03/06
- [PULL 23/23] meson: Stop if cfi is enabled with system slirp,
Paolo Bonzini <=
- [PULL 09/23] lsilogic: Use PCIDevice::exit instead of DeviceState::unrealize, Paolo Bonzini, 2021/03/06
- Re: [PULL 00/23] Misc patches for 2021-03-06, no-reply, 2021/03/06
- Re: [PULL 00/23] Misc patches for 2021-03-06, Peter Maydell, 2021/03/08