aboutsummaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* pkg/aflow: make LLM model per-agent rather than per-flowDmitry Vyukov2026-01-201-4/+1
| | | | | | Having LLM model per-agent is even more flexible than per-flow. We can have some more complex tasks during patch generation with the most elaborate model, but also some simpler ones with less elaborate models.
* tools/clang/codesearch: fix a typoFlorent Revest2026-01-201-1/+1
|
* tools/clang/codesearch: support building with makeFlorent Revest2026-01-201-1/+2
| | | | | | | | | | | | | Currently, clang tools are built by copying their code into a llvm-project repository and adding build rule to LLVM's CMake. This allows pinning a specific LLVM hash which is convenient but it's also a bit painful to copy code across repositories. This adds a rule to make that can build syz-codesearch with a simple g++ invocation that uses llvm-config to get the LLVM compiler and linker flags and hardcodes some clang libraries to link against since I could not find a better way. (llvm-config does not have "components" for clang)
* tools/clang/codesearch: support building with -Wchanges-meaningFlorent Revest2026-01-201-11/+11
| | | | | | | | | | | | | | | | When compiling with the changes-meaning flag, syz-codesearch gets a bunch of errors such as this one: codesearch.cpp:30:15: error: declaration of ‘clang::SourceRange MacroDef::SourceRange’ changes meaning of ‘SourceRange’ [-Wchanges-meaning] 30 | SourceRange SourceRange; // soruce range of the value | ^~~~~~~~~~~ codesearch.cpp:30:3: note: used here to mean ‘class clang::SourceRange’ 30 | SourceRange SourceRange; // soruce range of the value | ^~~~~~~~~~~ Let's iron them out early before the code base grows too reliant on this pattern.
* tools/docker/syzbot: set llvm-link as an alias for llvm-link-21Pimyn Girgis2026-01-201-0/+1
| | | | Fixes a build error for android-6.12 where llvm-link is not found.
* pkg/subsystem: export debug infoAleksandr Nogikh2026-01-202-8/+42
| | | | | | | | Make it possible to print more debugging information when (re)generating a subsystem list. Include parent inference details to the source code itself and add a -debug flag to list the source files assigned to each subsystem.
* all: reformat C/C++ filesDmitry Vyukov2026-01-1935-442/+549
|
* pkg/aflow: allow to specify model per-flowDmitry Vyukov2026-01-141-23/+26
| | | | | We may want to use a weaker model for some workflows. Allow to use different models for different workflows.
* tools/docker: install binutils-goldAndrei Vagin2026-01-131-1/+1
| | | | | | It is required to build gvsior. Signed-off-by: Andrei Vagin <avagin@google.com>
* tools/syz-aflow: support downloading bugs behind an AppEngine loginFlorent Revest2026-01-131-8/+45
| | | | | | | | | | | | Some syzbot dashboard pages are guarded by an AppEngine login page. The -download flag helps generate an input.json out of a bug report but it currently uses simple HTTP GET commands without any authentication. When called on a bug behind a login page, it received a login page HTML instead of a json payload and fails in confusing ways. The authentication page can be skipped using an authentication token. It's easy to retrieve a token from the gcloud auth print-access-token command.
* tools/syz-aflow: support setting a custom cache sizeFlorent Revest2026-01-121-3/+30
| | | | | | This is useful to save time when iterating on syz-aflow changes. Note that this also sets a cache size of 10GB by default
* tools/syz-aflow: add command line tool for agentic workflowsDmitry Vyukov2026-01-091-0/+132
| | | | | | | syz-aflow tool can be used to invoke any agentic workflow registered with pkg/aflow. For example, to run the patching workflow use: go run ./tools/syz-aflow -input=input.json -download-bug=d8fd35fa6177afa8c92b go run ./tools/syz-aflow -input=input.json -workflow=patching-baseline -workdir=workdir
* tools/clang/codesearch: add README.mdDmitry Vyukov2026-01-091-0/+8
|
* all: remove unused nolint directivesDmitry Vyukov2026-01-021-2/+2
|
* syz-cluster: refactor DockerfilesAleksandr Nogikh2025-12-311-1/+2
| | | | | | | Copy everything into the build context. Add a .dockerignore file to avoid copying the definitely unnecessary files and folders. Check copyrights presence in Dockerfiles.
* tools/syz-linter: suggest any instead of interface{}Dmitry Vyukov2025-12-222-0/+16
| | | | Any is the preferred over interface{} now in Go.
* all: use any instead of interface{}Dmitry Vyukov2025-12-2210-13/+13
| | | | Any is the preferred over interface{} now in Go.
* tools/create-image.sh: add option to specify output prefixAndrew Donnellan2025-12-181-6/+18
| | | | | | | | | | | | Add an option, -o / --output, to specify a prefix used for the name of the directory where debootstrap generates the system, and the final disk image and SSH key filenames. The default remains using the distro release codename. For now, ban the use of slashes, spaces, . and .. as output names. Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
* tools/create-image.sh: improve help messageAndrew Donnellan2025-12-181-16/+16
| | | | | | | | | | | | | Improve the help message: - sort options alphabetically - print default values - print first line to stdout like the rest of the message - fix typos, improve style Also sort the options parsing to be alphabetical (except --help), and use spaces consistently for indentation in this section. Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
* tools/create-image.sh: update default Debian release to trixieAndrew Donnellan2025-12-112-2/+2
| | | | | | | | | | Debian bullseye is now oldoldstable, so update the default release to trixie. While we're at it, update documentation references to old Debian releases to match. Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
* tools/check-commits.sh: allow AUTHORS as a prefix in commit message summariesAndrew Donnellan2025-12-101-1/+1
| | | | | | | Currently, the commit message summary line regex in check-commits.sh allows CONTRIBUTORS but not AUTHORS. Add AUTHORS. Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
* all: replace egrep with grep -EAndrew Donnellan2025-12-104-7/+7
| | | | | | | | | | The egrep command has been deprecated in GNU Grep since 2007, and nowadays using egrep rather than grep -E will print a warning to the user, which is very annoying. Replace all usages of egrep with grep -E. Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
* tools/docker: update to debian trixiePimyn Girgis2025-12-032-50/+45
| | | | | Update our docker containers to Debian Trixie. Fixes #6432
* pkg/codesearch: add skeleton for code searching toolDmitry Vyukov2025-11-203-0/+283
| | | | | | | | | | | | | | Add a clang tool that is used for code indexing (tools/clang/codesearch/). It follows conventions and build procedure of the declextract tool. Add pkg/codesearch package that aggregates the info exposed by the clang tools, and allows doing simple queries: - show source code of an entity (function, struct, etc) - show entity comment - show all entities defined in a source file Add tools/syz-codesearch wrapper tool that allows to create index for a kernel build, and then run code queries on it.
* tools/syz-env: support GOPROXY environment variableBjoern Doebel2025-11-191-0/+1
| | | | | | | | | | Working in a firewalled environment where Go proxy services are blocked. To work around this, we need to set GORPOXY=direct in order to make go builds download packages directly from source rather than using a proxy. Support such setups by passing the user's GOPROXY setting into the syz-env Docker container. Signed-off-by: Bjoern Doebel <doebel@amazon.de>
* tools/clang/declextract: move from tools/syz-declextract/clangtoolDmitry Vyukov2025-11-175-1/+1
| | | | | Some of the common helpers may be reused across different Clang tools (currently json.h and .clang-format). Move the files to allow such reuse.
* pkg/clangtool/tooltest: add packageDmitry Vyukov2025-11-171-89/+6
| | | | Factor out common clang tool testing helpers from the declextract tool test.
* pkg/clangtool: make more genericDmitry Vyukov2025-11-172-2/+3
| | | | Make it possible to use pkg/clangtool with other types than declextract.Output.
* tools/syz-declextract: update clangtool to the latest clangDmitry Vyukov2025-11-172-7/+6
| | | | Fix some minor API changes.
* tools/syz-execprog: redirect syz-executor output to Os.StderrPimyn Girgis2025-11-031-0/+1
| | | | | | This change is necessary as it allows us to access the reports printed by syz-executor, such as KMEMLEAK reports. Fixes google#4728.
* pkg/email/lore: wrap the Email objectAleksandr Nogikh2025-10-211-2/+1
| | | | | Wrapping the email.Email object will let us add lore-specific fields to it at a later point.
* tools/check-syzos.sh: allow RIP-relative references to .guestAlexander Potapenko2025-10-171-3/+47
| | | | | | When loading guest code at another address, RIP-relative references to the same section should not be a problem. Modify check-syzos.sh to allow that.
* syz-cluster: rewrite fuzz config generationAleksandr Nogikh2025-10-071-21/+6
| | | | | | | | Instead of a predefined set of manually written syz-manager configs, construct it dynamically from different bits. During triage, select not just one, but all matching fuzzer configurations and then merge them together.
* tools/syz-kcidb: add -input and -output flags for testingDenys Fedoryshchenko2025-10-061-9/+36
| | | | | | | | | | | | Add -input and -output flags to syz-kcidb to allow for faster and easier testing of KCIDB submissions. With these flags, it's possible to use a local JSON file as input for a bug report and to save the resulting KCIDB submission locally. This removes the need for communication with the dashboard and KCIDB, which simplifies testing and development. Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
* kcidb: convert from Google PubSub to plain REST interfaceDenys Fedoryshchenko2025-10-061-7/+3
| | | | | | | | KCIDB removing Google PubSub and start to accept REST submissions. This will require new configuration options, such as REST URL and token. Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
* pkg/kcidb: upgrade submission schema to v5.3Denys Fedoryshchenko2025-10-061-1/+1
| | | | | | | Upgrading KCIDB schema, as old versions going to be deprecated soon. Ref: https://github.com/kernelci/kcidb-io/tree/main/kcidb_io/schema Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
* pkg/osutil: make VerboseError nest other errorsAleksandr Nogikh2025-10-011-1/+1
| | | | | After this change it fits more naturally into the Go's error functionality.
* tools/syz-prog2c: add vmlinux parsing stage for KFuzzTestEthan Graham2025-09-221-0/+9
| | | | | | | If vmlinux is specified as a flag, we perform a setup stage where we parse vmlinux for KFuzzTest targets. Signed-off-by: Ethan Graham <ethangraham@google.com>
* tools/kfuzztest-gen: add kfuzztest-gen toolEthan Graham2025-09-221-0/+47
| | | | | | | Add a tool for generating a syscaller description for every KFuzzTest target discovered in a vmlinux binary and outputting it to stdout. Signed-off-by: Ethan Graham <ethangraham@google.com>
* tools: add check-syzos.shAlexander Potapenko2025-09-111-0/+122
| | | | | | | | | | | | As shown in https://github.com/google/syzkaller/issues/5565, SYZOS code in the `guest` section cannot reference global data, because it is relocated into the guest memory. While arm64 executor has a dynamic check for data accesses, it is virtually impossible to do the same on x86 without implementing an x86 disassembler. Instead of doing so, introduce a build-time script that will detect instructions referencing global data on a best-effort basis.
* tools/syz-imagegen: rework ext4 flagsAleksandr Nogikh2025-08-291-23/+31
| | | | | Transform the hard-coded list of feature combinations in to individual groups of features.
* tools/syz-imagegen: rewrite combination generationAleksandr Nogikh2025-08-293-19/+252
| | | | | | | | | Introduce a new Filesystem parameter - the maximum number of resulting seeds. If the total number of flag combinations exceeds this number, switch to generating a covering array (that is, make sure that all flag value pairs are covered, or at least as many of them as possible).
* tools/syz-imagegen: accept filesystem descriptions as inputAleksandr Nogikh2025-08-291-10/+44
| | | | | | | | | Don't generate just the hard-coded list of filesystems, but also generate seeds for the externally supplied json description of a filesystem. Add a special syscall attribute to help syz-imagegen guess the actual filesystem name from the syz_mount_image variant name.
* tools/docker: install bazelisk instead of bazelKonstantin Bogomolov2025-08-281-3/+6
| | | | | | | The needed Bazel version to build gVisor got bumped. However, instead of doing the same bump in two places whenever this happens, we can simply use bazelisk in syzkaller to determine which bazel version to use automatically.
* tools/usbgen: extract driver namesAndrey Konovalov2025-08-212-39/+74
| | | | | | | | | | Change the kernel patch and the syz-usbgen tool to split the extracted USB IDs by the driver they belong to. This will allow for a more precise patching of class/driver-specific USB descriptors. Also update USB IDs with Linux kernel 6.16.
* tools/syz-lore: support bash wildcard resultsAleksandr Nogikh2025-08-121-15/+5
| | | | | | | | Instead of accepting a folder name and traversing all nested folders in it, accept the directories to process as separate arguments. This allows for more flexibility - one can either specify just one archive to process or one can use bash wildcards to achieve the previously default functionality.
* tools/syz-covermerger: document high-level descriptionTaras Madan2025-08-081-0/+50
|
* tools: openbsd workarounds to use clang-19Greg Steuck2025-08-071-3/+3
| | | | That's the current version in the tree.
* tools: put clang-format into PATH on openbsd GCE imageGreg Steuck2025-08-071-0/+1
|
* tools: fix llvm version used in the openbsd imageAleksandr Nogikh2025-08-051-1/+1
| | | | The old version prevents us from rebuiling ci-openbsd.