aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/csource
diff options
context:
space:
mode:
authorTaras Madan <tarasmadan@google.com>2023-02-22 16:09:15 +0100
committerTaras Madan <tarasmadan@google.com>2023-02-24 12:47:23 +0100
commit26be8df8135ecb59e8034967927aa18c26117a3a (patch)
tree9d57a23cc7a370192bae44f7af6c6131fd7a1e6d /pkg/csource
parent4c742139504eff0ac045069d3729ae52f2da5138 (diff)
all: tools/syz-env make generate result
Diffstat (limited to 'pkg/csource')
-rw-r--r--pkg/csource/csource.go34
1 files changed, 17 insertions, 17 deletions
diff --git a/pkg/csource/csource.go b/pkg/csource/csource.go
index 8671a57db..d4972261b 100644
--- a/pkg/csource/csource.go
+++ b/pkg/csource/csource.go
@@ -4,23 +4,23 @@
// Package csource generates [almost] equivalent C programs from syzkaller programs.
//
// Outline of the process:
-// - inputs to the generation are the program and options
-// - options control multiple aspects of the resulting C program,
-// like if we want a multi-threaded program or a single-threaded,
-// what type of sandbox we want to use, if we want to setup net devices or not, etc
-// - we use actual executor sources as the base
-// - gen.go takes all executor/common*.h headers and bundles them into generated.go
-// - during generation we tear executor headers apart and take only the bits
-// we need for the current program/options, this is done by running C preprocessor
-// with particular set of defines so that the preprocessor removes unneeded
-// #ifdef SYZ_FOO sections
-// - then we generate actual syscall calls with the given arguments
-// based on the binary "encodingexec" representation of the program
-// (the same representation executor uses for interpretation)
-// - then we glue it all together
-// - as the last step we run some text post-processing on the resulting source code:
-// remove debug calls, replace exitf/fail with exit, hoist/sort/dedup includes,
-// remove duplicate empty lines, etc
+// - inputs to the generation are the program and options
+// - options control multiple aspects of the resulting C program,
+// like if we want a multi-threaded program or a single-threaded,
+// what type of sandbox we want to use, if we want to setup net devices or not, etc
+// - we use actual executor sources as the base
+// - gen.go takes all executor/common*.h headers and bundles them into generated.go
+// - during generation we tear executor headers apart and take only the bits
+// we need for the current program/options, this is done by running C preprocessor
+// with particular set of defines so that the preprocessor removes unneeded
+// #ifdef SYZ_FOO sections
+// - then we generate actual syscall calls with the given arguments
+// based on the binary "encodingexec" representation of the program
+// (the same representation executor uses for interpretation)
+// - then we glue it all together
+// - as the last step we run some text post-processing on the resulting source code:
+// remove debug calls, replace exitf/fail with exit, hoist/sort/dedup includes,
+// remove duplicate empty lines, etc
package csource
import (