qemu-e2k/include
Daniele Buono c905a3680d cfi: Initial support for cfi-icall in QEMU
LLVM/Clang, supports runtime checks for forward-edge Control-Flow
Integrity (CFI).

CFI on indirect function calls (cfi-icall) ensures that, in indirect
function calls, the function called is of the right signature for the
pointer type defined at compile time.

For this check to work, the code must always respect the function
signature when using function pointer, the function must be defined
at compile time, and be compiled with link-time optimization.

This rules out, for example, shared libraries that are dynamically loaded
(given that functions are not known at compile time), and code that is
dynamically generated at run-time.

This patch:

1) Introduces the CONFIG_CFI flag to support cfi in QEMU

2) Introduces a decorator to allow the definition of "sensitive"
functions, where a non-instrumented function may be called at runtime
through a pointer. The decorator will take care of disabling cfi-icall
checks on such functions, when cfi is enabled.

3) Marks functions currently in QEMU that exhibit such behavior,
in particular:
- The function in TCG that calls pre-compiled TBs
- The function in TCI that interprets instructions
- Functions in the plugin infrastructures that jump to callbacks
- Functions in util that directly call a signal handler

Signed-off-by: Daniele Buono <dbuono@linux.vnet.ibm.com>
Acked-by: Alex Bennée <alex.bennee@linaro.org
Message-Id: <20201204230615.2392-3-dbuono@linux.vnet.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-01-02 21:03:35 +01:00
..
authz
block block: introduce BDRV_REQ_NO_WAIT flag 2020-12-18 12:35:55 +01:00
chardev chardev: do not use machine_init_done 2020-12-15 12:51:51 -05:00
crypto
disas
exec poison: remove GNUC check 2020-12-15 12:53:13 -05:00
fpu
hw qdev: Rename qdev_get_prop_ptr() to object_field_prop_ptr() 2020-12-18 15:20:18 -05:00
io
libdecnumber
migration migration: Replace migration's JSON writer by the general one 2020-12-19 10:39:16 +01:00
monitor sev: add sev-inject-launch-secret 2020-12-10 17:33:17 -05:00
net qdev: Move softmmu properties to qdev-properties-system.h 2020-12-18 15:20:17 -05:00
qapi qobject: Make QString immutable 2020-12-19 10:39:41 +01:00
qemu cfi: Initial support for cfi-icall in QEMU 2021-01-02 21:03:35 +01:00
qom
scsi
standard-headers target/i386: Support up to 32768 CPUs without IRQ remapping 2020-12-10 12:15:00 -05:00
sysemu vl: Add option to avoid stopping VM upon guest panic 2020-12-15 12:51:58 -05:00
tcg
ui console: drop qemu_console_get_ui_info 2020-12-11 08:06:39 +01:00
user
elf.h
glib-compat.h
qemu-common.h vl: extract softmmu/datadir.c 2020-12-10 12:15:18 -05:00
qemu-io.h
trace-tcg.h