Hi,
I try to make ioctl B' output value as a resource that another ioctl can use it as a input value, my syscall as following:
```
resource mem_handle_r[int64]
ioctl$AIP_MEM_CREATE_IOCTL(fd fd_ilu, cmd const[AIP_MEM_CREATE_IOCTL], arg ptr[inout, ioctl_mem_create_args])
ioctl$AIP_MEM_OPEN_IOCTL(fd fd_ilu, cmd const[AIP_MEM_OPEN_IOCTL], arg ptr[inout, ioctl_mem_open_args])
```
```
ioctl_mem_create_args {
input THUNKIF_CREATE_ALLOCATION_DESC (in)
hAllocation mem_handle_r (out)
address int64 (out)
}
# TODO is pCpuVa and fake_va right?
THUNKIF_CREATE_ALLOCATION_DESC {
hContext KCONTEXT_HANDLE
hVideoDecoder KVDEC_HANDLE
flags THUNKIF_CREATE_ALLOCATION_FLAG
size_in_bytes int64[0:34359738368]
base_alignment int32
heap int32
pCpuVa ptr64[in, int64]
fake_va ptr64[in, int64]
}
ioctl_mem_open_args {
input THUNKIF_OPEN_MEM_DESC (in)
hAllocation KMEM_HANDLE (out)
address int64 (out)
size int64 (out)
heap int32 (out)
}
THUNKIF_OPEN_MEM_DESC {
hContext KCONTEXT_HANDLE
hContextGuest KCONTEXT_HANDLE
hMemGuest mem_handle_r (in)
va int64
size int64
}
```
The ioctl$AIP_MEM_CREATE_IOCTL syscall return a value ioctl_mem_create_args.hAllocation , i want to use it in ioctl$AIP_MEM_OPEN_IOCTL as
a input value. is there some syntax error, the corpus gengerated as flowings:
```
r0 = openat$ilu(0xffffffffffffff9c, 0x0, 0x80401, 0x0)
ioctl$AIP_CONTEXT_CREATE_IOCTL(r0, 0x5450, 0x0)
r1 = openat$ilu(0xffffffffffffff9c, &(0x7f0000000100), 0x8100, 0x0)
ioctl$AIP_MEM_CREATE_IOCTL(r1, 0xc0488105, &(0x7f0000000480)={{0x1, 0xfffffffffffffffc, @flag_bit, 0x2000008, 0x3d, 0x2, 0x0, 0x0}})
r2 = openat$ilu(0xffffffffffffff9c, &(0x7f0000000000), 0x8100, 0x0)
ioctl$AIP_MEM_CREATE_IOCTL(r2, 0xc0488105, &(0x7f0000000480)={{0x1, 0xfffffffffffffffc, @flag_bit, 0x2000008, 0x3d, 0x2, 0x0, 0x0}})
r3 = openat$ilu(0xffffffffffffff9c, &(0x7f0000000080), 0x20201, 0x0)
ioctl$AIP_MEM_OPEN_IOCTL(r3, 0xc0488104, &(0x7f0000000100)={{0x2, 0x1000001, 0x100000001, 0x3, 0x9}})
```
I can not see the code that make mem_handle_r as a input to ioctl$AIP_MEM_OPEN_IOCTL.
And, i translate the corput to a c program by syz-pro2c, the c code also doesnot exist the `resource mem_handle_r[int64]` releated code.
Thanks for any suggestions.