linux-config-update
Update Linux kernel configurations in dashboard/config/linux (bits/*.yml, main.yml, and generated *.config files) using syz-kconf (`./tools/syz-env make configs`). Use when enabling or disabling kernel config options, bumping kernel tags (`bits/linux-upstream.yml`, `bits/linux-next.yml`), adding new config fragments or instances, or regenerating syzbot Linux kernel configs.
- License 许可
- Apache-2.0
- 所属仓库
- google/syzkaller
- 最近更新
- 2026-11-14
- Stars
- ★ 6.4k
- Forks
- 1.5k
01 前言 Front Matter
- name
- linux-config-update
- description
- Update Linux kernel configurations in dashboard/config/linux (bits/*.yml, main.yml, and generated *.config files) using syz-kconf (`./tools/syz-env make configs`). Use when enabling or disabling kernel config options, bumping kernel tags (`bits/linux-upstream.yml`, `bits/linux-next.yml`), adding new config fragments or instances, or regenerating syzbot Linux kernel configs.
02 资源文件 1
- 参考文档references/liquid-glass.md8.0 KB
03 SKILL.md 正文
Updating Linux Kernel Configs (dashboard/config/linux)
Use this skill when modifying dashboard/config/linux/ — whether enabling new CONFIG_* options,
updating kernel tags for a new Linux release, adding new instances/fragments, or regenerating
.config files.
First, read dashboard/config/linux/README.md for the
main.yml and bits/*.yml declarative syntax, instance features (baseline, base-config,
nonoise, reduced, vX.Y version tags), and how tools/syz-kconf
generates <name>.config and <name>-base.config.
1. Running make configs (Always Use syz-env!)
[!IMPORTANT] Always run config generation inside
./tools/syz-env. Kernel Kconfig evaluates compiler capabilities (cc-option,CC_VERSION_TEXT,CLANG_VERSION,GCC_VERSION, rustc/bindgen availability, etc.). Running outsidesyz-envuses host compilers and produces massive, unintended diffs across all.configfiles. Never manually edit generated*.configfiles.
Fast Iteration with INSTANCE=
A full make configs run checks out multiple kernel trees (upstream, linux-next, stable, Android,
ChromeOS) and generates ~80 configs, which is very slow.
When testing new options or debugging a failure, iterate on individual instances first using
INSTANCE=<name> (or INSTANCE=<name>-base for the baseline config):
# Quick check on a single upstream x86_64 instance:
CI=true ./tools/syz-env make configs SOURCEDIR=$KERNEL_PATH INSTANCE=upstream-apparmor-kasan
# Check older stable/android/arch/sanitizer instances to verify version and arch constraints:
CI=true ./tools/syz-env make configs SOURCEDIR=$KERNEL_PATH INSTANCE=stable-5.15-kasan
CI=true ./tools/syz-env make configs SOURCEDIR=$KERNEL_PATH INSTANCE=upstream-s390-kasan
CI=true ./tools/syz-env make configs SOURCEDIR=$KERNEL_PATH INSTANCE=upstream-kmsan
Once single-instance checks pass, run the full command without INSTANCE= to update all
affected .config files before committing:
CI=true ./tools/syz-env make configs SOURCEDIR=$KERNEL_PATH
Remove any untracked dashboard/config/linux/*.config.tmp files if left behind.
2. Determining Kernel Versions for New or Removed Options
Never guess version constraints or slap weak / optional on a config to silence errors on older
kernels. Always find the exact kernel release in $KERNEL_PATH:
-
Find When a New Option Appeared:
# Find the commit that introduced `config FOO` in Kconfig: git -C "$KERNEL_PATH" log -S "config FOO" --oneline -- "**/Kconfig*" "Kconfig*" # Instant check of the base kernel version at that commit: git -C "$KERNEL_PATH" show <commit_hash>:Makefile | head -n 5 # Verify the exact release tag containing that commit (note: a commit authored on v6.13-rcX # typically merges in v6.14-rc1): git -C "$KERNEL_PATH" merge-base --is-ancestor <commit_hash> v6.14 # Or: git -C "$KERNEL_PATH" describe --contains --match "v[0-9]*.[0-9]*-rc1" <commit_hash> # e.g., "v6.14-rc1~42^2~5" -> appeared in v6.14 -> use [v6.14]- If the oldest kernel instance that includes the fragment already has the option (note:
android-5.4isv5.4,android-5.10/chromeos-5.10arev5.10,stable-5.15isv5.15), no version tag is needed. - If the commit is only in
linux-nextand not yet inbits/linux-upstream.yml, use[linux-next]. When bumpingbits/linux-upstream.ymlto a new release, replace[linux-next]on options that graduated into mainline with their[vX.Y]tag. - Inspect
depends onin the Kconfig definition: ifFOOdepends on an architecture (e.g.,X86_64) or conflicts with a feature (e.g.,!PREEMPT_RT,!KMSAN), add the corresponding constraints (e.g.,[x86_64, v6.14],[-s390],[-preempt_rt]).
- If the oldest kernel instance that includes the fragment already has the option (note:
-
Find When an Option Was Removed, Renamed, or Migrated:
git -C "$KERNEL_PATH" log -n 5 -S "config OLD_FOO" --oneline -- "**/Kconfig*" "Kconfig*" git -C "$KERNEL_PATH" describe --contains --match "v[0-9]*.[0-9]*-rc1" <commit_hash>- Add an upper-bound version constraint (e.g.,
[-v7.1]) and document the kernel commit above it:# Removed in <12-char-hash> "<commit_title>".# Renamed to <NEW_CONFIG> in <12-char-hash> "<commit_title>".(and add- NEW_CONFIG: [vX.Y])# Migrated to library in <12-char-hash> "<commit_title>".
- If the option was only tagged
[linux-next](never enabled in any released kernel config), remove the line directly and explain it in the commit message.
- Add an upper-bound version constraint (e.g.,
3. Avoid override, weak, and optional at All Costs
[!WARNING] Avoid
override,weak, andoptionalat all costs! They hide broken dependencies, silently drop coverage when Kconfig dependencies change in future kernel releases, and make fragment inclusion order fragile.
Use these patterns instead:
-
Instead of
weak/optionalwhen an option fails verification on some instances:- Inspect why
olddefconfigdropped or altered the option (check Kconfigdepends onandselectin$KERNEL_PATH, and compare<instance>.config.tmpwith<instance>.config). - Enable missing prerequisite Kconfig options if appropriate.
- Otherwise, add explicit constraints for the kernel version, architecture, or instance
features where the option is unsupported (e.g.,
[v6.17, x86_64, -kmsan, -preempt_rt],[-arm, -riscv, -s390]), with a brief comment explaining non-obvious exclusions.
- Inspect why
-
Instead of
overridewhen two fragments or features want different values:- Use mutual exclusion tags on the original definition: For example, when enabling
ANDROID_BINDER_IPC_RUST: [v6.18, rust], do NOT overrideANDROID_BINDER_IPC: ninrust.yml. Instead, restrict the original entry insubsystems.ymltoANDROID_BINDER_IPC: [-rust]. - Move the option to a more specific existing bit or extract a new
bits/<topic>.ymlbit:- Example:
DEBUG_INFO_BTFwas moved frombase.ymltobpf.yml(which is excluded on-baseline,-onlynet,-onlyusb) instead of overriding it in baseline/minimal configs. - Example: Sound options were extracted from
subsystems.ymlintobits/sound.ymlincluded inmain.ymlwith[-baseline, -onlynet, -onlyusb, -arm64_gce]. - Every new file created in
dashboard/config/linux/bits/must have a copyright header and a top-level comment explaining the purpose of the fragment and where it is used.
- Example:
- Use mutual exclusion tags on the original definition: For example, when enabling
-
When all options in a fragment are removed in a new kernel:
- Exclude the entire fragment in
main.ymlusing instance tags (e.g.,-upstream, -linux-nextwith a comment citing the removal commit, as done forhamradio.yml; remember[-vX.Y]does not work onincludes:inmain.yml).
- Exclude the entire fragment in
4. Troubleshooting Common Issues
pkg/kconfigParser Limitations: If a new kernel introduces Kconfig syntax thatsyz-kconffails to parse, never modify Kconfig files in$KERNEL_PATH. Implement support for the syntax inpkg/kconfig/kconfig.goand add a test inpkg/kconfig/kconfig_test.go.- Git Fetch / Checkout Failures:
syz-kconfadds hashed remotes to$KERNEL_PATH. If a checkout fails (e.g., on Android/ChromeOS trees), find the remote hash in the error output, rungit -C "$KERNEL_PATH" fetch <remote> <tag>manually, and retrymake configs.
5. Commit Structure & Conventions
- When updating
bits/linux-upstream.ymlandbits/linux-next.ymlto new tags (use release tags likev7.2ornext-YYYYMMDD, not raw commit hashes), split changes into logical commits:dashboard/config/linux: update config fragments for vX.Y(tag updates + disabling removed options with commit references).dashboard/config/linux: enable more configs(enabling newly introduced bug-finding or subsystem options; if notable new options were skipped, explain why in the commit message).dashboard/config/linux: update generated configs(the generated*.configfiles as the very last commit).
- For targeted single-feature changes (e.g.,
dashboard/config/linux: enable CONFIG_FOO), check whether the user wants a single commit or separate commits forbits/and*.config.
04 同仓库更多 Skills
syzlang-vm-testing
Verify syzkaller syscall descriptions (sys/linux/*.txt) and seed programs (sys/linux/test/*) inside a QEMU VM using syz-manager -mode run-tests, syzbot buildroot images, and kernel dynamic_debug/tracing.
linux-subsystems-update
Update and regenerate the Linux kernel subsystem list in pkg/subsystem/lists/linux.go (and custom rules in pkg/subsystem/linux/) using tools/syz-query-subsystems against a mainline (torvalds) Linux kernel checkout. Use when regenerating Linux subsystems for a new kernel release, adding custom subsystem rules, fixing MAINTAINERS parsing/naming errors, or associating syzkaller pseudo-syscalls with subsystems.