aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/csource/common.go
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2023-06-14 14:58:25 +0200
committerAleksandr Nogikh <wp32pw@gmail.com>2023-06-15 11:49:04 +0200
commit757d26edba7d7de8c564a87a262a0b1321ddf804 (patch)
treef78b5e053c0a61ef2771e130af410ee7ee1d40da /pkg/csource/common.go
parent90d4044eae0123561d6cf2f667a4bc3357d93e7a (diff)
all: support swap feature on Linux
If the feature is supported on the device, allocate a 128MB swap file after VM boot and activate it.
Diffstat (limited to 'pkg/csource/common.go')
-rw-r--r--pkg/csource/common.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkg/csource/common.go b/pkg/csource/common.go
index 6f3920126..3b30d85f4 100644
--- a/pkg/csource/common.go
+++ b/pkg/csource/common.go
@@ -127,6 +127,7 @@ func commonDefines(p *prog.Prog, opts Options) map[string]bool {
"SYZ_WIFI": opts.Wifi,
"SYZ_802154": opts.IEEE802154,
"SYZ_SYSCTL": opts.Sysctl,
+ "SYZ_SWAP": opts.Swap,
"SYZ_EXECUTOR_USES_SHMEM": sysTarget.ExecutorUsesShmem,
"SYZ_EXECUTOR_USES_FORK_SERVER": sysTarget.ExecutorUsesForkServer,
}