From cc1c342923b30616acc9344fe5eade7eb1412850 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 17 Jul 2017 12:36:05 +0200 Subject: syz-ci: allow to specify cmdline/sysctls Allow to specify per-kernel command line and sysctl values to more closely mimic the target kernel. --- pkg/kernel/kernel.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pkg/kernel/kernel.go') diff --git a/pkg/kernel/kernel.go b/pkg/kernel/kernel.go index 208b61815..5b97715b4 100644 --- a/pkg/kernel/kernel.go +++ b/pkg/kernel/kernel.go @@ -68,8 +68,10 @@ func build(dir, compiler string) error { // CreateImage creates a disk image that is suitable for syzkaller. // Kernel is taken from kernelDir, userspace system is taken from userspaceDir. +// If cmdlineFile is not empty, contents of the file are appended to the kernel command line. +// If sysctlFile is not empty, contents of the file are appended to the image /etc/sysctl.conf. // Produces image and root ssh key in the specified files. -func CreateImage(kernelDir, userspaceDir, image, sshkey string) error { +func CreateImage(kernelDir, userspaceDir, cmdlineFile, sysctlFile, image, sshkey string) error { tempDir, err := ioutil.TempDir("", "syz-build") if err != nil { return err -- cgit mrf-deployment