aboutsummaryrefslogtreecommitdiffstats
path: root/sys/syz-extract/linux.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2021-09-14 19:28:39 +0200
committerDmitry Vyukov <dvyukov@google.com>2021-09-16 14:48:44 +0200
commite3cdbf8656cad84675862071c60bc9442930fbb1 (patch)
treef47044f730af99476bb21c61e66b8970f98b5a56 /sys/syz-extract/linux.go
parent07e953c105af057cb474bc086f68fb7ec5b241ec (diff)
sys/syz-extract: restore kvm const extraction for arm64/ppc64
Change #2755 disabled KVM for arm64/ppc64, but KVM is supported on these arches and has extensive support. It's pity to lose that support. The real root cause of the problem with arm64/ppc64 is that some severe compilation errors terminated compilation and did not let compiler spew all error messages. As the result we did not parse all of them and did not disable all of them. Re-try compilation multiple times instead of just 2 to fix this. Update #2754
Diffstat (limited to 'sys/syz-extract/linux.go')
-rw-r--r--sys/syz-extract/linux.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/syz-extract/linux.go b/sys/syz-extract/linux.go
index c72e4b559..e4f8d1bfe 100644
--- a/sys/syz-extract/linux.go
+++ b/sys/syz-extract/linux.go
@@ -114,13 +114,11 @@ func (*linux) prepareArch(arch *Arch) error {
func (*linux) processFile(arch *Arch, info *compiler.ConstInfo) (map[string]uint64, map[string]bool, error) {
if strings.HasSuffix(info.File, "_kvm.txt") &&
- arch.target.Arch != targets.I386 && arch.target.Arch != targets.AMD64 {
- // Hack:
- // include/uapi/linux/kvm.h has definitions that can only be compiled under i386
- // and amd64 (e.g. KVM_SET_CPUID). On all other arches they generate build errors
- // and therefore this tool is not able to proceed.
- // TODO: remove this once #2754 is resolved.
- // Note: syz-sysgen also ignores this file.
+ (arch.target.Arch == targets.ARM || arch.target.Arch == targets.RiscV64) {
+ // Hack: KVM is not supported on ARM anymore. We may want some more official support
+ // for marking descriptions arch-specific, but so far this combination is the only
+ // one. For riscv64, KVM is not supported yet but might be in the future.
+ // Note: syz-sysgen also ignores this file for arm and riscv64.
return nil, nil, nil
}
headerArch := arch.target.KernelHeaderArch