aboutsummaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-09-04 19:52:51 +0200
committerDmitry Vyukov <dvyukov@google.com>2017-09-04 20:25:22 +0200
commit8c64b078d1c954972b9f0132a753cdcec1b80d9b (patch)
treef6213a794bf72ccb3e38f6892d7fb229b2b78414 /sys
parentb06c1bd324d3aff0f132381727c85940bcf93b2f (diff)
pkg/compiler: detect resources without ctors
Fixes #217
Diffstat (limited to 'sys')
-rw-r--r--sys/socket_key.txt9
-rw-r--r--sys/sys.txt1
-rw-r--r--sys/sys_386.go3
-rw-r--r--sys/sys_amd64.go3
-rw-r--r--sys/sys_arm.go3
-rw-r--r--sys/sys_arm64.go3
-rw-r--r--sys/sys_ppc64le.go3
-rw-r--r--sys/test.txt2
8 files changed, 11 insertions, 16 deletions
diff --git a/sys/socket_key.txt b/sys/socket_key.txt
index 1d1ab0cb0..52f2401c4 100644
--- a/sys/socket_key.txt
+++ b/sys/socket_key.txt
@@ -3,11 +3,10 @@
# AF_KEY support.
-include <linux/socket.h>
-include <linux/net.h>
-include <uapi/linux/pfkeyv2.h>
-
-resource sock_key[sock]
+# include <linux/socket.h>
+# include <linux/net.h>
+# include <uapi/linux/pfkeyv2.h>
# See net/key/af_key.c, requires root.
+# resource sock_key[sock]
# socket$key(domain const[AF_KEY], type const[SOCK_RAW], proto const[PF_KEY_V2]) sock_key
diff --git a/sys/sys.txt b/sys/sys.txt
index 1b76cf1c0..fed6e6aab 100644
--- a/sys/sys.txt
+++ b/sys/sys.txt
@@ -202,7 +202,6 @@ ptrace$getenv(req const[PTRACE_GETEVENTMSG], pid pid, ignored intptr, data ptr[o
ptrace$cont(req flags[ptrace_req_cont], pid pid, ignored intptr, data intptr)
resource io_ctx[intptr]
-resource iocbptr[intptr]
io_setup(n int32, ctx ptr[out, io_ctx])
io_destroy(ctx io_ctx)
io_getevents(ctx io_ctx, min_nr intptr, nr len[events], events ptr[out, array[io_event]], timeout ptr[in, timespec])
diff --git a/sys/sys_386.go b/sys/sys_386.go
index ed7b93a0b..8164250a7 100644
--- a/sys/sys_386.go
+++ b/sys/sys_386.go
@@ -44,7 +44,6 @@ var resourceArray = []*ResourceDesc{
{Name: "ifindex", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"ifindex"}, Values: []uint64{0}},
{Name: "inotifydesc", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"inotifydesc"}, Values: []uint64{0}},
{Name: "io_ctx", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr"}, TypeSize: 8}}, Kind: []string{"io_ctx"}, Values: []uint64{0}},
- {Name: "iocbptr", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr"}, TypeSize: 8}}, Kind: []string{"iocbptr"}, Values: []uint64{0}},
{Name: "ion_handle", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"ion_handle"}, Values: []uint64{0}},
{Name: "ipc", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"ipc"}, Values: []uint64{0, 18446744073709551615}},
{Name: "ipc_msq", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"ipc", "ipc_msq"}, Values: []uint64{0, 18446744073709551615}},
@@ -74,7 +73,6 @@ var resourceArray = []*ResourceDesc{
{Name: "sock_in6", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_in6"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
{Name: "sock_ipx", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_ipx"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
{Name: "sock_kcm", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_kcm"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
- {Name: "sock_key", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_key"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
{Name: "sock_llc", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_llc"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
{Name: "sock_netlink", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_netlink"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
{Name: "sock_netrom", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_netrom"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
@@ -13780,6 +13778,7 @@ var Calls = []*Call{
{NR: 1000007, Name: "syz_test$length9", CallName: "syz_test", Args: []Type{
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0"}, TypeSize: 8, Type: &StructType{TypeCommon: TypeCommon{TypeName: "syz_length_vma_struct"}}},
}},
+ {NR: 1000007, Name: "syz_test$missing_resource", CallName: "syz_test", Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "syz_missing_const_res", FldName: "ret", ArgDir: 1}}},
{NR: 1000007, Name: "syz_test$opt0", CallName: "syz_test", Args: []Type{
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "a0", IsOptional: true}, TypeSize: 8}},
}},
diff --git a/sys/sys_amd64.go b/sys/sys_amd64.go
index 91e7e4cac..64142213f 100644
--- a/sys/sys_amd64.go
+++ b/sys/sys_amd64.go
@@ -44,7 +44,6 @@ var resourceArray = []*ResourceDesc{
{Name: "ifindex", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"ifindex"}, Values: []uint64{0}},
{Name: "inotifydesc", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"inotifydesc"}, Values: []uint64{0}},
{Name: "io_ctx", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr"}, TypeSize: 8}}, Kind: []string{"io_ctx"}, Values: []uint64{0}},
- {Name: "iocbptr", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr"}, TypeSize: 8}}, Kind: []string{"iocbptr"}, Values: []uint64{0}},
{Name: "ion_handle", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"ion_handle"}, Values: []uint64{0}},
{Name: "ipc", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"ipc"}, Values: []uint64{0, 18446744073709551615}},
{Name: "ipc_msq", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"ipc", "ipc_msq"}, Values: []uint64{0, 18446744073709551615}},
@@ -74,7 +73,6 @@ var resourceArray = []*ResourceDesc{
{Name: "sock_in6", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_in6"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
{Name: "sock_ipx", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_ipx"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
{Name: "sock_kcm", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_kcm"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
- {Name: "sock_key", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_key"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
{Name: "sock_llc", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_llc"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
{Name: "sock_netlink", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_netlink"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
{Name: "sock_netrom", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_netrom"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
@@ -13780,6 +13778,7 @@ var Calls = []*Call{
{NR: 1000007, Name: "syz_test$length9", CallName: "syz_test", Args: []Type{
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0"}, TypeSize: 8, Type: &StructType{TypeCommon: TypeCommon{TypeName: "syz_length_vma_struct"}}},
}},
+ {NR: 1000007, Name: "syz_test$missing_resource", CallName: "syz_test", Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "syz_missing_const_res", FldName: "ret", ArgDir: 1}}},
{NR: 1000007, Name: "syz_test$opt0", CallName: "syz_test", Args: []Type{
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "a0", IsOptional: true}, TypeSize: 8}},
}},
diff --git a/sys/sys_arm.go b/sys/sys_arm.go
index 17d7a95b7..c9f878ee3 100644
--- a/sys/sys_arm.go
+++ b/sys/sys_arm.go
@@ -44,7 +44,6 @@ var resourceArray = []*ResourceDesc{
{Name: "ifindex", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"ifindex"}, Values: []uint64{0}},
{Name: "inotifydesc", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"inotifydesc"}, Values: []uint64{0}},
{Name: "io_ctx", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr"}, TypeSize: 8}}, Kind: []string{"io_ctx"}, Values: []uint64{0}},
- {Name: "iocbptr", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr"}, TypeSize: 8}}, Kind: []string{"iocbptr"}, Values: []uint64{0}},
{Name: "ion_handle", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"ion_handle"}, Values: []uint64{0}},
{Name: "ipc", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"ipc"}, Values: []uint64{0, 18446744073709551615}},
{Name: "ipc_msq", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"ipc", "ipc_msq"}, Values: []uint64{0, 18446744073709551615}},
@@ -74,7 +73,6 @@ var resourceArray = []*ResourceDesc{
{Name: "sock_in6", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_in6"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
{Name: "sock_ipx", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_ipx"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
{Name: "sock_kcm", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_kcm"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
- {Name: "sock_key", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_key"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
{Name: "sock_llc", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_llc"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
{Name: "sock_netlink", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_netlink"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
{Name: "sock_netrom", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_netrom"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
@@ -13780,6 +13778,7 @@ var Calls = []*Call{
{NR: 1000007, Name: "syz_test$length9", CallName: "syz_test", Args: []Type{
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0"}, TypeSize: 8, Type: &StructType{TypeCommon: TypeCommon{TypeName: "syz_length_vma_struct"}}},
}},
+ {NR: 1000007, Name: "syz_test$missing_resource", CallName: "syz_test", Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "syz_missing_const_res", FldName: "ret", ArgDir: 1}}},
{NR: 1000007, Name: "syz_test$opt0", CallName: "syz_test", Args: []Type{
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "a0", IsOptional: true}, TypeSize: 8}},
}},
diff --git a/sys/sys_arm64.go b/sys/sys_arm64.go
index e4ce38c39..5534338ee 100644
--- a/sys/sys_arm64.go
+++ b/sys/sys_arm64.go
@@ -44,7 +44,6 @@ var resourceArray = []*ResourceDesc{
{Name: "ifindex", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"ifindex"}, Values: []uint64{0}},
{Name: "inotifydesc", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"inotifydesc"}, Values: []uint64{0}},
{Name: "io_ctx", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr"}, TypeSize: 8}}, Kind: []string{"io_ctx"}, Values: []uint64{0}},
- {Name: "iocbptr", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr"}, TypeSize: 8}}, Kind: []string{"iocbptr"}, Values: []uint64{0}},
{Name: "ion_handle", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"ion_handle"}, Values: []uint64{0}},
{Name: "ipc", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"ipc"}, Values: []uint64{0, 18446744073709551615}},
{Name: "ipc_msq", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"ipc", "ipc_msq"}, Values: []uint64{0, 18446744073709551615}},
@@ -74,7 +73,6 @@ var resourceArray = []*ResourceDesc{
{Name: "sock_in6", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_in6"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
{Name: "sock_ipx", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_ipx"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
{Name: "sock_kcm", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_kcm"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
- {Name: "sock_key", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_key"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
{Name: "sock_llc", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_llc"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
{Name: "sock_netlink", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_netlink"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
{Name: "sock_netrom", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_netrom"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
@@ -13780,6 +13778,7 @@ var Calls = []*Call{
{NR: 1000007, Name: "syz_test$length9", CallName: "syz_test", Args: []Type{
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0"}, TypeSize: 8, Type: &StructType{TypeCommon: TypeCommon{TypeName: "syz_length_vma_struct"}}},
}},
+ {NR: 1000007, Name: "syz_test$missing_resource", CallName: "syz_test", Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "syz_missing_const_res", FldName: "ret", ArgDir: 1}}},
{NR: 1000007, Name: "syz_test$opt0", CallName: "syz_test", Args: []Type{
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "a0", IsOptional: true}, TypeSize: 8}},
}},
diff --git a/sys/sys_ppc64le.go b/sys/sys_ppc64le.go
index 51cb85764..67977c932 100644
--- a/sys/sys_ppc64le.go
+++ b/sys/sys_ppc64le.go
@@ -44,7 +44,6 @@ var resourceArray = []*ResourceDesc{
{Name: "ifindex", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"ifindex"}, Values: []uint64{0}},
{Name: "inotifydesc", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"inotifydesc"}, Values: []uint64{0}},
{Name: "io_ctx", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr"}, TypeSize: 8}}, Kind: []string{"io_ctx"}, Values: []uint64{0}},
- {Name: "iocbptr", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr"}, TypeSize: 8}}, Kind: []string{"iocbptr"}, Values: []uint64{0}},
{Name: "ion_handle", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"ion_handle"}, Values: []uint64{0}},
{Name: "ipc", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"ipc"}, Values: []uint64{0, 18446744073709551615}},
{Name: "ipc_msq", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"ipc", "ipc_msq"}, Values: []uint64{0, 18446744073709551615}},
@@ -74,7 +73,6 @@ var resourceArray = []*ResourceDesc{
{Name: "sock_in6", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_in6"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
{Name: "sock_ipx", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_ipx"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
{Name: "sock_kcm", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_kcm"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
- {Name: "sock_key", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_key"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
{Name: "sock_llc", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_llc"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
{Name: "sock_netlink", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_netlink"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
{Name: "sock_netrom", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32"}, TypeSize: 4}}, Kind: []string{"fd", "sock", "sock_netrom"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
@@ -13780,6 +13778,7 @@ var Calls = []*Call{
{NR: 1000007, Name: "syz_test$length9", CallName: "syz_test", Args: []Type{
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0"}, TypeSize: 8, Type: &StructType{TypeCommon: TypeCommon{TypeName: "syz_length_vma_struct"}}},
}},
+ {NR: 1000007, Name: "syz_test$missing_resource", CallName: "syz_test", Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "syz_missing_const_res", FldName: "ret", ArgDir: 1}}},
{NR: 1000007, Name: "syz_test$opt0", CallName: "syz_test", Args: []Type{
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "a0", IsOptional: true}, TypeSize: 8}},
}},
diff --git a/sys/test.txt b/sys/test.txt
index 2090f51e0..5466feb33 100644
--- a/sys/test.txt
+++ b/sys/test.txt
@@ -523,6 +523,8 @@ syz_test$res1(a0 syz_res)
resource syz_missing_const_res[int32]: KVM_ARM_VCPU_INIT
+syz_test$missing_resource() syz_missing_const_res
+
syz_missing_const_struct {
a0 const[KVM_ARM_VCPU_INIT, int32]
}