aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorAlexander Potapenko <glider@google.com>2025-09-10 13:57:41 +0200
committerAlexander Potapenko <glider@google.com>2025-09-11 08:49:06 +0000
commit4d84111421bcf66c236e6ef9af5846514e66653b (patch)
treee33d854a49111de2087aa03c113525d6984a0e12 /Makefile
parentfdeaa69b728b8c7a429af7101cdd788f1dc9b916 (diff)
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.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
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: