Skip to content

Commit 20680de

Browse files
committed
xen-cbmc: fix ci script
This script has been broken, and not been picked up in CI until now. This change fixes the script, as well as makes sure that the relevant steps are executed, and the resulting build artefacts have the required goto-cc section in them. This CI script has been refered to as part of the paper: "Using model checking tools to triage the severity of security bugs in the Xen hypervisor", that has been presented at FMCAD 2020. Signed-off-by: Norbert Manthey <[email protected]>
1 parent c4f71be commit 20680de

File tree

1 file changed

+37
-18
lines changed

1 file changed

+37
-18
lines changed
Lines changed: 37 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,45 @@
1-
name: Build and Test Xen
1+
name: Build Xen with CPROVER tools
22

3-
on: [push]
3+
on:
4+
pull_request:
5+
branches: [ develop ]
46

57
jobs:
6-
Linux:
7-
8+
CompileXen:
89
runs-on: ubuntu-18.04
9-
1010
steps:
11-
- name: Install Packages
12-
run: sudo apt-get install coreutils \
13-
build-essential gcc git make flex bison \
14-
software-properties-common libwww-perl python \
15-
bin86 gdb bcc liblzma-dev python-dev gettext iasl \
16-
uuid-dev libncurses5-dev libncursesw5-dev pkg-config \
17-
libgtk2.0-dev libyajl-dev sudo time
11+
- uses: actions/checkout@v2
12+
with:
13+
submodules: true
14+
- name: Install Packages
15+
env:
16+
# This is needed in addition to -yq to prevent apt-get from asking for
17+
# user input
18+
DEBIAN_FRONTEND: noninteractive
19+
run: |
20+
sudo apt-get install -y coreutils build-essential gcc git make flex bison software-properties-common libwww-perl python
21+
sudo apt-get install -y bin86 gdb bcc liblzma-dev python-dev gettext iasl uuid-dev libncurses5-dev libncursesw5-dev pkg-config
22+
sudo apt-get install -y libgtk2.0-dev libyajl-dev sudo time
23+
24+
- name: Build CBMC tools
25+
run: |
26+
make -C src minisat2-download
27+
make -C src cbmc.dir goto-cc.dir goto-diff.dir
28+
29+
- name: Get one-line-scan
30+
run: git clone -b path-addition https://github.com/awslabs/one-line-scan.git
1831

19-
- uses: actions/checkout@v1
32+
- name: Get Xen 4.13
33+
run: git clone git://xenbits.xen.org/xen.git xen_4_13 && cd xen_4_13 && git reset --hard RELEASE-4.13.0 && pwd
2034

21-
- name: build CBMC tools
22-
run: make -C src minisat2-download
23-
run: make -C src cbmc.dir goto-cc.dir goto-diff.dir
35+
- name: Prepare compile Xen with CBMC via one-line-scan
36+
run: |
37+
ln -s goto-cc src/goto-cc/goto-ld
38+
ln -s goto-cc src/goto-cc/goto-as
39+
ln -s goto-cc src/goto-cc/goto-g++
2440
25-
- name: get Xen 4.13
26-
run: git clone git://xenbits.xen.org/xen.git xen_4_13 && cd xen_4_13 && git reset --hard RELEASE-4.13.0
41+
- name: Compile Xen with CBMC via one-line-scan, and check for goto-cc section
42+
run: one-line-scan/one-line-scan --add-to-path $(pwd)/src/cbmc --add-to-path $(pwd)/src/goto-diff --add-to-path $(pwd)/src/goto-cc --no-analysis --trunc-existing --extra-cflags -Wno-error -o CPROVER -j 3 -- make -C xen_4_13 xen -j $(nproc) -k || true
43+
44+
- name: Check for goto-cc section in xen-syms binary
45+
run: objdump -h xen_4_13/xen/xen-syms | grep "goto-cc"

0 commit comments

Comments
 (0)