Skip to content

Add support for Control-Flow Integrity

Daniele Buono qemu-devel 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest5 patches 7 repliesIn review
  2. v39 patches 19 repliesSuperseded
  3. v26 patches 26 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches14 repliesSuperseded

Changes in v4 from the cover letter

- Removed patches to avoid clang warnings, since they are being merged independently and are not really necessary for CFI
- Added documentation in docs/devel to explain how to compile with CFI, and how to disable CFI for incompatible functions

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5configure,meson: add option to enable LTOconfigure meson.build+8 -02 replies
2/5cfi: Initial support for cfi-icall in QEMUaccel/tcg/cpu-exec.c include/qemu/compiler.h plugins/core.c +4 more+96 -00 replies
3/5check-block: enable iotests with cfi-icalltests/check-block.sh+11 -70 replies
4/5configure,meson: support Control-Flow Integrityconfigure meson.build meson_options.txt+69 -13 replies
5/5docs: Add CFI Documentationdocs/devel/control-flow-integrity.rst+137 -02 replies

Reviews trailers per patch

2 of 5 patches have a Reviewed-by or Acked-by.

PatchAlex BennéeAlexander Bulekov
1/5
2/5A-b
3/5
4/5
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/5] Add support for Control-Flow Integrity

This patch adds supports for Control-Flow Integrity checks on indirect function calls.

Requires the use of clang, and link-time optimizations

Since it's been a month, and some of the patches are being merged independently, I thought of rebasing, retesting and sending an updated version. Also, added a documentation in docs/devel to explain CFI and how to handle CFI-sensitive code.

Changes in v4:
- Removed patches to avoid clang warnings, since they are being merged independently and are not really necessary for CFI
- Added documentation in docs/devel to explain how to compile with CFI, and how to disable CFI for incompatible functions

Changes in v3:

- clang 11+ warnings are now handled directly at the source, instead of disabling specific warnings for the whole code. Some more work may be needed here to polish the patch, I would kindly ask for a review from the corresponding maintainers
- Remove configure-time checks for toolchain compatibility with LTO.
- the decorator to disable cfi checks on functions has been renamed and moved to include/qemu/compiler.h
- configure-time checks for cfi support and dependencies has been moved from configure to meson

Link to v3: https://www.mail-archive.com/[email protected]/msg757930.html
Link to v2: https://www.mail-archive.com/[email protected]/msg753675.html
Link to v1: https://www.mail-archive.com/[email protected]/msg718786.html

Daniele Buono (5):
configure,meson: add option to enable LTO
cfi: Initial support for cfi-icall in QEMU
check-block: enable iotests with cfi-icall
configure,meson: support Control-Flow Integrity
docs: Add CFI Documentation

 accel/tcg/cpu-exec.c                  |  11 +++
 configure                             |  26 +++++
 docs/devel/control-flow-integrity.rst | 137 ++++++++++++++++++++++++++
 include/qemu/compiler.h               |  12 +++
 meson.build                           |  46 +++++++++
 meson_options.txt                     |   4 +
 plugins/core.c                        |  37 +++++++
 plugins/loader.c                      |   7 ++
 tcg/tci.c                             |   7 ++
 tests/check-block.sh                  |  18 ++--
 util/main-loop.c                      |  11 +++
 util/oslib-posix.c                    |  11 +++
 12 files changed, 320 insertions(+), 7 deletions(-)
 create mode 100644 docs/devel/control-flow-integrity.rst
Signature · 1 line
2.17.1