aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/vcs/linux.go
Commit message (Collapse)AuthorAgeFilesLines
* pkg/vcs: use gcc 10 for linux v5.9+Dmitry Vyukov2021-02-171-0/+2
| | | | | | All bisections started failing with: Compiler lacks asm-goto support. Use gcc 10 for v5.9+.
* pkg/kconfig: store minimization resultsJouni Hogander2020-12-101-7/+8
| | | | | Store config options identified using DebugTracer. Also change bisection and configuration minimization code to use new DebugTracer.
* pkg/kconfig: accept target when parsing KconfigDmitry Vyukov2020-10-291-2/+3
| | | | | | Kconfig depends on the target arch. Add target argument for Kconfig parsing. Resolve $(SRCARCH) properly (previously we always assumed x86_64).
* tools/syz-kconf: detect -rcN tagsDmitry Vyukov2020-10-291-9/+22
| | | | | | We currently detect v5.10-rc1 as v5.9 because we ignore -rc tags. This makes it impossible to enable configs that were already added for v5.10. Treat v5.10-rc1 as v5.10 already.
* pkg/bisect: switch to kconfig.MinimizeDmitry Vyukov2020-10-211-154/+16
| | | | | | | | | | | | | | | Use the new kconfig.Minimize for config minization instead of the config-bisect.pl script. This is mostly just deleting code. Also update tests: - minimization is now supposed to test the baseline config (update "testos" stub accordingly) - minimization is not supposed to return a config that does not build (a reasonable config minimization procedure can't arrive to such config), remove test that tests this Update #2171
* pkg/vcs: refactor linuxAlterConfigsDmitry Vyukov2020-10-211-24/+35
| | | | | | | Use pkg/kconfig to make changes to .config. We now have slightly more civilized way of messing with configs. Update #2171
* pkg/vcs: add repo OptPrecious and OptDontSandbox optionsDmitry Vyukov2020-10-211-4/+6
| | | | | | | | | | The pkg/vcs code assumed that we fully manage the repo within an autonomous program. In particular it tried to repair any errors by dropping and re-creating the repo. This does not work well for command-line tools that work with a user-provided repo. Add OptPrecious for such uses. Update #2171
* pkg/vcs: add ReleaseTagDmitry Vyukov2020-10-211-4/+4
| | | | | | | Add ReleaseTag method that returns last release tag for the given commit. Update #2171
* pkg/vcs: disable BLK_DEV_INITRD configJouni Hogander2020-10-091-0/+4
| | | | | | | | | This config is causing problems to kernel signature calculation. New initramfs is generated as a part of every build. Due to this init.data section containing this generated initramfs is differing between builds causing signture being random number. Signed-off-by: Jouni Hogander <jouni.hoegander@partner.bmw.de>
* pkg/vcs: disable UBSAN before v5.3Dmitry Vyukov2020-09-281-0/+3
| | | | | | | UBSAN is broken in multiple ways before v5.3, see: https://github.com/google/syzkaller/issues/1523#issuecomment-696514105 Update #1523
* pkg/bisect: add ccache optionJouni Hogander2020-09-211-0/+1
| | | | | | Add option to use ccache in kernel builds. Signed-off-by: Jouni Hogander <jouni.hoegander@partner.bmw.de>
* pkg: get and store Maintainers dataPedro Lopes2020-07-311-13/+41
| | | | | | Create a struct on pkg/vcs to store data of syzkaller email recipients and update its users. The struct contains default name, email, and a label to divide user into To and Cc when sending the emails.
* pkg/vcs: fix config bisection tests moreDmitry Vyukov2020-07-071-0/+2
| | | | | | | | | | | config-bisect.pl uses bash-isms and can't run on non-linux. It also silently ignores all errors which made failures very obscure -- the script happily succeeds in presence of any errors. So the test failed later reading .config. Use "set -eu" to not fail silently. Also trace all config-bisect.pl invocations and output. good/bad decisions are important and we always log them in the normal bisection.
* pkg/bisect: move checking of minimized config into common codeDmitry Vyukov2020-07-021-10/+0
| | | | | That part is not linux-specific, move it to the common code. The more code we have in the common code, the more code we can test.
* pkg/bisect: minor style fix upsDmitry Vyukov2020-07-021-145/+75
|
* pkg/bisect: Implement config bisectionJouni Hogander2020-07-021-0/+256
| | | | | | | | | Implement Linux kernel configuration bisection. Use bisected minimalistic configuration in commit bisection. Utilizes config_bisect.pl script from Linux kernel tree in bisection. Modify syz-bisect to read in kernel.baseline_config. This is used as a "good" configuration when bisection is run.
* dashboard/config: switch to ORC unwinderAndrey Konovalov2020-02-261-4/+19
| | | | | | | | | Jann pointed out that the frame pointer unwinder fails to unwind double fault stacks. Switch to using the ORC unwinder instead. https://www.kernel.org/doc/html/latest/x86/orc-unwinder.html Suggested-by: Jann Horn <jannh@google.com>
* pkg/vcs: disable CONFIG_DEBUG_KOBJECT during bisectionDmitry Vyukov2020-01-161-0/+5
| | | | | | | | We disabled it in configs, now also disable during bisection. This config only adds debug output. It should not be enabled at all, but it was accidentially enabled on some instances for some periods of time, and kernel is boot-broken for prolonged ranges of commits with deadlock which makes bisections take weeks.
* pkg/vcs: disable CONFIG_DEBUG_INFO_BTF during bisectionDmitry Vyukov2020-01-071-0/+4
| | | | | | BTF fails lots of builds with: pahole version v1.9 is too old, need at least v1.13 Failed to generate BTF for vmlinux. Try to disable CONFIG_DEBUG_INFO_BTF.
* pkg/report: use --git-min-percent=15 for get_maintainer.plDmitry Vyukov2019-12-101-2/+4
| | | | Update #1441
* pkg/vcs: don't bisect linux past 4.6Dmitry Vyukov2019-12-101-3/+11
| | | | Fixes #1532
* pkg/build: make linux implement binary signerDmitry Vyukov2019-11-251-0/+2
| | | | | | We were almost there... Update #1271
* pkg/build: produce more deterministic linux binariesDmitry Vyukov2019-11-181-0/+2
| | | | | There are few more dynamic variables related to kernel release tagging. Set these to known deterministic values.
* pkg/vcs: make EnvForCommit return full compiler pathDmitry Vyukov2019-10-221-2/+2
| | | | | | | All callers of EnvForCommit need the compiler path, so move this logic into EnvForCommit to avoid duplication. Also simplifies tests because test impl can now return an empty compiler (which should be unused).
* pkg/bisect: add initial testing support for cause bisectionZubin Mithra2019-10-221-21/+1
| | | | | | | | | | | | | | | | | | | | | | | | (note: incomplete change) Refactor existing code as follows: * Move reusable test utility functions from git_repo_test.go to pkg/vcs/test_util.go and make them exported. * Split Run() into Run()+runImpl(). * Change type of bisect.go:env.inst to `instance.BuilderTester`. Change usage inside syz-testbuild/testbuild.go accordingly. * Move most of linux.PreviousReleaseTags() into vcs/git.go as git.previousReleaseTags(). * Allow build.CompilerIdentity to be mocked. Introduce the following changes: * instance.BuilderTester is an interface with methods BuildSyzkaller() BuildKernel() Test() NewEnv() now returns this interface. * type testEnv implements instance.BuilderTester. * type testBuilder implements builder interface. Add a entry into table inside pkg/build/build.go:getBuilder() to return testBuilder object.
* pkg/vcs: disable CONFIG_SECURITY_TOMOYO_OMIT_USERSPACE_LOADER before v5.2Dmitry Vyukov2019-05-211-0/+4
| | | | See https://groups.google.com/d/msg/syzkaller/mODXmnauUZM/HLZiO2UDBAAJ for context.
* pkg/vcs: disable CONFIG_CAN for bisection before v4.13Dmitry Vyukov2019-03-221-0/+5
| | | | Update #501
* pkg/vcs: fix git tag --points-at invocationDmitry Vyukov2019-03-201-4/+3
| | | | | | | Turns out older versions of git don't imply --list for --points-at and fail. So add --list explicitly. Update #501
* pkg/vcs: fix too long lineDmitry Vyukov2019-03-171-41/+43
| | | | Also restructure because we point to this file from syzbot docs.
* pkg/vcs: try to work around massive linux kernel build/boot breakagesDmitry Vyukov2019-03-171-7/+67
| | | | | | | | | Linux kernel is frequently build/boot broken. Even on release tags. Everything past 4.15 is broken with our config for multiple reasons. This makes bisection process almost infeasible. Try to work around some breakages by disabling configs are we go back in time. Update #501
* pkg/vcs: refactor bisection supportDmitry Vyukov2019-03-171-0/+154
In preparation for syz-ci bisection: - move bisection function into a separate interface they look out of place in vcs.Repo because most OSes don't implement it and most users don't case - extract author name and more CC emails for commits - move linux-specific PreviousReleaseTags into linux.go - fix inconclusive bisection (more than 1 potential commits) - add tests fr bisection - add maintainers returned from get_maintainers.pl for commits that don't have enough emails (e.g. only author email) Update #501