gitlab-ci.yml: Add jobs to test CFI
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest2 patches 5 repliesIn review
- v22 patches 11 repliesSuperseded
- v12 patches 8 repliesSuperseded
Changes in v3 from the cover letter
- Restricted the targets to x86_64, ppc64, aarch64 and s390x, under suggestion from Daniel.
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | gitlab-ci.yml: Allow custom # of parallel linkers.gitlab-ci.yml | +4 | 1 reply | |
| 2/2 | gitlab-ci.yml: Add jobs to test CFI flags.gitlab-ci.yml | +119 | 3 replies |
Reviews trailers per patch
1 of 2 patches has a Reviewed-by or Acked-by.
| Patch | Daniel P. Berrangé |
|---|---|
| 1/2 | R-b |
| 2/2 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 0/2] gitlab-ci.yml: Add jobs to test CFI
For a few months now QEMU has had options to enable compiler-based control-flow integrity if built with clang.
While this feature has a low maintenance, It's probably still better to add tests to the CI environment to check that an update doesn't break it.
The patchset allow gitlab testing of:
* --enable-cfi: forward-edge cfi (function pointers)
* --enable-safe-stack: backward-edge cfi (return pointers) As an added benefit, this also inherently tests LTO.
The first patch allows a custom selection for linker parallelism. Currently, make parallelism at build time is based on the number of cpus available.
This doesn't work well with LTO at linking, because the linker has to load in memory all the intermediate object files for optimization. If the gitlab runner happens to run two linking processes at the same time, the job will fail with an out-of-memory error,
The patch leverages the ability to maintain high parallelism at compile time, but limit the number of linkers executed in parallel.
The second patch introduces the ci/cd jobs in the gitlab pipeline. To maintain a limited number of short jobs, Daniel suggested to only test targets where KVM is available. This restricted the jobs to x86_64, ppc64, aarch64 and s390x. To keep the jobs under 1 hour, I created three chains of build -> check -> acceptance jobs, divided by architecture vendor (Intel, ARM, IBM).
For build, we have to select --enable-slirp=git, because CFI needs a statically linked version of slirp, with CFI information. More info on this can be found in a comment in .gitlab-ci.yml, or on a patch for mason currently in ML:
https://www.mail-archive.com/[email protected]/msg787636.html
Test runs of the full pipeline are here (cfi-ci-v3 branch):
https://gitlab.com/dbuono/qemu/-/pipelines/264484574
v3:
- Restricted the targets to x86_64, ppc64, aarch64 and s390x, under suggestion from Daniel.
v2:
- More details in the code about the issue of using system-wide slirp
- Use meson to only limit linker parallelism instead of forcing no parallelism on the whole compilation process.
Daniele Buono (2):
gitlab-ci.yml: Allow custom # of parallel linkers gitlab-ci.yml: Add jobs to test CFI flags
.gitlab-ci.yml | 123 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+)
Signature · 1 line
2.30.0