syz-ci: disable CONFIG_DEBUG_INFO_BTF during patch testing

This is a hack as noted in the comment.
A proper support would require touching lots of files,
and we only need this temporary until #2096 is resolved.

One recent example of failed patch testing:
https://groups.google.com/g/syzkaller-bugs/c/O8CkScAt9ck/m/E3CYKSGSAgAJ
This commit is contained in:
Dmitry Vyukov 2020-09-26 12:31:43 +02:00
parent 4a006f636c
commit 2d5ea0cb6e

View File

@ -527,6 +527,17 @@ func (jp *JobProcessor) testPatch(job *Job, mgrcfg *mgrconfig.Config) error {
}
}
// Disable CONFIG_DEBUG_INFO_BTF in the config.
// DEBUG_INFO_BTF requires a very new pahole binary, which we don't have on syzbot instances.
// Currently we don't enable DEBUG_INFO_BTF, but we have some old bugs with DEBUG_INFO_BTF enabled
// (at the time requirements for pahole binary were lower, or maybe the config silently disabled itself).
// Testing of patches for these bugs fail now because of the config, so we disable it as a work-around.
// Ideally we have a new pahole and then we can remove this hack. That's issue #2096.
// pkg/vcs/linux.go also disables it for the bisection process.
req.KernelConfig = bytes.Replace(req.KernelConfig,
[]byte("CONFIG_DEBUG_INFO_BTF=y"),
[]byte("# CONFIG_DEBUG_INFO_BTF is not set"), -1)
log.Logf(0, "job: building kernel...")
kernelConfig, _, err := env.BuildKernel(mgr.mgrcfg.Compiler, mgr.mgrcfg.Ccache, mgr.mgrcfg.Userspace,
mgr.mgrcfg.KernelCmdline, mgr.mgrcfg.KernelSysctl, req.KernelConfig)