From 4d84111421bcf66c236e6ef9af5846514e66653b Mon Sep 17 00:00:00 2001 From: Alexander Potapenko Date: Wed, 10 Sep 2025 13:57:41 +0200 Subject: tools: add check-syzos.sh As shown in https://github.com/google/syzkaller/issues/5565, SYZOS code in the `guest` section cannot reference global data, because it is relocated into the guest memory. While arm64 executor has a dynamic check for data accesses, it is virtually impossible to do the same on x86 without implementing an x86 disassembler. Instead of doing so, introduce a build-time script that will detect instructions referencing global data on a best-effort basis. --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6fc9c1c51..bf7bca804 100644 --- a/Makefile +++ b/Makefile @@ -118,7 +118,7 @@ endif all: host target host: manager repro mutate prog2c db upgrade -target: execprog executor +target: execprog executor check_syzos executor: descriptions ifeq ($(TARGETOS),fuchsia) @@ -427,6 +427,9 @@ check_links: check_html: ./tools/check-html.sh +check_syzos: executor + ./tools/check-syzos.sh 2>/dev/null + # Check that the diff is empty. This is meant to be executed after generating # and formatting the code to make sure that everything is committed. check_diff: -- cgit mrf-deployment