aboutsummaryrefslogtreecommitdiffstats
path: root/sys/sys_amd64.go
diff options
context:
space:
mode:
authorAndrey Konovalov <andreyknvl@google.com>2017-07-26 19:03:02 +0200
committerAndrey Konovalov <andreyknvl@google.com>2017-08-01 19:19:05 +0200
commit29ceeb1dafec94cb23b14f20f3802ba7cd8be7d2 (patch)
tree233087ca94807155ef13dbf5388b4b13293629d7 /sys/sys_amd64.go
parent1517bd95488be386712ddab269ffd1dc1cf37f86 (diff)
sys: fix KVM_RUN ioctl
KVM_RUN ioctl must have arg set to 0, otherwise it returns EINVAL. This can lead to syzkaller not able to generate a C repro. Since arg value is undefined, it might have different values when executing a program with syz-exeprog vs executing a compiled C repro.
Diffstat (limited to 'sys/sys_amd64.go')
-rw-r--r--sys/sys_amd64.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sys_amd64.go b/sys/sys_amd64.go
index 7c45588f9..3b29e4221 100644
--- a/sys/sys_amd64.go
+++ b/sys/sys_amd64.go
@@ -21995,7 +21995,7 @@ var Calls = []*Call{
&Call{Name: "ioctl$KVM_PPC_GET_SMMU_INFO", CallName: "ioctl", Native: true, Args: []Type{&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_kvmvm", FldName: "fd", ArgDir: DirIn, IsOptional: false}, Desc: resource("fd_kvmvm")}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", ArgDir: DirIn, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}, Val: uintptr(2186325670)}, &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "arg", ArgDir: DirIn, IsOptional: false}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "arg", ArgDir: DirOut, IsOptional: false}, Kind: BufferBlobRand}}}, NR: 16},
&Call{Name: "ioctl$KVM_REGISTER_COALESCED_MMIO", CallName: "ioctl", Native: true, Args: []Type{&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_kvmvm", FldName: "fd", ArgDir: DirIn, IsOptional: false}, Desc: resource("fd_kvmvm")}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", ArgDir: DirIn, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}, Val: uintptr(1074835047)}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", ArgDir: DirIn, IsOptional: false}, Type: getStruct(structKey{"kvm_coalesced_mmio_zone", "", DirIn})}}, NR: 16},
&Call{Name: "ioctl$KVM_REINJECT_CONTROL", CallName: "ioctl", Native: true, Args: []Type{&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_kvmvm", FldName: "fd", ArgDir: DirIn, IsOptional: false}, Desc: resource("fd_kvmvm")}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", ArgDir: DirIn, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}, Val: uintptr(44657)}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", ArgDir: DirIn, IsOptional: false}, Type: getStruct(structKey{"kvm_reinject_control", "", DirIn})}}, NR: 16},
- &Call{Name: "ioctl$KVM_RUN", CallName: "ioctl", Native: true, Args: []Type{&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_kvmcpu", FldName: "fd", ArgDir: DirIn, IsOptional: false}, Desc: resource("fd_kvmcpu")}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", ArgDir: DirIn, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}, Val: uintptr(44672)}}, NR: 16},
+ &Call{Name: "ioctl$KVM_RUN", CallName: "ioctl", Native: true, Args: []Type{&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_kvmcpu", FldName: "fd", ArgDir: DirIn, IsOptional: false}, Desc: resource("fd_kvmcpu")}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", ArgDir: DirIn, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}, Val: uintptr(44672)}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "arg", ArgDir: DirIn, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}, Val: uintptr(0)}}, NR: 16},
&Call{Name: "ioctl$KVM_S390_INTERRUPT", CallName: "ioctl", Native: true, Args: []Type{&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_kvmvm", FldName: "fd", ArgDir: DirIn, IsOptional: false}, Desc: resource("fd_kvmvm")}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", ArgDir: DirIn, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}, Val: uintptr(1074835092)}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", ArgDir: DirIn, IsOptional: false}, Type: getStruct(structKey{"kvm_s390_interrupt", "", DirIn})}}, NR: 16},
&Call{Name: "ioctl$KVM_S390_INTERRUPT_CPU", CallName: "ioctl", Native: true, Args: []Type{&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_kvmcpu", FldName: "fd", ArgDir: DirIn, IsOptional: false}, Desc: resource("fd_kvmcpu")}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", ArgDir: DirIn, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}, Val: uintptr(1074835092)}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", ArgDir: DirIn, IsOptional: false}, Type: getStruct(structKey{"kvm_s390_interrupt", "", DirIn})}}, NR: 16},
&Call{Name: "ioctl$KVM_S390_UCAS_MAP", CallName: "ioctl", Native: true, Args: []Type{&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_kvmcpu", FldName: "fd", ArgDir: DirIn, IsOptional: false}, Desc: resource("fd_kvmcpu")}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", ArgDir: DirIn, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}, Val: uintptr(1075359312)}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", ArgDir: DirIn, IsOptional: false}, Type: getStruct(structKey{"kvm_s390_ucas_mapping", "", DirIn})}}, NR: 16},