aboutsummaryrefslogtreecommitdiffstats
path: root/sys/syz-extract/linux.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2019-01-25 16:10:00 +0100
committerDmitry Vyukov <dvyukov@google.com>2019-01-25 16:10:00 +0100
commita3d9f7e34dbad7e7c6804ee5107c3ddcf0bfef22 (patch)
tree5520a26ab51407bc35d900a8ef77dd61158cfd76 /sys/syz-extract/linux.go
parent6fde58c61bdd29262e5e1af69b65d3d3d4edf644 (diff)
sys/linux: fix up mptcp descriptions
1. Generate .const files for all arches. 2. Don't extract mptcp consts on android. 3. Remove mptcp includes from vnet.txt. 4. Enable CONFIG_MPTCP in syz-extract (mptcp is not like all other kernel headers).
Diffstat (limited to 'sys/syz-extract/linux.go')
-rw-r--r--sys/syz-extract/linux.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/syz-extract/linux.go b/sys/syz-extract/linux.go
index 6cfc18419..45f8144ce 100644
--- a/sys/syz-extract/linux.go
+++ b/sys/syz-extract/linux.go
@@ -83,10 +83,16 @@ func (*linux) prepareArch(arch *Arch) error {
return fmt.Errorf("make defconfig failed: %v\n%s", err, out)
}
// Without CONFIG_NETFILTER kernel does not build.
- out, err = osutil.RunCmd(time.Minute, buildDir, "sed", "-i",
+ _, err = osutil.RunCmd(time.Minute, buildDir, "sed", "-i",
"s@# CONFIG_NETFILTER is not set@CONFIG_NETFILTER=y@g", ".config")
if err != nil {
- return fmt.Errorf("sed .config failed: %v\n%s", err, out)
+ return fmt.Errorf("sed .config failed: %v", err)
+ }
+ // include/net/mptcp.h is the only header in kernel that guards some of the consts with own config
+ _, err = osutil.RunCmd(time.Minute, buildDir, "sed", "-i",
+ "s@# CONFIG_MPTCP is not set@CONFIG_MPTCP=y@g", ".config")
+ if err != nil {
+ return fmt.Errorf("sed .config failed: %v", err)
}
out, err = osutil.RunCmd(time.Hour, kernelDir, "make", append(makeArgs, "olddefconfig")...)
if err != nil {