aboutsummaryrefslogtreecommitdiffstats
path: root/sys/syz-sysgen/sysgen.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-05-09 17:36:04 +0200
committerDmitry Vyukov <dvyukov@google.com>2020-05-11 16:54:44 +0200
commitf4bf31dc3ce9d9bd15aa99276c63b2e21e3d9131 (patch)
treecad187daf2ed9fc30c60e7f40ed287d199fa0e08 /sys/syz-sysgen/sysgen.go
parentb17a8c447430fab3a57c27b0314404b28f241a46 (diff)
sys/syz-extract: use -nostdinc on linux
This makes the build completely hermetic.
Diffstat (limited to 'sys/syz-sysgen/sysgen.go')
-rw-r--r--sys/syz-sysgen/sysgen.go13
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/syz-sysgen/sysgen.go b/sys/syz-sysgen/sysgen.go
index 654664af6..9e4f894cd 100644
--- a/sys/syz-sysgen/sysgen.go
+++ b/sys/syz-sysgen/sysgen.go
@@ -69,8 +69,8 @@ func main() {
data := &ExecutorData{}
for _, OS := range OSList {
- top := ast.ParseGlob(filepath.Join("sys", OS, "*.txt"), nil)
- if top == nil {
+ descriptions := ast.ParseGlob(filepath.Join("sys", OS, "*.txt"), nil)
+ if descriptions == nil {
os.Exit(1)
}
osutil.MkdirAll(filepath.Join("sys", OS, "gen"))
@@ -111,6 +111,15 @@ func main() {
if consts == nil {
return
}
+ top := descriptions
+ if OS == "linux" && job.Target.Arch == "arm" {
+ // Hack: KVM is not supported on ARM anymore.
+ // Note: syz-extract also ignores this file for arm.
+ top = descriptions.Filter(func(n ast.Node) bool {
+ pos, _, _ := n.Info()
+ return pos.File != "dev_kvm.txt"
+ })
+ }
if OS == "test" {
constInfo := compiler.ExtractConsts(top, job.Target, eh)
compiler.FabricateSyscallConsts(job.Target, constInfo, consts)