aboutsummaryrefslogtreecommitdiffstats
path: root/sys/syz-extract
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2024-11-26 11:07:25 +0100
committerDmitry Vyukov <dvyukov@google.com>2024-11-26 11:32:06 +0000
commit6cf3ac235c99d92976346acbdc153d68fbb2c841 (patch)
tree6552dbc6ae317ed49a46d1bb0e139d5d62658937 /sys/syz-extract
parenta1990d2bd9d1f54baf83802e2874069ee73b4fa4 (diff)
sys/syz-extract: support kvm on arm
Add few more hacks to support few more cases. In particular including kvm headers for arm. It will be harder to avoid all these with auto-generated descriptions that pull in lots of random headers.
Diffstat (limited to 'sys/syz-extract')
-rw-r--r--sys/syz-extract/linux.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/syz-extract/linux.go b/sys/syz-extract/linux.go
index 8b365a206..ae3892efe 100644
--- a/sys/syz-extract/linux.go
+++ b/sys/syz-extract/linux.go
@@ -61,6 +61,11 @@ func (*linux) prepareArch(arch *Arch) error {
#define va_copy __builtin_va_copy
#define __va_copy __builtin_va_copy
`,
+ "asm/kvm.h": `
+struct kvm_debug_exit_arch {};
+struct kvm_guest_debug_arch {};
+struct kvm_sync_regs {};
+`,
"asm/a.out.h": "",
"asm/prctl.h": "",
"asm/mce.h": "",
@@ -134,6 +139,7 @@ func (*linux) processFile(arch *Arch, info *compiler.ConstInfo) (map[string]uint
"-I.",
"-D__KERNEL__",
"-DKBUILD_MODNAME=\"-\"",
+ "-DKBUILD_MODFILE=\"-\"",
"-I" + sourceDir + "/arch/" + headerArch + "/include",
"-I" + buildDir + "/arch/" + headerArch + "/include/generated/uapi",
"-I" + buildDir + "/arch/" + headerArch + "/include/generated",